Index of every page on this site: llms.txt
All skills
tristanmanchester avatar

/expo-revenuecat-superwall-integration

@3323bc9
Run it yourself

Integrate or repair RevenueCat and Superwall together in an Expo React Native app. Use for their shared purchase ownership, Android offer selection, billing identity, entitlement sync, restore, or migration flows; not for web billing or unrelated paywall providers.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/expo-revenuecat-superwall-integration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesidentity-and-restore-behaviour.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Identity and Restore Behaviour

This is the highest-risk part of a RevenueCat plus Superwall integration.

Core identity rules

Use the same stable business identity in both systems whenever the product has authentication.

Good identifiers:

  • UUID v4
  • stable internal opaque IDs
  • non-guessable backend-generated IDs

Bad identifiers:

  • email addresses
  • IDFA or device IDs
  • hardcoded strings
  • placeholder strings like guest, unknown, 0, or null

If the app already has numeric or human-readable legacy IDs, strongly consider adding a backend UUID mapping layer rather than sending raw legacy IDs everywhere.

RevenueCat identity model

Guest-first products

Recommended flow:

  1. configure RevenueCat without appUserID
  2. let RevenueCat create an anonymous App User ID
  3. when auth resolves, call Purchases.logIn(userId)

Use this when the product allows purchasing before account creation.

Login-first products

Recommended flow:

  1. resolve auth before configuring billing
  2. configure RevenueCat with a known appUserID
  3. do not call logOut() if the product never allows anonymous state

Use this when every purchase must belong to a real account.

Switching from one logged-in account to another

Use:

await Purchases.logIn(nextUserId);

Do not force a logOut() first. That just creates a temporary anonymous ID and adds unnecessary aliasing risk.

Logging out

Only call:

await Purchases.logOut();

when the product genuinely supports a guest state after logout.

If the product is custom-ID-only, do not log the SDK out. Wait until the next user logs in and then call logIn(nextUserId).

Superwall identity model

When auth resolves:

await identify(userId);

When signing out to guest state:

await signOut();

If users frequently reinstall or switch accounts and correct paywall assignments matter immediately, consider the restorePaywallAssignments option on identify. Use it deliberately because it changes paywall startup behaviour.

Restore behaviour in RevenueCat

RevenueCat restore behaviour is a dashboard-level policy. Pick it intentionally.

Default and usually recommended: Transfer to new App User ID

Use when:

  • the app is guest-first
  • login is optional
  • easy recovery matters more than strict account ownership
  • the team wants the least painful restore experience

Keep with original App User ID

Use only when:

  • every purchaser must have an account
  • purchases must never transfer across accounts
  • the support team can recover lost account ownership safely

This is stricter and can create support burden.

Important nuance with anonymous users

Anonymous users can be aliased with a known App User ID later. That can be good for guest-first products, but confusing for strict-account products.

Restores versus sync

restorePurchases()

Use only from an explicit user action such as a Restore Purchases button.

Reason:

  • it can trigger store account prompts
  • it is the user-facing restore path

syncPurchases()

Use only for intentional cases such as:

  • importing historical purchases during migration
  • syncing past subscriptions after login in observer mode
  • specific recovery flows

Do not run it on every launch.

Product-shape recommendations

Login required before purchase

  • configure RevenueCat with custom App User ID from the start
  • identify the same ID in Superwall
  • avoid anonymous sessions
  • consider whether Keep with original App User ID is worth the support cost

Login optional

  • allow anonymous state
  • logIn() when auth appears
  • keep default transfer behaviour unless the business has a strong reason not to

Guest-first purchase flow

  • anonymous configuration is normal
  • users will later alias into known accounts
  • make restore UX clear inside settings
  • support staff should know how aliases and restores behave

Support and debugging advice

  • show the current App User ID in app settings
  • keep both RevenueCat and Superwall user IDs visible in debug builds if possible
  • note the chosen restore-behaviour policy in the project README or team docs
  • if you rely on webhooks or server notifications, verify that the ID observed on the backend matches the intended business user

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The expo-revenuecat-superwall-integration skill is a professional integration guide for React Native Expo applications. It provides structured architectural choices, implementation playbooks, and a local validation script to ensure a secure and production-ready monetisation stack. The skill adheres to security best practices, such as using public API keys and avoiding PII for identifiers, and contains no malicious code or exfiltration patterns.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 3323bc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
metadata
{
  "version": "3.0.0",
  "reviewed": "2026-09-13"
}
Other metadata
compatibility
Expo development builds on iOS/Android, expo-superwall's current provider API, and react-native-purchases 9.7 or newer. Resolve native platform requirements from the installed Expo and SDK versions. Offline checks need Python 3.10+, Node.js, and TypeScript.

README badge

README badge for tristanmanchester/agent-skills/expo-revenuecat-superwall-integration