@umituz/react-native-subscription 2.35.19 → 2.35.21
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.35.
|
|
3
|
+
"version": "2.35.21",
|
|
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",
|
|
@@ -67,7 +67,7 @@ async function performUserSwitch(
|
|
|
67
67
|
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
68
68
|
console.log('[UserSwitchHandler] Calling Purchases.logIn() to switch from anonymous to:', normalizedUserId);
|
|
69
69
|
}
|
|
70
|
-
const result = await Purchases.logIn(normalizedUserId);
|
|
70
|
+
const result = await Purchases.logIn(normalizedUserId!);
|
|
71
71
|
customerInfo = result.customerInfo;
|
|
72
72
|
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
73
73
|
console.log('[UserSwitchHandler] ✅ Purchases.logIn() successful, created:', result.created);
|
|
@@ -86,7 +86,7 @@ async function performUserSwitch(
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
deps.setInitialized(true);
|
|
89
|
-
deps.setCurrentUserId(normalizedUserId);
|
|
89
|
+
deps.setCurrentUserId(normalizedUserId || undefined);
|
|
90
90
|
const offerings = await Purchases.getOfferings();
|
|
91
91
|
|
|
92
92
|
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
@@ -128,9 +128,9 @@ export async function handleInitialConfiguration(
|
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
await Purchases.configure({ apiKey, appUserID: normalizedUserId });
|
|
131
|
+
await Purchases.configure({ apiKey, appUserID: normalizedUserId || undefined });
|
|
132
132
|
deps.setInitialized(true);
|
|
133
|
-
deps.setCurrentUserId(normalizedUserId);
|
|
133
|
+
deps.setCurrentUserId(normalizedUserId || undefined);
|
|
134
134
|
|
|
135
135
|
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
136
136
|
console.log('[UserSwitchHandler] ✅ Purchases.configure() successful');
|
|
@@ -66,7 +66,7 @@ class SubscriptionManagerImpl {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
const { service, success } = await performServiceInitialization(this.managerConfig
|
|
69
|
+
const { service, success } = await performServiceInitialization(this.managerConfig!.config, userId);
|
|
70
70
|
this.serviceInstance = service ?? null;
|
|
71
71
|
this.ensurePackageHandlerInitialized();
|
|
72
72
|
|
|
@@ -119,7 +119,7 @@ class SubscriptionManagerImpl {
|
|
|
119
119
|
|
|
120
120
|
getEntitlementId(): string {
|
|
121
121
|
this.ensureConfigured();
|
|
122
|
-
return this.managerConfig
|
|
122
|
+
return this.managerConfig!.config.entitlementIdentifier ?? '';
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|