← RevenueCatCONTENT HISTORY

Update to RevenueCat

Snapshot Sep 30, 2026 · 23:10 UTC · version 2.3.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "revenuecat-entitlements-gate",
  "description": "Check whether a RevenueCat user currently has access to a paid feature via entitlements. Use when the user asks to gate a feature behind premium, check if the user has a pro subscription, read customerInfo active entitlements, show or hide a feature based on subscription status, react to entitlement changes, or 'is the user subscribed' on iOS, Android, Kotlin Multiplatform, Flutter, or React Native.",
  "included_files": [
    {
      "relative_path": "platforms/android.md",
      "size_in_bytes": 3393
    },
    {
      "relative_path": "platforms/flutter.md",
      "size_in_bytes": 2851
    },
    {
      "relative_path": "platforms/ios.md",
      "size_in_bytes": 2739
    },
    {
      "relative_path": "platforms/kmp.md",
      "size_in_bytes": 3858
    },
    {
      "relative_path": "platforms/react-native.md",
      "size_in_bytes": 2440
    }
  ],
  "skill_md_contents": "---\nname: revenuecat-entitlements-gate\ndescription: \"Check whether a RevenueCat user currently has access to a paid feature via entitlements. Use when the user asks to gate a feature behind premium, check if the user has a pro subscription, read customerInfo active entitlements, show or hide a feature based on subscription status, react to entitlement changes, or 'is the user subscribed' on iOS, Android, Kotlin Multiplatform, Flutter, or React Native.\"\n---\n\n# revenuecat-entitlements-gate: check a RevenueCat entitlement\n\nUse this skill when the user wants to decide whether to show or hide a feature based on an active RevenueCat entitlement. The skill covers the one shot check and the reactive listener; it does not cover purchasing (see `revenuecat-purchase-flow`) or auth (`revenuecat-identify-user`).\n\n## 1. Detect the platform\n\nInspect the working directory and pick the **first** match, from top to bottom:\n\n1. **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.\n2. **Flutter**: `pubspec.yaml` exists at the project root → read `platforms/flutter.md`.\n3. **Kotlin Multiplatform**: `build.gradle.kts` contains a `kotlin { … }` multiplatform source sets block, or depends on `com.revenuecat.purchases:purchases-kmp*` → read `platforms/kmp.md`.\n4. **Android (native)**: `build.gradle(.kts)` applies `com.android.application` (and is not KMP) → read `platforms/android.md`.\n5. **iOS (native)**: `Package.swift`, `*.xcodeproj`, `*.xcworkspace`, or `Podfile` at the project root → read `platforms/ios.md`.\n\nIf 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.\n\n## 2. Shared concepts (all platforms)\n\n- **Check the entitlement identifier, not the product ID.** The identifier (for example `\"premium\"`) is configured in the RevenueCat dashboard and mapped to one or more products. Using the entitlement lets you change products, prices, and stores without touching app code.\n- **`customerInfo.entitlements.active` is the source of truth.** It is a `Map<String, EntitlementInfo>` keyed by entitlement identifier. Presence in `active` means the user currently has access. Absence means they do not, regardless of past purchases.\n- **Do not gate on purchase history.** Expired subscriptions still appear in `customerInfo.entitlements.all` but drop out of `active`. Use `active` only.\n- **Fetch once, then subscribe.** The first `customerInfo` call returns a cached value quickly, and the SDK refreshes in the background. Every SDK exposes a listener or stream that fires when entitlements change (after a purchase, restore, renewal, or expiration). Subscribe to that instead of polling.\n- **The SDK must be configured first.** If `Purchases.configure(…)` has not run, the entitlement call will fail. Set up the SDK via `integrate-revenuecat` before using this skill.\n\n## 3. Implementation\n\nRead the platform file that matches detection:\n\n- `platforms/ios.md`\n- `platforms/android.md`\n- `platforms/kmp.md`\n- `platforms/flutter.md`\n- `platforms/react-native.md`\n\nEach platform file shows the one shot check, the reactive subscription, and where to place each in a typical app.\n\n## 4. Verify\n\nDo not claim the gate works until:\n\n1. A user with an active entitlement sees the gated feature, and a user without it does not.\n2. When the entitlement state changes (test with a sandbox purchase or a manual grant in the dashboard), the UI updates without a manual restart, confirming the listener is wired.\n3. The entitlement identifier in the code matches an identifier that exists in the RevenueCat dashboard. A typo here silently gates everyone out.\n"
}

SHA-256: 3d82298890bfe5ad4206ccbea59a4b9c5c460aa50f43df113d994df848736852