RevenueeCat UIのSDK(ソフトウェア開発キット)を使用して、アプリ内にRevenueCatペイウォール(有料機能へのアクセスを制限する画面)を表示します。 **次のような場合に使用:** - ペイウォールの追加をユーザーが希望する - RevenueCatペイウォールを表示する必要がある - PaywallViewを表示する - RevenueCatUIを統合する - プレミアム画面をペイウォールで保護する - PaywallActivityを起動する - presentPaywallまたはpresentPaywallIfNeededを呼び出す - iOS、Android、Kotlin Multiplatform、Flutter、React Nativeで、ダッシュボードに設定済みのペイウォールUIを表示する ダッシュボード内でペイウォール自体を作成、編集、評価、または監査する場合は、「revenuecat-paywall-design」を使用してください。
Display a RevenueCat paywall inside an app using the RevenueCatUI SDK. Use when the user asks to add a paywall, show a RevenueCat paywall, present PaywallView, integrate RevenueCatUI, gate a premium screen with a paywall, launch PaywallActivity, call presentPaywall or presentPaywallIfNeeded, or show the dashboard configured paywall UI on iOS, Android, Kotlin Multiplatform, Flutter, or React Native. To create, edit, evaluate, or audit the dashboard paywall itself, use revenuecat-paywall-design.
次のような場合に使用: ユーザーに、RevenueCat ダッシュボードで構築・設定したペイウォール(購入画面)を表示したい場合。RevenueCat の公式 UI コンポーネントを使用します。このスキルはカスタムペイウォールをゼロから構築することは対象外です。その場合は、代わりに revenuecat-purchase-flow(利用可能な場合)と Purchases.getOfferings(…) を直接使用してください。ダッシュボードのペイウォール設定を作成・編集・評価・監査する場合は、revenuecat-paywall-design を使用してください。
前提条件: integrate-revenuecat がすでに実行されていること。Purchases.configure(…) が成功していないと、ペイウォールが読み込まれません。
作業ディレクトリを確認し、上から順に最初に一致したものを選択します:
package.json に react-native-purchases エントリがあるか、react-native が依存関係に含まれている。ペイウォールパッケージは react-native-purchases-ui。platforms/react-native.md を読んでください。expo も依存関係にある場合は、Expo プロジェクトとして扱われます。pubspec.yaml が存在する。ペイウォールパッケージは purchases_ui_flutter。platforms/flutter.md を読んでください。build.gradle.kts に kotlin { … } マルチプラットフォーム設定ブロックがあるか、com.revenuecat.purchases:purchases-kmp* に依存している。ペイウォールモジュールは purchases-kmp-ui。platforms/kmp.md を読んでください。build.gradle(.kts) が com.android.application を適用している(KMP ではない場合)。ペイウォール依存関係は com.revenuecat.purchases:purchases-ui。platforms/android.md を読んでください。Package.swift、*.xcodeproj、*.xcworkspace、または Podfile が存在する。ペイウォール製品は RevenueCatUI。platforms/ios.md を読んでください。複数マッチした場合(例:Flutter プロジェクト内に ios/ フォルダがある場合)は、ビルドを管理している最も外側のプロジェクトを選択してください。それでも判断できない場合は、ユーザーにどのプラットフォームを設定したいのか確認してください。
getOfferings() を通じてオファリングを取得します。ペイウォール設定がされたオファリングがない場合、RevenueCatUI はデフォルトペイウォールレイアウトにフォールバック(代替)しますが、本番環境ではこれは望ましくありません。"premium" または "pro")を通じてアクセス権が与えられます。プレミアム機能は利用権に基づいてゲート制御し、オファリングに基づいて制御してはいけません。Purchases.purchase(…) を手動で呼び出さないでください。ペイウォールが内部的に呼び出します。アプリコード内で反応させるために、ペイウォール終了時・購入完了時のコールバックをリッスン(監視)してください。displayCloseButton = true(iOS / Flutter / React Native)または setShouldDisplayDismissButton(true)(Android / Kotlin Multiplatform)を渡してください。シートが独自のグラバー(スワイプして閉じるハンドル)を持つ場合や、ペイウォールをナビゲーションコントローラー内にラップする場合は、この設定をスキップしてください。Purchases.getOfferings() を呼び出し、独自のコンポーネントでレンダリングしてください。RevenueCatUI はダッシュボードテンプレート型ペイウォール専用です。検出されたプラットフォームに対応するファイルを読んでください:
platforms/ios.mdplatforms/android.mdplatforms/kmp.mdplatforms/flutter.mdplatforms/react-native.md各プラットフォームファイルは完全に独立しています:インストールコマンド、ペイウォール表示の正確なコード例、リッスンするコールバック形式が記載されています。
以下の項目が完了するまで、統合が完了したと判断しないでください:
PURCHASED 結果で解決される)。ペイウォールがカスタムテンプレートではなくデフォルトフォールバックレイアウトを表示している場合は、ダッシュボードのオファリングにペイウォール設定が付属されていません。ダッシュボードで修正してから、再度試してください。
Use this skill when the user wants to show a paywall that is built and configured in the RevenueCat dashboard, using the native RevenueCatUI components. This skill does not cover building a custom paywall from scratch. For that, use revenuecat-purchase-flow (when available) and Purchases.getOfferings(…) directly. To create, edit, evaluate, or audit the dashboard paywall, use revenuecat-paywall-design.
Prerequisite: integrate-revenuecat has already run. Purchases.configure(…) must succeed before a paywall can load.
Inspect the working directory and pick the first match, from top to bottom:
package.json has a react-native-purchases entry, or react-native as a dependency. react-native-purchases-ui is the paywall package. Read platforms/react-native.md. If expo is also a dependency, note it as an Expo project.pubspec.yaml exists at the project root. The paywall package is purchases_ui_flutter. Read platforms/flutter.md.build.gradle.kts contains a kotlin { … } multiplatform source sets block, or depends on com.revenuecat.purchases:purchases-kmp*. The paywall module is purchases-kmp-ui. Read platforms/kmp.md.build.gradle(.kts) applies com.android.application (and is not KMP). The paywall dependency is com.revenuecat.purchases:purchases-ui. Read platforms/android.md.Package.swift, *.xcodeproj, *.xcworkspace, or Podfile at the project root. The paywall product is RevenueCatUI. 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.
getOfferings(). If no offering has a paywall configured, RevenueCatUI falls back to a default paywall layout, which is not what you want in production."premium" or "pro"). Gate premium features on the entitlement, not on the offering.Purchases.purchase(…) manually alongside a RevenueCatUI paywall. The paywall calls it internally. Listen for the dismiss or purchase completed callback to react in app code.displayCloseButton = true (iOS / Flutter / RN) or setShouldDisplayDismissButton(true) (Android / KMP) when the paywall is presented modally and the user needs a way out. Skip it when presenting behind a sheet with its own grabber, or when wrapping the paywall in a navigation controller.Purchases.getOfferings() and render your own components. RevenueCatUI is only for dashboard templated paywalls.Read the platform file that matches detection:
platforms/ios.mdplatforms/android.mdplatforms/kmp.mdplatforms/flutter.mdplatforms/react-native.mdEach platform file is self contained: install command, exact snippet to present the paywall, and the callback shape you listen to.
Do not claim the integration is complete until:
PURCHASED result).If the paywall shows the default fallback layout instead of your template, the offering does not have a paywall attached in the dashboard. Fix this in the dashboard, then retry.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。