Skip to content

๐Ÿ“Š Revenue Cat

Set up subscription management with RevenueCat.

โš ๏ธ Don't want to use RevenueCat? If you don't need subscription management, you can remove RevenueCat by:

  1. Remove RevenueCatProvider from your app layout (app/_layout.tsx):
// Remove this wrapper:
// <RevenueCatProvider>
 
// Keep only:
<QueryClientProvider client={queryClient}>
  <ThemeProvider>
    <AuthProvider>
      <AppInitializer>
        {/* Your app content */}
      </AppInitializer>
    </AuthProvider>
  </ThemeProvider>
</QueryClientProvider>
  1. Skip this entire setup page

๐Ÿšจ CRITICAL WARNING: If you keep the RevenueCatProvider in your code but don't configure the RevenueCat environment variables, your app will stay stuck on the splash screen and won't load!

Prerequisites

โš ๏ธ IMPORTANT: Before setting up Revenue Cat, you must:

  1. Complete previous setup steps - Finish all configuration steps up to Sentry
  2. Add critical build variable - Add SENTRY_DISABLE_AUTO_UPLOAD=true to your Expo project environment variables on expo.dev to prevent build crashes
  3. Build your app first - Use eas build to create your app
  4. Submit to App Store Connect - Use eas submit to upload your app
  5. Create subscription products - You can create products immediately after submission

If you haven't built yet: Skip Revenue Cat for now and return after building.

Required for Revenue Cat setup:
  • App submitted and processed in App Store Connect
  • Subscription/purchase products created in App Store Connect

๐Ÿ“ฑ First: Create App Store Products

1. App Store Connect Setup

Before configuring Revenue Cat, create your subscription products:

  1. Go to App Store Connect
  2. Select your app (must be already submitted via EAS)
  3. Go to Features โ†’ In-App Purchases
  4. Create Subscription Group first:
    • Click + next to "Subscription Groups"
    • Reference Name: Premium Subscriptions
    • App Name: Your app name in App Store
  5. Create subscription in the group:
    • Click + inside your subscription group
    • Reference Name: Premium Monthly
    • Product ID: premium_monthly (remember this!)
    • Price: Set your pricing
    • Subscription Duration: 1 Month

๐Ÿ”‘ Create Revenue Cat Account

  1. Go to revenuecat.com
  2. Create free account
  3. Create new project: FoodieApp

Configuration for iOS

  1. Go to revenuecat.com
  2. Go To Platforms (Make sure you are on the correct project)
  3. Click on Add app platform
  4. Select App Store
  5. On the page Enter:
    • App Name: FoodieApp
    • App Bundle ID: com.yourcompany.yourapp
    • App Store Connect App-Specific Shared Secret:
      • Go to your app on App Store Connect
      • Under "General" โ†’ "App Information"
      • Scroll to "App-Specific Shared Secret" and click "Manage" and "Generate"
    • In-app purchase key configuration:
      • P8 key file from App Store Connect (Generate it on App Store Connect here)
      • Key ID: Your key ID (It should be extracted from the P8 key file)
      • Issuer ID: Your issuer ID (You can get it here)
    • Apple Server to Server notification settings: Allow to receive notifications from Revenue Cat
    • App Store Connect API:
      • P8 key file from App Store Connect here
      • Key ID: Your key ID (It should be extracted from the P8 key file)
      • Issuer ID: Your issuer ID (You can get it here)
  • You should get your Public API Key on the bottom of the page
  • Copy it and add it to your .env.local file as EXPO_PUBLIC_RC_IOS

โš ๏ธ Important: Make sure to follow all the following steps from create an entitlement to create a Paywall

Create an Entitlement

  1. Go to Product catalog
  2. Click on Entitlements
  3. Click on New entitlement:
  • Identifier: Choose a unique identifier for the entitlement (e.g., premium, pro, unlimited)
  • Description: Add a description for the entitlement

๐Ÿ’ก Important: Remember your Entitlement Identifier - you'll need to add it to your .env.local file as EXPO_PUBLIC_RC_SUBSCRIPTION_NAME.

Create Products/Subscriptions

โœ… Prerequisites Complete: You should now have your subscription product created in App Store Connect (can be any name you choose).

โš ๏ธ Important: Your products/subscriptions in App Store Connect must have the status "Ready to Submit" to be detectable by Revenue Cat. Make sure to complete all required information for your subscription products.

  1. Go to Product catalog
  2. Click on Products
  3. Click on New product
  4. Import Products (Recommended):
    • Click Import Products
    • Select your iOS app platform
    • Revenue Cat will find your subscription automatically
    • Click Import to add it to Revenue Cat
  5. Manual Alternative:
    • Product Identifier: Your App Store Connect Product ID (must match exactly)
    • Platform: iOS
  6. Link to Entitlement:
    • Select the imported product
    • Add the entitlement you created above

Create an Offering

โš ๏ธ Prerequisite: You should have a Product/Subscription set up in Revenue Cat to create an offering

  1. Go to Product catalog
  2. Click on Offerings
  3. Click on New offering
  4. Enter:
  • Identifier: Choose a unique identifier for the offering
  • Display Name: Add a name for the offering
  1. Click on ** Add Package**
  2. Select the product you want to add to the offering:
  • Select the Identifier (The duration of the subscription or a custom product)
  • Add a Description
  • Select the product (The product/subscription you want to add to the offering)
  1. Click on Save

Create a Paywall

  1. Go to Paywalls
  2. Click on New paywall
  3. Select the paywall you want to create
  4. On the right side, select an Offering for your Paywall
  5. Modify the paywall as you want
  6. Click on Save

๐Ÿ”ง Get API Keys

1. iOS API Key

  1. In Revenue Cat dashboard, click Platforms
  2. Select Apple App Store
  3. At the bottom of the page, you will find the Public API Key
  4. Copy the Public API Key:
EXPO_PUBLIC_RC_IOS_KEY=appl_your_ios_api_key

๐Ÿ’ก Info: Add subscription management API keys to your environment.

โœ… Environment Updated

Your .env.local should now include:

EXPO_PUBLIC_RC_IOS_KEY=appl_...
EXPO_PUBLIC_RC_SUBSCRIPTION_NAME=your_entitlement_identifier
Important variables:
  • EXPO_PUBLIC_RC_SUBSCRIPTION_NAME: Must match the Entitlement Identifier you created in Revenue Cat (not the App Store Connect Product ID)

๐Ÿšจ REMINDER: Make sure to configure ALL RevenueCat environment variables. If you leave the RevenueCatProvider in your code without proper configuration, your app will stay stuck on the splash screen!

๐Ÿ’ก Production Builds: For production builds, you'll need to add ALL your environment variables to expo.dev โ†’ Your Project โ†’ Settings โ†’ Environment variables.

๐ŸŽฏ Next Step

Continue to ๐Ÿ›ก๏ธ Sentry to link error tracking to your app.


Step 5/11 Complete โœ…

Revenue Cat API keys added!

๐Ÿ“š Additional Resources

Official Documentation