Skip to content

Commit 43d7246

Browse files
joshdholtzclaude
andcommitted
docs(skill): register the paywall preview URL scheme
Native integrations must register the app's custom URL scheme and wire presentPaywall(from:)/previewPaywall so dashboard paywall previews open on device, per docs/tools/paywalls/testing-paywalls. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5da9ee2 commit 43d7246

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

  • revenuecat/skills/revenuecat-paywall

revenuecat/skills/revenuecat-paywall/SKILL.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,33 @@ Do not claim the integration is complete until:
5858
5. Closing the paywall without purchasing fires the dismiss / cancelled callback.
5959

6060
If the paywall shows the default fallback layout, run `rc offerings preview <app-id> --json --no-input`. A null `paywall_components` value means no published paywall is being served; publish the draft and retry.
61+
62+
## 5. Enable in-app paywall preview (custom URL scheme)
63+
64+
Wire up live paywall previews so dashboard edits can be opened directly on
65+
device (see https://www.revenuecat.com/docs/tools/paywalls/testing-paywalls).
66+
Do this for every native integration; hybrid SDK support is not yet available
67+
(check the doc before wiring Flutter/React Native).
68+
69+
Requires purchases-ios >= 5.80.0 or purchases-android >= 10.11.0.
70+
71+
1. Get the app's custom URL scheme from the RevenueCat dashboard: the app's
72+
settings page, "Custom URL Scheme" (unique per app). It is not available
73+
via the public API — this is a dashboard read; ask the user for the value
74+
if you cannot obtain it.
75+
2. Register the scheme like a Redemption Link scheme: iOS `CFBundleURLTypes`
76+
in Info.plist; Android an intent filter with the scheme on the launcher
77+
activity.
78+
3. Handle the link with the SDK API and let it no-op for unrelated URLs:
79+
80+
SwiftUI: `.onOpenURL { url in if Purchases.shared.presentPaywall(from: url) { return } /* other URL handling */ }`
81+
82+
UIKit (scene delegate): `if Purchases.shared.presentPaywall(from: url, scene: scene as? UIWindowScene) { return }`
83+
84+
Android: call a helper from `onCreate` and `onNewIntent`:
85+
`if (Purchases.sharedInstance.previewPaywall(intent, this)) return`
86+
87+
4. Verify: build, open the preview link from the dashboard's paywall editor
88+
(or `xcrun simctl openurl booted "<scheme>://..."` / `adb shell am start -a
89+
android.intent.action.VIEW -d "<scheme>://..."`), and confirm the paywall
90+
presents. Unrelated deep links must still reach the app's own handler.

0 commit comments

Comments
 (0)