integrate-revenuecat: end-to-end RevenueCat integration
Use this skill when the user wants to add RevenueCat to a project for the first time, or to reconfigure the SDK with a public API key. The skill covers two halves:
- Dashboard side — set up the project, register the app, and obtain the public API key, through the RevenueCat MCP server or the
rc CLI.
- App side — install the Purchases SDK, call
Purchases.configure(…) at app entry, and verify the configuration banner in the logs.
Walk them in order. Most integrations need both halves, even when the user asks "just install the SDK" — the SDK needs an API key from the dashboard.
If a project + app already exist and the user only wants to wire the SDK into code, jump to Section 3 below.
If the user wants to bootstrap a brand new RevenueCat project (apps + products + entitlements + offerings), use the create-revenuecat-project skill instead, then come back here for the SDK install.
Arguments
Available as $ARGUMENTS when invoked as a slash command:
platform (optional): One of ios, android, kmp, flutter, react-native. If omitted, run the detection algorithm in Section 3a.
app_identifier (optional): Bundle ID (iOS) or package name (Android). If omitted, read it from the project files (Info.plist, AndroidManifest.xml, app.json, pubspec.yaml).
project_name (optional): Name of the RevenueCat project to use. If omitted, list projects (via MCP or rc projects list) and ask the user.
1. Understand the status quo
Before touching the dashboard, gather the facts:
- Platform target: iOS / Apple App Store, Android / Google Play, or both. Inspect the working directory before asking — the detection algorithm in Section 3 makes this obvious for most projects.
- Technology: native iOS (Swift), native Android (Kotlin / Java), React Native, Flutter, Kotlin Multiplatform. SDK list: https://www.revenuecat.com/docs/getting-started/installation.md.
- App identifier: bundle ID (iOS), package name (Android). Pull from
Info.plist / AndroidManifest.xml / app.json / pubspec.yaml rather than asking.
2. Dashboard side
Use whichever surface the user has available: the RevenueCat MCP server or the rc CLI (see the revenuecat-cli skill for CLI discovery and conventions). Both cover the same operations for these steps, and each step below notes the MCP tool and the rc command.
2a. Get or create the project
- List accessible projects:
list-projects (MCP) or rc projects list. If multiple, ask the user which one matches this app, or offer to create a new one (create-project / rc projects create).
- If there is no project, hand off to the
create-revenuecat-project skill, then resume here.
- Store the
project_id for the rest of the steps.
2b. Get or create the app
- Check which apps are already configured in the project (
list-apps / rc apps list). A test_store app is always present; app_store and play_store apps are present only if the user has finished store-side setup.
- Ask the user whether their app is already set up in App Store Connect (iOS) or Google Play Console (Android). Reassure them that store-side setup can come later — the
test_store app is enough to start integrating.
- If the user confirms store-side setup is done, call
create-app (or rc apps create):
- iOS:
type: "app_store", bundle_id from Section 1.
- Android:
type: "play_store", package_name from Section 1.
name derived from the identifier or asked from the user.
2c. Get the public API key
- List public keys for the relevant app ID:
list-public-api-keys (MCP) or rc apps keys <app-id>:
app_store / play_store if the store-side app exists.
- Otherwise the
test_store app.
- The returned key is public and safe to embed in client app code. iOS keys are prefixed
appl_…, Android keys goog_…, Amazon amzn_….
Never use the secret API key in client code. Secret keys are server-side only.
3. App side — install and configure the SDK
3a. Detect the platform
Inspect the working directory and pick the first match, from top to bottom:
- React Native:
package.json has a react-native-purchases entry, or react-native as a dependency → read platforms/react-native.md. If expo is also a dependency, note it as an Expo project.
- Flutter:
pubspec.yaml exists at the project root → read platforms/flutter.md.
- Kotlin Multiplatform:
build.gradle.kts contains a kotlin { … } multiplatform source sets block, or depends on com.revenuecat.purchases:purchases-kmp* → read platforms/kmp.md.
- Android (native):
build.gradle(.kts) applies com.android.application (and is not KMP) → read platforms/android.md.
- iOS (native):
Package.swift, *.xcodeproj, *.xcworkspace, or Podfile at the project root → read platforms/ios.md.
If several match (e.g. an ios/ folder inside a Flutter project), pick the outermost project, the one that owns the build. If still ambiguous, ask the user which platform they want to configure.
3b. Shared concepts (all platforms)
- Public SDK key, not secret key. RevenueCat issues a separate public SDK key per store/platform. iOS apps use an
appl_… key, Android apps use a goog_… key (Amazon uses amzn_…). Server-side secret keys must never appear in client apps.
- Configure once per app launch. Call
Purchases.configure(…) exactly once, as early as possible (app entry point). Later calls no-op or warn.
- Anonymous users by default. If you don't pass an
appUserID, RevenueCat creates a stable anonymous ID. Only pass appUserID if you already have an authenticated user at launch; otherwise call logIn(…) later (see the revenuecat-identify-user skill).
- Enable debug logging during integration. Each platform file shows how. Turn it off for release builds.
- Keep keys out of source control. Recommend
.env (RN), xcconfig (iOS), local.properties / gradle.properties (Android), or dart-define (Flutter) when the user asks about secret management.
3c. Implementation
Read the platform file that matches detection:
platforms/ios.md
platforms/android.md
platforms/kmp.md
platforms/flutter.md
platforms/react-native.md
Each platform file is self-contained: install command, exact configure snippet, and where to place it in the app entry point.
4. Verify
Do not claim setup is complete until:
- The project builds (Xcode build,
./gradlew assembleDebug, flutter run, npx react-native run-ios, or the KMP equivalent).
- The app launches and the RevenueCat SDK logs a configuration banner in the console / logcat / Metro output (each platform file describes the expected log line).
- No authentication errors appear on the first SDK network call. A wrong API key surfaces as an auth error log as soon as the app fetches offerings.
If the user only asked to "install" without running the app, tell them what to look for in the logs when they do run it.
5. Next steps
5a. Products, entitlements, offerings
Check whether products, entitlements, and offerings are already set up in the project. If not, offer to help via the create-revenuecat-project skill.
5b. Store-side setup
iOS (App Store Connect)
- In-App Purchase Key (recommended for StoreKit 2) — App Store Connect → Users and Access → Integrations → In-App Purchase. Generate key, download the
.p8 file. Note the Key ID and Issuer ID.
- Shared Secret (legacy StoreKit 1) — App Store Connect → App → App Information → App-Specific Shared Secret.
- If the user provides this information, register it on the RevenueCat side via
create-app / update-app.
Android (Google Play Console)
- Service account credentials — Create a service account in Google Cloud Console. Grant "Service Account User" role. Create a JSON key. In Play Console, grant the service account access with "View financial data" permission.
- Real-time Developer Notifications (RTDN) — Set up a Cloud Pub/Sub topic. Configure in Play Console → Monetization setup.
- If the user provides this information, register it via
create-app / update-app.
5c. Subsequent skills
Common follow-ups after integrate-revenuecat:
revenuecat-paywall — display a dashboard-configured paywall.
revenuecat-purchase-flow — implement purchase + restore manually.
revenuecat-entitlements-gate — gate features behind active entitlements.
revenuecat-identify-user — wire logIn / logOut to the app's auth system.
revenuecat-testing-setup — set up a sandbox testing channel.
revenuecat-troubleshoot — diagnose offerings / products / entitlement bugs.
1---2name: integrate-revenuecat3description: End-to-end RevenueCat integration — sets up the dashboard side via the RevenueCat MCP or the `rc` CLI (project, app, public API key) and installs/configures the Purchases SDK in the app. Use when the user asks to add RevenueCat, integrate Purchases, install the RevenueCat SDK, set up a RevenueCat API key, configure Purchases on launch, or set up a brand new RevenueCat integration on iOS, Android, Kotlin Multiplatform, Flutter, or React Native.4---5
6# integrate-revenuecat: end-to-end RevenueCat integration
7
8Use this skill when the user wants to add RevenueCat to a project for the first time, or to reconfigure the SDK with a public API key. The skill covers two halves:
9
101. **Dashboard side** — set up the project, register the app, and obtain the public API key, through the RevenueCat MCP server or the `rc` CLI.
112. **App side** — install the Purchases SDK, call `Purchases.configure(…)` at app entry, and verify the configuration banner in the logs.
12
13Walk them in order. Most integrations need both halves, even when the user asks "just install the SDK" — the SDK needs an API key from the dashboard.
14
15> If a project + app already exist and the user only wants to wire the SDK into code, jump to **Section 3** below.
16> If the user wants to bootstrap a brand new RevenueCat project (apps + products + entitlements + offerings), use the `create-revenuecat-project` skill instead, then come back here for the SDK install.
17
18## Arguments
19
20Available as `$ARGUMENTS` when invoked as a slash command:
21
22- `platform` (optional): One of `ios`, `android`, `kmp`, `flutter`, `react-native`. If omitted, run the detection algorithm in Section 3a.
23- `app_identifier` (optional): Bundle ID (iOS) or package name (Android). If omitted, read it from the project files (`Info.plist`, `AndroidManifest.xml`, `app.json`, `pubspec.yaml`).
24- `project_name` (optional): Name of the RevenueCat project to use. If omitted, list projects (via MCP or `rc projects list`) and ask the user.
25
26## 1. Understand the status quo
27
28Before touching the dashboard, gather the facts:
29
30- **Platform target**: iOS / Apple App Store, Android / Google Play, or both. Inspect the working directory before asking — the detection algorithm in Section 3 makes this obvious for most projects.
31- **Technology**: native iOS (Swift), native Android (Kotlin / Java), React Native, Flutter, Kotlin Multiplatform. SDK list: https://www.revenuecat.com/docs/getting-started/installation.md.
32- **App identifier**: bundle ID (iOS), package name (Android). Pull from `Info.plist` / `AndroidManifest.xml` / `app.json` / `pubspec.yaml` rather than asking.
33
34## 2. Dashboard side
35
36Use whichever surface the user has available: the RevenueCat MCP server or the `rc` CLI (see the `revenuecat-cli` skill for CLI discovery and conventions). Both cover the same operations for these steps, and each step below notes the MCP tool and the `rc` command.
37
38### 2a. Get or create the project
39- List accessible projects: `list-projects` (MCP) or `rc projects list`. If multiple, ask the user which one matches this app, or offer to create a new one (`create-project` / `rc projects create`).
40- If there is no project, hand off to the `create-revenuecat-project` skill, then resume here.
41- Store the `project_id` for the rest of the steps.
42
43### 2b. Get or create the app
44- Check which apps are already configured in the project (`list-apps` / `rc apps list`). A `test_store` app is always present; `app_store` and `play_store` apps are present only if the user has finished store-side setup.
45- Ask the user whether their app is already set up in App Store Connect (iOS) or Google Play Console (Android). Reassure them that store-side setup can come later — the `test_store` app is enough to start integrating.
46- If the user confirms store-side setup is done, call `create-app` (or `rc apps create`):
47 - **iOS**: `type: "app_store"`, `bundle_id` from Section 1.
48 - **Android**: `type: "play_store"`, `package_name` from Section 1.
49 - `name` derived from the identifier or asked from the user.
50
51### 2c. Get the public API key
52- List public keys for the relevant app ID: `list-public-api-keys` (MCP) or `rc apps keys <app-id>`:
53 - `app_store` / `play_store` if the store-side app exists.
54 - Otherwise the `test_store` app.
55- The returned key is **public** and safe to embed in client app code. iOS keys are prefixed `appl_…`, Android keys `goog_…`, Amazon `amzn_…`.
56
57> **Never use the secret API key in client code.** Secret keys are server-side only.
58
59## 3. App side — install and configure the SDK
60
61### 3a. Detect the platform
62
63Inspect the working directory and pick the **first** match, from top to bottom:
64
651. **React Native**: `package.json` has a `react-native-purchases` entry, or `react-native` as a dependency → read `platforms/react-native.md`. If `expo` is also a dependency, note it as an Expo project.
662. **Flutter**: `pubspec.yaml` exists at the project root → read `platforms/flutter.md`.
673. **Kotlin Multiplatform**: `build.gradle.kts` contains a `kotlin { … }` multiplatform source sets block, or depends on `com.revenuecat.purchases:purchases-kmp*` → read `platforms/kmp.md`.
684. **Android (native)**: `build.gradle(.kts)` applies `com.android.application` (and is not KMP) → read `platforms/android.md`.
695. **iOS (native)**: `Package.swift`, `*.xcodeproj`, `*.xcworkspace`, or `Podfile` at the project root → read `platforms/ios.md`.
70
71If several match (e.g. an `ios/` folder inside a Flutter project), pick the **outermost** project, the one that owns the build. If still ambiguous, ask the user which platform they want to configure.
72
73### 3b. Shared concepts (all platforms)
74
75- **Public SDK key, not secret key.** RevenueCat issues a separate public SDK key per store/platform. iOS apps use an `appl_…` key, Android apps use a `goog_…` key (Amazon uses `amzn_…`). Server-side secret keys must never appear in client apps.
76- **Configure once per app launch.** Call `Purchases.configure(…)` exactly once, as early as possible (app entry point). Later calls no-op or warn.
77- **Anonymous users by default.** If you don't pass an `appUserID`, RevenueCat creates a stable anonymous ID. Only pass `appUserID` if you already have an authenticated user at launch; otherwise call `logIn(…)` later (see the `revenuecat-identify-user` skill).
78- **Enable debug logging during integration.** Each platform file shows how. Turn it off for release builds.
79- **Keep keys out of source control.** Recommend `.env` (RN), `xcconfig` (iOS), `local.properties` / `gradle.properties` (Android), or dart-define (Flutter) when the user asks about secret management.
80
81### 3c. Implementation
82
83Read the platform file that matches detection:
84
85- `platforms/ios.md`
86- `platforms/android.md`
87- `platforms/kmp.md`
88- `platforms/flutter.md`
89- `platforms/react-native.md`
90
91Each platform file is self-contained: install command, exact `configure` snippet, and where to place it in the app entry point.
92
93## 4. Verify
94
95Do not claim setup is complete until:
96
971. The project **builds** (Xcode build, `./gradlew assembleDebug`, `flutter run`, `npx react-native run-ios`, or the KMP equivalent).
982. The app launches and the RevenueCat SDK logs a configuration banner in the console / logcat / Metro output (each platform file describes the expected log line).
993. No authentication errors appear on the first SDK network call. A wrong API key surfaces as an auth error log as soon as the app fetches offerings.
100
101If the user only asked to "install" without running the app, tell them what to look for in the logs when they do run it.
102
103## 5. Next steps
104
105### 5a. Products, entitlements, offerings
106Check whether products, entitlements, and offerings are already set up in the project. If not, offer to help via the `create-revenuecat-project` skill.
107
108### 5b. Store-side setup
109
110**iOS (App Store Connect)**
111
1121. **In-App Purchase Key (recommended for StoreKit 2)** — App Store Connect → Users and Access → Integrations → In-App Purchase. Generate key, download the `.p8` file. Note the Key ID and Issuer ID.
1132. **Shared Secret (legacy StoreKit 1)** — App Store Connect → App → App Information → App-Specific Shared Secret.
1143. If the user provides this information, register it on the RevenueCat side via `create-app` / `update-app`.
115
116**Android (Google Play Console)**
117
1181. **Service account credentials** — Create a service account in Google Cloud Console. Grant "Service Account User" role. Create a JSON key. In Play Console, grant the service account access with "View financial data" permission.
1192. **Real-time Developer Notifications (RTDN)** — Set up a Cloud Pub/Sub topic. Configure in Play Console → Monetization setup.
1203. If the user provides this information, register it via `create-app` / `update-app`.
121
122### 5c. Subsequent skills
123
124Common follow-ups after `integrate-revenuecat`:
125
126- `revenuecat-paywall` — display a dashboard-configured paywall.
127- `revenuecat-purchase-flow` — implement purchase + restore manually.
128- `revenuecat-entitlements-gate` — gate features behind active entitlements.
129- `revenuecat-identify-user` — wire `logIn` / `logOut` to the app's auth system.
130- `revenuecat-testing-setup` — set up a sandbox testing channel.
131- `revenuecat-troubleshoot` — diagnose offerings / products / entitlement bugs.