@umituz/react-native-subscription 2.12.19 → 2.12.20

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.12.19",
3
+ "version": "2.12.20",
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",
@@ -5,11 +5,12 @@
5
5
  */
6
6
 
7
7
  import type { RevenueCatConfig } from "@revenuecat/domain/value-objects/RevenueCatConfig";
8
- import { isExpoGo, isProductionBuild } from "./ExpoGoDetector";
8
+ import { isTestStoreEnvironment } from "./ExpoGoDetector";
9
9
 
10
10
  /**
11
11
  * Check if Test Store key should be used
12
12
  * CRITICAL: Never use test store in production builds
13
+ * Uses Test Store in development environments (Expo Go, dev builds, simulators)
13
14
  */
14
15
  export function shouldUseTestStore(config: RevenueCatConfig): boolean {
15
16
  const testKey = config.testStoreKey;
@@ -18,16 +19,13 @@ export function shouldUseTestStore(config: RevenueCatConfig): boolean {
18
19
  return false;
19
20
  }
20
21
 
21
- if (isProductionBuild() && !isExpoGo()) {
22
- return false;
23
- }
24
-
25
- return isExpoGo();
22
+ return isTestStoreEnvironment();
26
23
  }
27
24
 
28
25
  /**
29
26
  * Get RevenueCat API key from config
30
- * Returns Test Store key if in Expo Go environment ONLY
27
+ * Returns Test Store key in development environments (Expo Go, dev builds, simulators)
28
+ * Returns production API key in production builds
31
29
  * Main app must provide resolved platform-specific apiKey in config
32
30
  */
33
31
  export function resolveApiKey(config: RevenueCatConfig): string | null {