After building your app in Rork, use this documentation to setup a paywall with Revenuecat.
Summary
This tutorial will guide you through taking your Rork project and adding a Revenucat paywall to it, deploying it to the app store, and verifying it works Requirements- Apple AppStore Developer Account
- RevenueCat Account
- AI-Powered IDE (Windsurf/Cursor/Copilot/etc)
- Physical iPhone to Test
1. Sync your project to Git
Press the Integrations button at the top right inside of your Rork project. Press Create Repository and setup a new repo connected to your Github account..png?fit=max&auto=format&n=jLF1pZiSKKtUOQ1q&q=85&s=19d1b14c6dc7bce58b4694f0d1a99adb)
2. Open the Git repo locally in your IDE
Use the instructions inside of your Github repository or your IDE to locally connect your repo..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=ac1894c9f74ed844224af7edb0d1a95f)
Install project packages
3. Setup local development builds
In order for us to test using a local device, we need to initialize the Expo project and setup development build. Lets first initialize Expo. If this is your first time using Expo, you will be asked to create an account and setup the project. The default yes to the questions are fine.Install EAS + Login
Initialize Expo
Install expo-dev-client
Deploy a Development Build
Test your Development Build
Development builds are considered development because they rely on you to run a local Expo server. It lets you update code in real time with the build that is in your phone. The only reason to deploy the build again is not for basic code changes, but if you change the binary (package installs that change native code).Run Expo locally
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=cbb6a1c63f3b7c1178fa959ef98c2586)
4. Initial RevenueCat Project Setup
http://revenuecat.com/ RevenueCat helps you build & deploy paywalls without coding. You can even A/B test different paywalls here. RevenuCat makes it really convenient to gate features in your app and manage user payments. Create a RevenueCat account and create a project.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=c4534ea895809294274d186dffc1e426)
5. Deploy to App Store Connect
Before we move onto the next part, we need to initialize our project inside of AppStore Connect. The fastest and most convenient way to do this is to just run a production build.Run the production build deployment command
Submit to AppStoreConnect
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=02a3ac9c963d4c0f565d633e342a75fb)
6. Connect AppStoreConnect to RevenueCat
Add an app config for IOS App Store in the Apps & providers section of your app settings..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=d3ed945cadf5226ec7d345df8ae98bd7)
Now connect Apple Bundle ID & Auth Keys
For iOS Bundle ID and Android Bundle ID, it is important that the same bundle ID that is set in your [app.json] file is also set here. You can find the IDs in the sections as highlighted in the image below: (ios.bundleIdentifier) and (android.package).png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=1dac31cb0d1768289f95523536e4dbfb)
Create an In-App Purchase Key inside of App Store Connect → Users & Access → Integrations → In-App Purchase (CLICK HERE FOR IT)
It will also download a .p8 file after you create the key. Do not lose that file and secure it. Enter your bundle id, key id, and issuer id into this. Upload the p8 file you just downloaded into it as well..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=37b842391470a22a729f4591abfbf3c8)
Create an App Store Connect API key inside of App Store Connect → Integrations → In-App Purchase (CLICK HERE FOR IT)
Same situation. Allow for App Manager/Admin permissions and save. It will download another p8 file. Secure that and upload that one in this section too..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=db7cd3230564b4bd5b3560116c6436b0)
Go to this section of the page with and copy that URL
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=90536b5436b0d7e81d8e1416379071af)
Place it inside of your App Store Server NotificationsProduction and Sandbox URLS which can be found in App Store Dashboard for your App under General → App Information
Use the same link for both production and sandbox URLs.
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=1b5ef90f196eb6703378d3544e9ed435)
7. Create your Products in App Store Connect
Now we need to establish the different in-app purchases the user will be able to do. Each one of these is considered a product. We need to set up the product’s name, ID, price, duration, and trial period. It is important that we have some naming convention for this. We will need to use these exact same names when we create our products in App Store Connect later in the tutorial. For this tutorial, we will create 3 products. Our app is a single “pro” subscription, but we will have 3 ways one can buy it. One is a 10/month plan. And finally, a $100/year plan. The naming convention for the IDs will be like so:ios_appname_1m ← month plan
ios_appname_7d ← week plan
ios_appname_1y ← year plan
Go to subscriptions page in your Apps dashboard within App Store connect.
Create a new Subscription Group
We only need one since there is only one type of subscription (Membership vs No Membership). Name it Premium or Pro..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=382db011c2aec2765be9b513ea2c80e4)
Create 3 product subscriptions and label them correctly
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=22cde20de0fd1541b3b725d77bc5b4c8)
Subscription Duration, the Availability, the Pricing, and the Localization (which is just another way to label the Plan). I would also upload a screenshot of your apps functionality from the development testing to the screenshot section and write a comment about what the plan does for the app.
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=652814c2fce1ae5e1cc1dd863aa0e995)
Setup Localization for the Subscription Group itself
and you should be ready to go.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=eaa47dd6c4ccfbb25d2691a4b8675922)
8. Create Entitlements + Import Products to RevenueCat
Now we need to create an entitlement inside of RevenueCat. Think of an entitlement as a specific VIP package that different member types get when they purchase in your app. For simplicity sake, we only setup one subscription group, so label the entitlement the same thing. Make note of this entitlement when we set it up later in the IDE..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=240ddd085f232ce4a0896131ba97a447)
Now RevenueCat makes it really easy to import the products you just made in AppStoreConnect
Go to Product Catalog → New Product → Choose your App Store App.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=0e8aebeda84fd78da03344e2bbf683a4)
Press Import Products Automatically and you should see the three products you made in AppStore Connect. Select them all and add them in. You will see an option to add entitlements for each one. Add the entitlement you created earlier.
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=2d2100a5bcdfb9f96706eb72fde1a1d2)
9. Creating the Offering + Paywall
Offerings are the different subscription periods that are offered. You may have some exclusive deals for 3 month plans and other creative payment plan options, so experiment here over time.Create a new offering
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=38209e4adc6d20e3b47f89ebd8298a22)
Add all of your products with the appropriate duration
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=30c626a59e007348068be09d28094db2)
Choose your Paywall Template
Select the offering we just made as well when creating the paywall..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=0c371dd5f33a8e44b0f24264b6f19dcc)
Connect your Products to your New Paywall
Once the editor opens, you’ll notice that the prices are incorrect. We need to connect the real products you setup earlier to it..png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=55dda9753fe9c0f6e0806117274c91cd)
Look for the package layers on the left component stack and update them using the package properties settings on the right accordingly.
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=a3c65fb62f925bd9ef3393aca036aead)
Update the text within the pricing blocks to fit your offerings.
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=355ebdeb218de7e19efe9edc123b5264)
Update the text on the Paywall so it fits your App and finally press Publish
.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=52ba053b7595df6fa68aa6ea2d42907b)
10. Install RevenueCat into the App
https://www.revenuecat.com/docs/getting-started/installation/expo We need to install the RevenueCat packages into our Expo app. Go back to your IDE and run these commands to install RevenueCat.Install RevenueCat packages in your IDE
Grab The API Key
In your RevenueCat project, click API Keys from the panel on the bottom left, find App Store Public API Key and copy your Public API Key:.png?fit=max&auto=format&n=i4JwpNoInO29h-35&q=85&s=b646331d84143119a5ea944bc23cfbee)
Initialize RevenueCat in your app
To use the RevenueCat SDK, you need to run a command at the root of your project.Edit the file app/layout.tsx
In the AI chat of your IDE, paste this prompt, but update the API key to be the we copied right above.
Purchases.configure({apiKey: 'YOUR_ACTUAL_KEY_HERE'});
11. New Deployment for RevenueCat Package
Before we move onto the next part, we should run a new development build and get it on our phone.In your app.json file, please bump your Version number up to 1.0.1
Then run the development build deployment command
Run your development server
12. Add Trigger & Feature Gating in App
To make it easy for us, we will be using the AI chat inside of the IDE to set this up. Once you’ve done so, you can say the following prompt to add the paywall + feature gating. Please update the text in quotes to your actual trigger placement and feature gate. Make sure it fits the functionality of YOUR app.We are using RevenueCat for our paywall in app.How it works: RevenueCat will check for this command
const customerInfo = await Purchases.getCustomerInfo();
(typeof customerInfo.entitlements.active[”Pro”] !== “undefined”)
IF the customer has an activeEntitlement with the label “Pro”, they are considered Pro membership and **get unlimited token generations for images.
Otherwise, show them an Upgrade to Pro button and if they click it or try to generate an image, show the paywall as this example shows it:**
Copy and paste this into your AI editor and update the Entitlements (Pro/Premium), Trigger Placement, and What Functionality it Gates and Should Trigger For
The AI should update your project and after restarting the app on your phone, you should be able to test it. Try to do the feature that is now gated and your paywall should pop up. Your paywall make look something like this:
This is looking great! It got the products that we setup and you should be able to do a fake purchase and see the conditional membership work!
