Documentation Index
Fetch the complete documentation index at: https://docs.newly.app/llms.txt
Use this file to discover all available pages before exploring further.
Keys in app.json
After setup, the following keys are added to yourapp.json (under the extra field):
| Key | Example | Description |
|---|---|---|
revenueCatApiKeyIos | appl_... | Production iOS API key |
revenueCatApiKeyAndroid | goog_... | Production Android API key |
revenueCatTestApiKey | test_... | Test Store key for dev builds |
revenueCatEntitlementId | pro | The entitlement to check (always “pro”) |
__DEV__ is true) and production keys in release builds.
Generated files
The AI agent creates or modifies these files:| File | Purpose |
|---|---|
SubscriptionContext.tsx | React context provider wrapping the RevenueCat SDK. Handles initialization, purchase state, and optionally syncs user ID if auth exists. |
/paywall screen | The paywall UI where users can subscribe. Shows pricing, features, and purchase buttons. |
_layout.tsx | Modified to wrap the app in SubscriptionProvider and add a SubscriptionRedirect for enforcing the paywall. |
| Onboarding integration | If onboarding exists, the paywall is wired into the flow after onboarding completes. |
Dependencies
Thereact-native-purchases package is installed automatically.
How API key switching works
The generatedSubscriptionContext.tsx includes logic like:
- In development builds, the Test Store key is used so you can simulate purchases safely
- In production builds, the real iOS or Android key is used for actual App Store / Play Store purchases
- This switching is automatic — you don’t need to change anything between environments