last update
Jun 2, 2026
license
MITv1.0.0
format
SKILL.md
- Install
// Downloads SKILL.md into ~/.claude/skills/ios-revenuecat-iap/
$ curl -fsSL --create-dirs -o ~/.claude/skills/ios-revenuecat-iap/SKILL.md https://claudeskil.com/skills/ios-revenuecat-iap/SKILL.md - Invoke
// Inside Claude Code, type the skill name as a slash command
> /ios-revenuecat-iap help me ship this - Or just ask
// Claude loads the skill by itself when a request matches its description
> help me ship this
- name:
- iOS RevenueCat IAP
- slug:
- ios-revenuecat-iap
- version:
- v1.0.0
- license:
- MIT
- author:
- @chiragthummar16
- categories:
- tags:
- #revenuecat#iap#subscriptions#paywall#storekit
- description:
Subscriptions and IAP with RevenueCat — entitlements, paywalls, attribution, App Store + Play Store.
// What you can do with it
- Offerings & Packages — fetched via Purchases.shared.offerings(), reading current.availablePackages so pricing/products are controlled from the dashboard, not hard-coded.
- Entitlements — gating with customerInfo.entitlements.active["pro"]?.isActive and listening through the PurchasesDelegate / customerInfoStream.
- Paywalls — drops in RevenueCatUI's PaywallView and .presentPaywallIfNeeded(requiredEntitlementIdentifier:), backed by remotely-configured templates.
- Purchase & restore — purchase(package:) and restorePurchases() with userCancelled handling.
- Server side — App Store Server Notifications V2 forwarded to RevenueCat, plus webhook handlers and refund handling via the Customer Info / REST API.
- Attribution — Purchases.shared.attribution.setAttributes(...), enableAdServicesAttributionTokenCollection() for Apple Search Ads, and Meta via setFBAnonymousID / collectDeviceIdentifiers.
README.md
iOS RevenueCat IAP
Production-grade in-app purchase and subscription setup for iOS apps using RevenueCat. This skill scaffolds the purchases-ios SDK, wires up Offerings, entitlements, and paywalls, and handles the operational edges most teams hit late: restore flows, server notifications, refunds, and ad-network attribution. It's aimed at iOS engineers (and the marketers who depend on their LTV numbers) who want a subscription stack that survives App Review and real-world edge cases.
When to use it
- You're adding a paywall and don't want to hand-roll StoreKit 2 transaction handling.
- You need entitlement checks that work the same offline, after reinstall, and across devices.
- Sandbox purchases work but production restores, refunds, or renewals behave inconsistently.
- You're spending on Apple Search Ads or Meta and need install-to-subscription attribution that ties back to a
Purchasesapp user ID.
What it does
It configures the SDK with Purchases.configure(withAPIKey:appUserID:), then sets up:
- Offerings & Packages — fetched via
Purchases.shared.offerings(), readingcurrent.availablePackagesso pricing/products are controlled from the dashboard, not hard-coded. - Entitlements — gating with
customerInfo.entitlements.active["pro"]?.isActiveand listening through thePurchasesDelegate/customerInfoStream. - Paywalls — drops in RevenueCatUI's
PaywallViewand.presentPaywallIfNeeded(requiredEntitlementIdentifier:), backed by remotely-configured templates. - Purchase & restore —
purchase(package:)andrestorePurchases()withuserCancelledhandling. - Server side — App Store Server Notifications V2 forwarded to RevenueCat, plus webhook handlers and refund handling via the Customer Info / REST API.
- Attribution —
Purchases.shared.attribution.setAttributes(...),enableAdServicesAttributionTokenCollection()for Apple Search Ads, and Meta viasetFBAnonymousID/ collectDeviceIdentifiers.
Usage example
curl -fsSL --create-dirs -o ~/.claude/skills/ios-revenuecat-iap/SKILL.md https://claudeskil.com/skills/ios-revenuecat-iap/SKILL.md
// AppDelegate / App init
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "appl_xxx")
// Show paywall only if not entitled
.presentPaywallIfNeeded(requiredEntitlementIdentifier: "pro")
// Manual purchase
let offerings = try await Purchases.shared.offerings()
if let pkg = offerings.current?.availablePackages.first {
let result = try await Purchases.shared.purchase(package: pkg)
if result.customerInfo.entitlements["pro"]?.isActive == true { unlock() }
}
Tips & gotchas
- Check entitlement identifiers, never raw product IDs — products change, entitlements stay stable across plan migrations and platforms.
- Call
restorePurchases()from an explicit button; App Review rejects paywalls without a visible restore path. - Set the
appUserIDto your own stable user ID at login, or you'll fragment subscriber records across anonymous IDs. UselogIn/logOut, not reconfigure. - Configure App Store Server Notifications V2 in App Store Connect pointing at RevenueCat — without it, renewal/refund state lags.
FAQ
Does this use StoreKit 2? Yes — recent purchases-ios runs on StoreKit 2 by default with a StoreKit 1 fallback; you don't manage Transaction listeners yourself.
Can I A/B test pricing? Yes, through Offerings and dashboard Experiments — swap the current offering remotely without an app release.
Refunds? Apple refund decisions arrive via server notifications; the skill wires a webhook so entitlements revoke automatically.
$ cat reviews/