Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rc-configuring-the-sdk

БесплатноБез исполняемых скриптовНе проверен

Use this skill when adding and configuring the RevenueCat Android SDK (purchases-android, artifact com.revenuecat.purchases:purchases) in an app. Covers the…

RevenueCatот RevenueCat★ 80 звёзд на GitHub

Об этом скилле

Configuring the RevenueCat Android SDK

Use this skill to add and configure RevenueCat (com.revenuecat.purchases:purchases) in an Android app. A single Purchases.configure call replaces BillingClient setup, connection lifecycle management, reconnection handling, and launch-time purchase queries.

Work through the phases in order. The full chapter on revenuecat.com has the complete reference text.

Phase 1: Discovery

Find out whether RevenueCat is already wired up and where billing code currently lives.

  1. Search for an existing configure call and prior SDK version.

    rg -n "Purchases\.configure|PurchasesConfiguration" --type kotlin --type java
    rg -n "com\.revenuecat\.purchases" -g '*.gradle*' -g '*.toml'
    
  2. Search for the existing billing surface you may be replacing.

    rg -n "BillingClient|PurchasesUpdatedListener|startConnection" --type kotlin --type java
    
  3. Record answers before moving on.

Question Where to look
Is Purchases.configure already called? App startup, Application.onCreate, main Activity.onCreate
Which module owns billing today? app/build.gradle(.kts), any :billing module
Is there an auth system with a stable user id? Login flow, session store
Debug vs release build detection available? BuildConfig.DEBUG

If Purchases.configure already runs, stop and confirm with the user before changing it. Configuration runs once per process.

Phase 2: Plan

Decide three things before writing code.

2.1 Where to call configure

Location When to choose
Application.onCreate Default. Ensures the SDK is ready before any Activity or background work touches purchases.
First Activity.onCreate Only if the app has no custom Application class and you are not willing to add one.

Call configure exactly once per process. Calling it from an Activity risks re-running it on configuration changes if you are not careful; the Application path avoids that.

2.2 App user id strategy

Strategy Pass to appUserID Use when
Anonymous null Users can purchase before signing in, or you have no auth. Later call Purchases.sharedInstance.logIn(id) to merge history.
Known user Your stable backend id (for example "user_12345") Users are always authenticated before purchase.

Do not pass device ids, email addresses, or values that can change. If you do not have the id at startup, configure anonymously and call logIn after authentication.

2.3 Log level

Build Log level
Debug LogLevel.DEBUG or VERBOSE while integrating
Release LogLevel.INFO (default) or WARN

Switch on BuildConfig.DEBUG so production builds stay quiet.

Phase 3: Execute

3.1 Add the Gradle dependency

In the app module build.gradle.kts:

dependencies {
    implementation("com.revenuecat.purchases:purchases:<latest>")
}

Replace <latest> with the current published version. If the project uses a Groovy build.gradle, use implementation 'com.revenuecat.purchases:purchases:<latest>'. Sync Gradle after the change.

Use 11.3.0 or newer (latest as of 2026-11-16). Earlier 11.x releases can leave calls such as getOfferings() hanging when the Play Billing connection stalls; 11.3.0 fails them with StoreProblemError after 10 seconds instead (an app held on 10.x gets the same fix in 10.30.3). It requires minSdk 23, compileSdk 35 or higher in the app and in every module that depends on it, and Kotlin 2.1.0 or newer. Below those, the build fails at checkDebugAarMetadata (androidx.core 1.15.0 requires compileSdk 35) or with "Module was compiled with an incompatible version of Kotlin". It exposes Play Billing Library 9.1.0 as an api dependency, so 9.1.0 is on the app's compile classpath. A Billing dependency the app declares itself must be 9.0.0 or later, and billing-ktx 9.x needs Kotlin 2.2 or newer. App code that still uses SkuDetails, SkuDetailsParams, SkuDetailsResponseListener, BillingClient.SkuType, QueryPurchaseHistoryParams, or BillingFlowParams.Builder.setSkuDetails stops compiling; move it to ProductDetails and apply the other Billing 9 changes first (see google-play/pbl-v8-to-v9-migration).

If Phase 1 finds an existing purchases dependency on 8.x or older (Play Billing Library 7 or older), upgrade it: Play stopped accepting app updates built on Play Billing Library 7 after August 31, 2026 (November 1, 2026 with an extension). 9.x and 10.x use Play Billing Library 8, which Play accepts in new apps and updates until August 31, 2027 (November 1, 2027 with an extension). Moving from 10.x to 11.x leaves the RevenueCat API unchanged, but it is more than a version bump. Besides the build floors above, a Play Store the system blocks (for example an OEM kids mode) now fails with `Purchas

Полный SKILL.md на GitHub

Установить rc-configuring-the-sdk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл rc-configuring-the-sdk?

Use this skill when adding and configuring the RevenueCat Android SDK (purchases-android, artifact com.revenuecat.purchases:purchases) in an app. Covers the Gradle dependency, Purchases.configure with PurchasesConfiguration, initial app user id strategy, and log level.

Как установить скилл rc-configuring-the-sdk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rc-configuring-the-sdk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rc-configuring-the-sdk с