@umituz/react-native-subscription 2.3.8 → 2.4.0

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.3.8",
3
+ "version": "2.4.0",
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",
@@ -38,15 +38,16 @@ export function shouldUseTestStore(config: RevenueCatConfig): boolean {
38
38
  export function resolveApiKey(config: RevenueCatConfig): string | null {
39
39
  const useTestStore = shouldUseTestStore(config);
40
40
 
41
- if (__DEV__) {
42
- console.log("[RevenueCat] resolveApiKey:", {
43
- platform: Platform.OS,
44
- useTestStore,
45
- hasTestKey: !!config.testStoreKey,
46
- hasIosKey: !!config.iosApiKey,
47
- hasAndroidKey: !!config.androidApiKey,
48
- });
49
- }
41
+ // Always log in development, log warnings in production for debugging
42
+ /* eslint-disable-next-line no-console */
43
+ console.log("[RevenueCat] resolveApiKey:", {
44
+ platform: Platform.OS,
45
+ useTestStore,
46
+ hasTestKey: !!config.testStoreKey,
47
+ hasIosKey: !!config.iosApiKey,
48
+ hasAndroidKey: !!config.androidApiKey,
49
+ isProduction: isProductionBuild(),
50
+ });
50
51
 
51
52
  if (useTestStore) {
52
53
  return config.testStoreKey ?? null;
@@ -59,9 +60,8 @@ export function resolveApiKey(config: RevenueCatConfig): string | null {
59
60
  : config.iosApiKey;
60
61
 
61
62
  if (!key || key === "" || key.includes("YOUR_")) {
62
- if (__DEV__) {
63
- console.warn("[RevenueCat] No valid API key found for platform:", Platform.OS);
64
- }
63
+ /* eslint-disable-next-line no-console */
64
+ console.warn("[RevenueCat] ⚠️ NO API KEY - packages will not load. Check env vars.");
65
65
  return null;
66
66
  }
67
67