Repository navigation
Conversation
PurchasesManager wraps the RevenueCat SDK (Google Play Billing): the pro entitlement, the monthly and annual packages of the current offering with their store prices, purchase and restore. The signed-in user id is the RevenueCat app user id. With REVENUECAT_API_KEY unset the app keeps the browser checkout and behaves as before. Add a revenuecat-webhook function and migration so the purchase reaches profiles.subscription_status, and keep an AppSumo deactivation from downgrading an account with an active store subscription. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AyApq9dpwrhoZtdTSEz7B4
Adds the RevenueCat SDK to the iOS app target only. PurchasesManager stays inert without REVENUECAT_API_KEY and ignores a Test Store key outside DEBUG. An active pro entitlement counts as paid in SubscriptionManager for signed-in and anonymous users. Settings > Account gets Upgrade to Pro, Manage Subscription and Restore Purchases; a word-limit block presents the paywall. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Move to RevenueCat 11.3.0 and add purchases-ui. The SDK needs Kotlin 2.2, which brings KSP2, so Kotlin goes to 2.2.21, KSP to 2.2.21-2.0.5, Room to 2.7.2 and Hilt to 2.57.2 (the older Room and Hilt fail under KSP2), and the Compose BOM to 2026.06.01. Add the Lifetime plan next to Monthly and Annual: the offering's lifetime package, a one-time purchase, shown on the onboarding paywall once the store has priced it. Packages come from the offering's standard slots, falling back to the monthly, yearly and lifetime product ids. Settings "Upgrade to Pro" and a dictation blocked by the word limit open the RevenueCat paywall, gated on the pro entitlement. Settings shows "Manage purchase" (Customer Center) when the store entitlement is active. Release builds drop a Test Store key (test_...) and keep the browser checkout; verifyReleaseRevenueCatKey fails the build if one gets through. The webhook records the one-time Lifetime purchase as lifetime, and a later subscription expiry or an AppSumo deactivation no longer downgrades it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Remove Lifetime from the plan model, the onboarding paywall and the store package lookup, and take the lifetime handling back out of the RevenueCat and AppSumo webhooks. The Settings row for Customer Center is "Manage subscription" again. A purchase the store accepted but that could not be confirmed over the network no longer says "You have not been charged": it reports that the purchase is unconfirmed and unlocks once it goes through. Fix three resource lookups that the newer Compose lint rejects, which failed the CI lint step after the Compose BOM bump. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Tapping the mic on the "Try it now" step showed the processing pill while the microphone opened. The demo now has a starting state that looks like listening, so a tap goes from waiting to listening with nothing between. The rating step shows five stars instead of one, which read as a one-star score, and asks for the rating as a question. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Messages that sat under the button (the permissions hint such as "All set.", the paywall terms) pushed it up on those steps. They now sit above the button, and the space under it is a fixed slot that holds the secondary action where a step has one, so the button no longer moves between steps. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The paywall leaves the step list once the account is Pro, so a purchase made on it dropped the user back on the previous step, the rating page. A purchase on the paywall now ends onboarding. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Settings showed "Upgrade to Pro" and "Restore purchases" only to signed-in users, which was right for the browser checkout but left a trial user who skipped the onboarding paywall with no way to buy once Pro is sold in the app. A store purchase needs no account, so both rows now show to a signed-out user when Pro is sold in the app. The browser checkout still asks for sign-in first. The rules for which Account rows appear are a pure function with tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Lifetime is no longer sold, but accounts that have it stay paid. The paywall request now also checks the account plan, and two tests pin that a lifetime plan stays paid, unlimited and named Lifetime. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A RevenueCat key alone switched the app to in-app selling, so a key set before the Play products exist (or offerings that fail to load) would leave no way to buy: the browser checkout was off and the store had nothing. The app now sells in the app only when the current offering holds at least one purchasable plan. Until then onboarding, Settings and the word-limit block behave exactly as with no key. A failed offerings load is retried. An existing store purchase stays manageable either way. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch was successfully deployed
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.
What
Moves payments into the apps with RevenueCat. Android and iOS.
Android
purchasesandpurchases-ui). The SDK needs Kotlin 2.2, which brings KSP2, so the toolchain moved: Kotlin 2.2.21, KSP 2.2.21-2.0.5, Room 2.7.2, Hilt 2.57.2, Compose BOM 2026.06.01. Room 2.6.1 and Hilt 2.52 fail under KSP2; nothing else was bumped.PurchasesManager: theproentitlement, the current offering's Monthly and Annual packages with store prices, purchase, restore, and login with the account user id. Packages come from the offering's standard slots, falling back to themonthlyandyearlyproduct ids.PaywallDialog, gated onpro). A block in the floating mic opens the app with the paywall.test_...) at build time and keep the browser checkout;verifyReleaseRevenueCatKeyfails the build if one reaches the releaseBuildConfig. The app also ignores such a key at runtime outside debuggable builds.supabase/functions/revenuecat-webhookand a migration write a subscription toprofiles.subscription_status; an AppSumo deactivation does not downgrade an account with an active store subscription.REVENUECAT_ANDROID_API_KEYsecret through asREVENUECAT_API_KEY. No key is committed.Android: verified
./gradlew testDebugUnitTest(141 tests) and:app:assembleDebugpass with the Test Store key set and with it blank.:app:lintDebugpasses.With the Test Store key set, the release
BuildConfigkey is empty; the release-variant key test passes.On the Pixel 6 API 33 emulator, debug build, Test Store key: the onboarding paywall loaded the offering with store prices; a simulated Test Store purchase unlocked Pro (the paywall step dropped out, Settings showed "Unlimited words"); Customer Center opened and listed the purchase. That purchase was of the Lifetime product, made before Lifetime was removed from the app; Monthly and Annual use the same purchase path but were not bought.
On a Pixel 10 Pro, debug build, Test Store key: after "Continue with the trial", Settings showed "Upgrade to Pro", "Restore purchases" and "Continue with Google"; dictation transcribed.
Android: not verified
monthlyandyearlyPlay subscriptions, and thegoog_key as theREVENUECAT_ANDROID_API_KEYsecret.aidictation.comis not in this repository.Needed before turning Android on
profileslives, withREVENUECAT_WEBHOOK_AUTHset and the same value in RevenueCat's webhook Authorization header.Inert until configured
With
REVENUECAT_API_KEYunset (the case today) the Android app keeps the browser checkout. The toolchain bump applies either way.iOS
purchases-ios-spm5.103.0 (RevenueCat,RevenueCatUI) linked to the WhisperMateIOS app target only.PurchasesManagerconfigures fromREVENUECAT_API_KEYinSecrets.plist, stays inert without it, and ignores atest_key outside DEBUG so a Test Store key cannot crash a shipped build. It followscustomerInfoStreamfor theproentitlement, logs RevenueCat in with the accountuser_id(lowercased) on sign-in and out on sign-out, and restores purchases.SubscriptionManager(shared) treats an active store entitlement as Pro for signed-in and anonymous users. The flag is persisted in the app group, so the keyboard extension can read it; no RevenueCat import inWhisperMateShared.PaywallViewin a sheet), "Manage Subscription" (Customer Center) once the entitlement is active, "Restore Purchases". A word-limit block now presents the paywall as well as the text reason.lifetimepackage was removed from thedefaultoffering in RevenueCat, which now holds Monthly and Yearly only. An account whose plan is alreadylifetimestays paid, shows "Lifetime" in Settings, and gets no Upgrade row and no paywall.ios-appstore-connect.ymlpasses an optionalREVENUECAT_API_KEYsecret into the generatedSecrets.plist. It is not in the required list, so builds without it are unchanged.iOS: verified in the Simulator (Test Store key, DEBUG)
lifetimeplan stays paid, unlimited and named "Lifetime".iOS: not verified
yearly($84.99, 1 year) andmonthly($8.49, 1 month), available in all 175 regions at Apple's auto-converted prices, with English (U.S.) names, review notes and a paywall screenshot. Both are "Prepare for Submission"; nothing was added for review. No trial, no lifetime.proor the offering, there is noappl_key, and no sandbox purchase was made.appl_key as theREVENUECAT_API_KEYsecret.Generated by Claude Code
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.