@umituz/react-native-subscription 2.14.6 → 2.14.8
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.14.
|
|
3
|
+
"version": "2.14.8",
|
|
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",
|
|
@@ -28,8 +28,10 @@ export interface RestoreResult {
|
|
|
28
28
|
export interface IRevenueCatService {
|
|
29
29
|
/**
|
|
30
30
|
* Initialize RevenueCat SDK
|
|
31
|
+
* @param userId User identifier
|
|
32
|
+
* @param apiKey Optional API key (auto-resolved if not provided)
|
|
31
33
|
*/
|
|
32
|
-
initialize(userId: string, apiKey
|
|
34
|
+
initialize(userId: string, apiKey?: string): Promise<InitializeResult>;
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
37
|
* Fetch offerings from RevenueCat
|
|
@@ -90,5 +90,6 @@ export const useSubscriptionPackages = (userId: string | undefined) => {
|
|
|
90
90
|
staleTime: STALE_TIME,
|
|
91
91
|
gcTime: GC_TIME,
|
|
92
92
|
enabled: true, // Always enabled - works for both authenticated and anonymous users
|
|
93
|
+
refetchOnMount: "always", // Always refetch to get fresh packages (fixes cached empty results)
|
|
93
94
|
});
|
|
94
95
|
};
|