@umituz/react-native-subscription 2.43.10 → 2.43.11
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.
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Sets up or updates the @umituz/react-native-subscription package in a React Native app.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Subscription Setup Skill
|
|
6
|
+
|
|
7
|
+
When this workflow/skill is invoked, follow these precise steps to set up or update the `@umituz/react-native-subscription` package in the current project.
|
|
8
|
+
|
|
9
|
+
## Step 1: Check and Update `package.json`
|
|
10
|
+
- Locate the target project's `package.json` file.
|
|
11
|
+
- Check if `@umituz/react-native-subscription` is installed in `dependencies`.
|
|
12
|
+
- If missing: Install the package using `npm install @umituz/react-native-subscription`.
|
|
13
|
+
- If outdated: Update it to the latest version.
|
|
14
|
+
|
|
15
|
+
## Step 2: Ensure Peer Dependencies
|
|
16
|
+
Ensure the following peer dependencies are present in `package.json`. If missing, install them:
|
|
17
|
+
- `react-native-purchases`
|
|
18
|
+
- `@react-native-async-storage/async-storage`
|
|
19
|
+
- `zustand`
|
|
20
|
+
- `@tanstack/react-query`
|
|
21
|
+
*(Note: If the project uses Expo, run `npx expo install` for expo-supported packages like async-storage, otherwise standard `npm install`)*
|
|
22
|
+
|
|
23
|
+
// turbo
|
|
24
|
+
## Step 3: Run Pod Install (If bare React Native)
|
|
25
|
+
If there is an `ios/` folder in the project and `Podfile` exists, run:
|
|
26
|
+
```bash
|
|
27
|
+
cd ios && pod install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Step 4: Inject Provider Boilerplate
|
|
31
|
+
- Locate the main entry or root layout file of the app (e.g., `App.tsx`, `src/App.tsx`, or Expo Router's `app/_layout.tsx`).
|
|
32
|
+
- Ensure the app is wrapped with `SubscriptionFlowProvider` or any required top-level providers exported from `@umituz/react-native-subscription`.
|
|
33
|
+
- Import the needed components:
|
|
34
|
+
```typescript
|
|
35
|
+
import { SubscriptionFlowProvider, initializeSubscription } from '@umituz/react-native-subscription';
|
|
36
|
+
```
|
|
37
|
+
- Make sure `initializeSubscription` is called somewhere appropriate (e.g., inside an `useEffect` or initialization module) with the API Keys from the environment.
|
|
38
|
+
- If API keys (like `REVENUECAT_APPLE_KEY` or `REVENUECAT_GOOGLE_KEY`) are missing, prompt the user to add them to their `.env` file.
|
|
39
|
+
|
|
40
|
+
## Step 5: Summary
|
|
41
|
+
Provide a brief summary of what you did: which packages were installed/updated, and which files were modified to inject the subscription boilerplate.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.11",
|
|
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",
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"files": [
|
|
111
111
|
"src",
|
|
112
|
+
".agents",
|
|
112
113
|
"README.md",
|
|
113
114
|
"LICENSE"
|
|
114
115
|
]
|