Setup
apps/app/.env:
RevenueCat Configuration
- Create a project at app.revenuecat.com
- Link your App Store Connect and Google Play Console apps
- Get API keys from Project Settings → API Keys
- Create products in App Store Connect / Google Play Console
- Add products to an Offering (typically “default”) in RevenueCat
- Create an Entitlement (e.g., “pro”) and link your products to it
Usage
The app auto-detects the platform and uses the appropriate RevenueCat SDK.Subscription Store
Gating Features
Custom Purchase UI
Subscription Lifecycle Events
Track subscription events like trial starts, renewals, and cancellations:trial_started- Free trial startedtrial_converted- Trial converted to paidtrial_cancelled- Trial cancelledsubscription_started- New subscriptionsubscription_renewed- Auto-renewedsubscription_cancelled- Cancelled (still active until expiry)subscription_expired- Access endedsubscription_restored- Restored from previous purchasebilling_issue- Payment problem detected
Price Localization
Helper functions for proper price formatting:Advanced Features
Promotional Offers & Intro Pricing
RevenueCat automatically detects and displays promotional offers configured in App Store Connect or Google Play Console:Lifecycle Event Details
TheaddCustomerInfoUpdateListener provides detailed event tracking:
Price Localization Helpers
Format prices correctly for international users:Customer Info Storage
Store subscription details for offline access:boilerplate/vibe/SUBSCRIPTION_ADVANCED.md.
Testing
Mock mode: Without API keys, purchases simulate success. Includes realistic promotional offers (7-day trial for monthly, 14-day trial + intro pricing for annual). Dev menu includes a Free/Pro toggle. Sandbox testing:- iOS: Configure a sandbox tester in App Store Connect
- Android: Configure a test account in Google Play Console
- Web: Use Stripe test mode with RevenueCat Web Billing
Webhooks
For real-time subscription status updates, configure webhooks in RevenueCat → Project Settings → Integrations → Webhooks. See RevenueCat Webhooks for setup.Troubleshooting
“No products registered” errors?- Expected when API keys are set but products aren’t configured in RevenueCat
- Create products and add them to an Offering, then restart the app
- Verify API keys are correct
- Check that products are linked to an Offering in RevenueCat
- Call
restorePurchases()if user has an active subscription
- Verify
apps/app/.envhas the correct keys - Restart Metro:
yarn start --clear

