## Summary - Native Capacitor: RevenueCat purchase/restore (`@revenuecat/purchases-capacitor`) - Web: Stripe checkout/portal unchanged - Billing history shows store rows (`provider` / `revenuecat_store`) - RC `logIn`/`logOut` on auth lifecycle; appUserID = user pk Closes #100. Depends on backend [chat_backend#68](ai_ml_operations/chat_backend#68) / monetization PR. ## Test plan - [x] Unit tests: BillingSection, revenueCat, finance helpers, SignIn/Up, AuthCallback, Header2, DeleteAccount (38 OK) - [ ] Fill `REACT_APP_REVENUECAT_*` keys in `.env.mobile` - [ ] Align RC offerings/products with plan slugs - [ ] `npm run build:mobile` + `cap sync`; sandbox purchase on Android/iOS - [ ] Confirm web Stripe checkout/portal still work - [ ] After RC webhook, Account → Billing history shows store invoiceReviewed-on: #102
This commit was merged in pull request #102.
This commit is contained in:
@@ -40,6 +40,20 @@ npm run android:sync
|
||||
|
||||
Default `.env.mobile` matches production (`chatbackend.aimloperations.com`). Point it at beta to flip the shell without touching web deploys. Optional gitignored override: `.env.mobile.local`.
|
||||
|
||||
### RevenueCat IAP (#100)
|
||||
|
||||
Native billing uses `@revenuecat/purchases-capacitor` (Capacitor 7 → package **11.x**). Web keeps Stripe Checkout / Customer Portal.
|
||||
|
||||
Set public SDK keys in `.env.mobile` (empty placeholders OK until store apps ship):
|
||||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| `REACT_APP_REVENUECAT_APPLE_API_KEY` | iOS public SDK key |
|
||||
| `REACT_APP_REVENUECAT_GOOGLE_API_KEY` | Android public SDK key |
|
||||
| `REACT_APP_REVENUECAT_OFFERING_ID` | Optional offering pin (else current) |
|
||||
|
||||
After install / key changes: `npm run build:mobile` (runs `cap sync`). More detail: [`MONETIZATION.md`](MONETIZATION.md).
|
||||
|
||||
## Versioning
|
||||
|
||||
In `android/app/build.gradle`:
|
||||
|
||||
Reference in New Issue
Block a user