RevenueCat Template
The RevenueCat template is an excellent starting point for apps that offer subscriptions to unlock additional functionality. It includes all the great features of the default template, plus an example of how to create an upsell modal that lets users choose between monthly and yearly subscription options.
Features
- Subscription upsell: Your users can sign up for a subscription to your app with an example upsell modal. Powered by RevenueCat.
- Authentication: Your users can log in securely using your choice of password, passwordless SMS or passkeys.
- User Management: Users can alter basic information about themselves like name and profile picture.
- Feedback: Users can report bugs or make suggestions right from within your app.
- Roadmap: Your users can keep track of new features that are in the works and vote on their favorites.
- Changelog: Users can see a revision history of what has changed with your app updates. Users can see when an update is available in the App Store.
- Hosted legal documents: Users can access your terms of service, privacy policy and other legal documents hosted from the Parra dashboard within your app.
Prerequisites
- Create a new RevenueCat project: https://www.revenuecat.com/docs/welcome/projects
- Obtain a public API key: https://www.revenuecat.com/docs/welcome/authentication
- Create your IAPs: https://www.revenuecat.com/docs/getting-started/entitlements
When you obtain an API key in the RevenueCat dashboard, it is important that you use the public API key and not a secret key. Secret keys should never be embedded in your app.
Bootstrap Command
To build an app with this template, install the Parra CLI and run the command:
parra bootstrap --template revenue-cat
What's Next?
The RevenueCat sample app comes with a few hard-coded in-app purchase IDs for demonstration purposes. After you've completed setting up your purchases in the RevenueCat dashboard, you'll want to update the IDs used in the app to match. These can be found:
- At the top of the
SubscriptionViewModel.swift
file. These in-app purchase IDs are used for the list of subscription options in the sample subscription upsell modal. - In the top-level
Configuration.storekit
file, which determines which in-app purchases are available in the iOS simulators.