This is a minimal example application demonstrating the core functionality of Adapty React Native SDK:
- SDK activation
- Displaying free and premium content
- Showing paywall for premium content access
- Making purchases through Paywall Builder
- Automatic access to premium content after successful purchase
- Basic Recipes - Free content available to all users
- Premium Recipes - Content requiring an active subscription
- Paywall Builder Integration - Native paywall presentation
- Real-time Access Updates - Automatic unlock after purchase
- Node 20
- JDK 17
- Xcode (for iOS)
- Android Studio (for Android)
Before running the app, make sure you have configured your Adapty credentials:
-
Run
yarn installto install dependencies -
The
yarn credentialscommand will run automatically before start (prestart hook) to set up your Adapty configuration- This script creates
.adapty-credentials.jsonfile and configures native projects (bundle IDs, application IDs) - If you need to update credentials later, run
yarn credentials-forceto force update
- This script creates
-
The credentials file
.adapty-credentials.jsonshould contain:token- Your Adapty public SDK keyplacement_id- Placement ID for the paywall from the dashboardios_bundle- iOS bundle identifier (must match your App Store Connect configuration)android_application_id- Android application ID (must match your Google Play Console configuration)
⚠️ Important: Bundle IDs must match your app configuration in App Store Connect (iOS) and Google Play Console (Android). Without correct bundle IDs, you won't be able to make test purchases.
To run on iOS simulator:
yarn iosOr open Xcode:
npx react-native run-iosTo run on Android device or emulator:
yarn androidOr open Android Studio and build from there.
- SDK Activation - The app activates Adapty SDK on startup using credentials from
.adapty-credentials.json - Profile Loading - User profile is fetched to check subscription status
- Paywall Loading - Paywall is preloaded for quick presentation
- Content Access - Free recipes are always accessible, premium recipes require active subscription
- Purchase Flow - When user taps a locked recipe, the paywall is presented using Paywall Builder
- Access Grant - After successful purchase, profile is updated and premium content becomes accessible
To test the purchase flow:
- Make sure you have configured test products in Adapty Dashboard
- Use test accounts:
- iOS: Sandbox Tester account (configured in App Store Connect)
- Android: Gmail account added to License Testers list in Google Play Console
- Tap on any premium recipe (🔒 icon)
- Complete the purchase in the presented paywall
- Premium content will unlock automatically
If you're developing the SDK and want to test changes in this example:
yarn update-sdk-fullThis script will:
- Build the SDK from the parent directory
- Create a package archive
- Install it directly into this example's
node_modules


