Repository navigation
fix(skills): Android and KMP snippets that do not compile - #66
Merged
Merged
Conversation
- purchase-flow: Package lives in com.revenuecat.purchases, not com.revenuecat.purchases.models, and there is no alias, so both imports failed. - paywall: PaywallResultHandler is a plain Kotlin interface extending ActivityResultCallback, not a fun interface, so the lambda form has no constructor. An object expression with onActivityResult compiles. - entitlements-gate: the seeding snippet wrote the private _hasPremium from outside the object. A refresh() member keeps the state private and gives callers one entry point. It catches PurchasesException rather than using runCatching, so coroutine cancellation still propagates, and it logs the error so a failed refresh is not silent. Checked against the purchases-android and purchases-ui API dumps and by compiling the snippets against purchases and purchases-ui 10.23.4.
- migrate: PurchasesAreCompletedBy in KMP is a sealed type with MyApp(storeKitVersion) and RevenueCat. MY_APP is the native Android enum and does not exist in KMP, and the kmp. import is a deprecated alias. - customer-center: Purchases has no customerInfo() function in KMP. The coroutine call is awaitCustomerInfo() from the ktx package. - paywall: the KMP builder exposes shouldDisplayDismissButton as a property, and Kotlin cannot call its setter by name. The skill pointed KMP users at the Android setShouldDisplayDismissButton. The paywall imports also move off the deprecated kmp. aliases to the models package. Checked against the purchases-kmp 3.10.1 klib API dumps and sources.
nihalgonsalves
approved these changes
Oct 26, 2026
skydoves
added a commit
that referenced
this pull request
Oct 28, 2026
#66 landed on main as a squash of this branch's first two commits, so those hunks merge cleanly. The one conflict is troubleshoot step 6, where #64 kept "Setup -> License testing" and "not sideloaded". This branch's point is that the menu is now Settings -> License testing and that an opted-in license tester can test sideloaded builds, matching the Android checklist below it and the platform files, so the branch side wins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
These Android and KMP snippets do not compile against the current SDKs.
Description
Packageimport,PaywallResultHandlerobject, private state in entitlements-gatePurchasesAreCompletedBy.MyApp,awaitCustomerInfo,shouldDisplayDismissButton, models package importsThe Android snippets compile against purchases and purchases-ui 10.23.4. KMP is checked against the purchases-kmp 3.10.1 API dumps. The
rc-*fixes land in RevenueCat/play-billing-skills and arrive here through the sync.Note
Low Risk
Documentation-only changes to skill markdown; no runtime or SDK code is modified.
Overview
Updates RevenueCat skill docs so Android and KMP copy-paste snippets match current SDK APIs (Android purchases / purchases-ui 10.23.4, KMP 3.10.1).
Android:
Packageimports usecom.revenuecat.purchases.Packageinstead ofmodels.Package. Paywall activity samples implementPaywallResultHandlerwith an explicitonActivityResultoverride (not a SAM lambda). The entitlements-gate reactive example adds a publicrefresh()that callsawaitCustomerInfo()and logsPurchasesException, replacing startup code that reached into private_hasPremium.KMP: Observer-mode migration docs use
PurchasesAreCompletedBy.MyApp(StoreKitVersion.STOREKIT_2)fromkmp.models, with a note that the type is sealed. Paywall/customer-center snippets importCustomerInfo,Package, and related types fromkmp.models; verification usesawaitCustomerInfo()fromkmp.ktx. Shared paywall guidance documents KMP dismiss asshouldDisplayDismissButton = true(separate from Android’s setter).Reviewed by Cursor Bugbot for commit e8b6e50. Bugbot is set up for automated code reviews on this repo. Configure here.