@umituz/react-native-subscription 2.2.36 → 2.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.2.36",
3
+ "version": "2.2.37",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import Purchases, { type PurchasesOffering } from "react-native-purchases";
7
- import { isExpoGo } from "../utils/ExpoGoDetector";
7
+
8
8
 
9
9
  export interface OfferingsFetcherDeps {
10
10
  isInitialized: () => boolean;
@@ -28,12 +28,7 @@ export async function fetchOfferings(
28
28
  return null;
29
29
  }
30
30
 
31
- if (isExpoGo() && !deps.isUsingTestStore()) {
32
- if (__DEV__) {
33
- console.log("[RevenueCat] fetchOfferings() - ExpoGo without test store");
34
- }
35
- return null;
36
- }
31
+
37
32
 
38
33
  try {
39
34
  const offerings = await Purchases.getOfferings();
@@ -7,7 +7,6 @@ import Purchases, { type PurchasesPackage } from "react-native-purchases";
7
7
  import type { PurchaseResult } from "../../application/ports/IRevenueCatService";
8
8
  import {
9
9
  RevenueCatPurchaseError,
10
- RevenueCatExpoGoError,
11
10
  RevenueCatInitializationError,
12
11
  } from "../../domain/errors/RevenueCatError";
13
12
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
@@ -15,7 +14,6 @@ import {
15
14
  isUserCancelledError,
16
15
  getErrorMessage,
17
16
  } from "../../domain/types/RevenueCatTypes";
18
- import { isExpoGo } from "../utils/ExpoGoDetector";
19
17
  import {
20
18
  syncPremiumStatus,
21
19
  notifyPurchaseCompleted,
@@ -52,9 +50,7 @@ export async function handlePurchase(
52
50
  throw new RevenueCatInitializationError();
53
51
  }
54
52
 
55
- if (isExpoGo() && !deps.isUsingTestStore()) {
56
- throw new RevenueCatExpoGoError();
57
- }
53
+
58
54
 
59
55
  const consumableIds = deps.config.consumableProductIdentifiers || [];
60
56
  const isConsumable = isConsumableProduct(pkg, consumableIds);
@@ -7,12 +7,10 @@ import Purchases from "react-native-purchases";
7
7
  import type { RestoreResult } from "../../application/ports/IRevenueCatService";
8
8
  import {
9
9
  RevenueCatRestoreError,
10
- RevenueCatExpoGoError,
11
10
  RevenueCatInitializationError,
12
11
  } from "../../domain/errors/RevenueCatError";
13
12
  import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
14
13
  import { getErrorMessage } from "../../domain/types/RevenueCatTypes";
15
- import { isExpoGo } from "../utils/ExpoGoDetector";
16
14
  import {
17
15
  syncPremiumStatus,
18
16
  notifyRestoreCompleted,
@@ -35,9 +33,7 @@ export async function handleRestore(
35
33
  throw new RevenueCatInitializationError();
36
34
  }
37
35
 
38
- if (isExpoGo() && !deps.isUsingTestStore()) {
39
- throw new RevenueCatExpoGoError();
40
- }
36
+
41
37
 
42
38
  try {
43
39
  const customerInfo = await Purchases.restorePurchases();