iOS 4.21.0

New Features Offline Entitlements: use offline-computed CustomerInfo when server is down (#2368) via NachoSoto (@NachoSoto) Bugfixes AppleReceipt.debugDescription: don't pretty-print JSON (#2564) via NachoSoto (@NachoSoto) SK2StoreProduct: fix crash on iOS 12 (#2565) via NachoSoto (@NachoSoto) GetCustomerInfo posts receipts if there are pending transactions (#2533) via NachoSoto (@NachoSoto) Performance Improvements PurchasedProductsFetcher: cache current entitlements (#2507) via NachoSoto (@NachoSoto) Performance: new check to ensure serialization / deserialization is done from background thread (#2496) via NachoSoto (@NachoSoto) Dependency Updates Bump fastlane from 2.212.2 to 2.213.0 (#2544) via dependabot[bot] (@dependabot[bot]) Other Changes CustomerInfoManager: post all unfinished transactions (#2563) via NachoSoto (@NachoSoto) PostReceiptOperation: added ability to also post AdServices token (#2566) via NachoSoto (@NachoSoto) Offline Entitlements: improved computation log (#2562) via NachoSoto (@NachoSoto) Added TransactionPoster tests (#2557) via NachoSoto (@NachoSoto) Refactored TransactionPoster: removed 2 dependencies and abstracted parameters (#2542) via NachoSoto (@NachoSoto) CustomerInfoManagerTests: wait for getAndCacheCustomerInfo to finish (#2555) via NachoSoto (@NachoSoto) StoreTransaction: implemented description (#2556) via NachoSoto (@NachoSoto) Backend.ResponseHandler is now @Sendable (#2541) via NachoSoto (@NachoSoto) Extracted TransactionPoster from PurchasesOrchestrator (#2540) via NachoSoto (@NachoSoto) enableAdServicesAttributionTokenCollection: added integration test (#2551) via NachoSoto (@NachoSoto) AttributionPoster: replaced hardcoded strings with constants (#2548) via NachoSoto (@NachoSoto) DefaultDecodable: moved to Misc/Codable/DefaultDecodable.swift (#2528) via NachoSoto (@NachoSoto) CircleCI: specify device to run backend_integration_tests (#2547) via NachoSoto (@NachoSoto) Created StoreKit2TransactionFetcher (#2539) via NachoSoto (@NachoSoto) Fix load shedder integration tests (#2546) via Josh Holtz (@joshdholtz) Fix doc on Offering.getMetadataValue (#2545) via Josh Holtz (@joshdholtz) Extracted and tested AsyncSequence.extractValues (#2538) via NachoSoto (@NachoSoto) Offline Entitlements: don't compute offline CustomerInfo when purchasing a consumable products (#2522) via NachoSoto (@NachoSoto) OfflineEntitlementsManager: disable offline CustomerInfo in observer mode (#2520) via NachoSoto (@NachoSoto) BasePurchasesTests: fixed leak detection (#2534) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI: added ProxyView to iOS (#2531) via NachoSoto (@NachoSoto) PurchasedProductsFetcher: removed AppStore.sync call (#2521) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI: added new window on Mac to manage proxy (#2518) via NachoSoto (@NachoSoto) PurchasedProductsFetcher: added log if fetching purchased products is slow (#2515) via NachoSoto (@NachoSoto) Offline Entitlements: disable for custom entitlements mode (#2509) via NachoSoto (@NachoSoto) Offline Entitlements: fixed iOS 12 tests (#2514) via NachoSoto (@NachoSoto) PurchasedProductsFetcher: don't throw errors if purchased products were found (#2506) via NachoSoto (@NachoSoto) Offline Entitlements: allow creating offline CustomerInfo with empty ProductEntitlementMapping (#2504) via NachoSoto (@NachoSoto) Offline Entitlements: integration tests (#2501) via NachoSoto (@NachoSoto) CustomerInfoManager: don't cache offline CustomerInfo (#2378) via NachoSoto (@NachoSoto) DangerousSettings: debug-only forceServerErrors (#2486) via NachoSoto (@NachoSoto) CocoapodsInstallation: fixed Xcode 14.3.0 issue (#2489) via NachoSoto (@NachoSoto) CarthageInstallation: removed workaround (#2488) via NachoSoto (@NachoSoto) To view new release, visit https://github.com/RevenueCat/purchases-ios/releases/tag/4.21.0

Cordova 4.0.0-alpha.1

The first alpha of RevenueCat Purchases Cordova v4 is here!! 😻 This latest release updates the Android SDK dependency from v5 to v6 to use BillingClient 5. This version of BillingClient brings an entire new subscription model which has resulted in large changes across the entire SDK. Migration Guides See Android Native - 5.x to 6.x Migration for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it in V6. This guide includes tips on product setup with the new model. New SubscriptionOption concept Purchasing In v3, a Google Play Android Package or StoreProduct represented a single purchaseable entity, and free trials or intro offers would automatically be applied to the purchase if the user was eligible. Now, in Cordova v4, an Google Play Android Package or StoreProduct represents a duration of a subscription and contains all the ways to purchase that duration -- any offers and its base plan. Each of these purchase options are SubscriptionOptions. When passing a Package to purchasePackage() or StoreProduct to purchaseStoreProduct(), the SDK will use the following logic to choose whichSubscriptionOption to purchase: Filters out offers with "rc-ignore-offer" tag Uses SubscriptionOption with the longest free trial or cheapest first phase Only offers the user is eligible will be applied Falls back to base plan For more control, purchase subscription options with the new purchaseSubscriptionOption() method. Models StoreProduct now has a few new properties use for Google Play Android: defaultOption A subscription option that will automatically be applied when purchasing a Package or StoreProduct subscriptionOptions A list of subscription options (could be null) Observer Mode Observer mode is still supported in v4. Other than updating the SDK version, there are no changes required. To view new release, visit https://github.com/RevenueCat/cordova-plugin-purchases/releases/tag/4.0.0-alpha.1

iOS 4.20.0

New Features Add StoreProduct.pricePerYear (#2462) via NachoSoto (@NachoSoto) Bugfixes HTTPClient: don't assume error responses are JSON (#2529) via NachoSoto (@NachoSoto) OfferingsManager: return Offerings from new disk cache when server is down (#2495) via NachoSoto (@NachoSoto) OfferingsManager: don't consider timeouts as configuration errors (#2493) via NachoSoto (@NachoSoto) Performance Improvements Perf: CustomerInfoManager.fetchAndCacheCustomerInfoIfStale no longer fetches data if stale (#2508) via NachoSoto (@NachoSoto) Other Changes Integration Tests: workaround for XCTest crash after a test failure (#2532) via NachoSoto (@NachoSoto) CircleCI: save test archive on loadshedder-integration-tests (#2530) via NachoSoto (@NachoSoto) SK2StoreProduct: simplify currencyCode extraction (#2485) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI: added visual feedback for purchase success/failure (#2519) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI: fixed macOS UI (#2516) via NachoSoto (@NachoSoto) MainThreadMonitor: fixed flakiness in CI (#2517) via NachoSoto (@NachoSoto) Update fastlane-plugin-revenuecat_internal (#2511) via Cesar de la Vega (@vegaro) Xcode: fixed .storekit file references in schemes (#2505) via NachoSoto (@NachoSoto) MainThreadMonitor: don't monitor thread if debugger is attached (#2502) via NachoSoto (@NachoSoto) Purchases: avoid double-log when setting delegate to nil (#2503) via NachoSoto (@NachoSoto) Integration Tests: added snapshot test for OfferingsResponse (#2499) via NachoSoto (@NachoSoto) Tests: grouped all Matchers into one file (#2497) via NachoSoto (@NachoSoto) DeviceCache: refactored cache keys (#2494) via NachoSoto (@NachoSoto) HTTPClient: log actual response status code (#2487) via NachoSoto (@NachoSoto) Generate snapshots on CI (#2472) via Josh Holtz (@joshdholtz) Integration Tests: add MainThreadMonitor to ensure main thread is not blocked (#2463) via NachoSoto (@NachoSoto) Add message indicating tag doesn't exist (#2458) via Cesar de la Vega (@vegaro) To view new release, visit https://github.com/RevenueCat/purchases-ios/releases/tag/4.20.0

Android 6.2.0

New Features CAT-859 Expose whether or not a SubscriptionOption is Prepaid in the SDK (#1005) via Deema AlShamaa (@dalshamaa) Bugfixes [CF-1324] Fix personalizedPrice defaulting to false (#952) via beylmk (@beylmk) Performance Improvements Store and return ETag last refresh time header (#978) via Toni Rico (@tonidero) Dependency Updates Bump fastlane-plugin-revenuecat_internal from 3b03efa to fe45299 (#991) via dependabot[bot] (@dependabot[bot]) Bump danger from 9.2.0 to 9.3.0 (#981) via dependabot[bot] (@dependabot[bot]) Bump fastlane-plugin-revenuecat_internal from 8482a43 to 3b03efa (#974) via dependabot[bot] (@dependabot[bot]) Bump fastlane from 2.212.1 to 2.212.2 (#973) via dependabot[bot] (@dependabot[bot]) Bump fastlane-plugin-revenuecat_internal from 9255366 to 8482a43 (#961) via dependabot[bot] (@dependabot[bot]) Other Changes Add proration modes to post to backend (#977) via swehner (@swehner) Added ENTITLEMENTS_COMPUTED_ON_DEVICE (#939) via Cesar de la Vega (@vegaro) Fix flaky test in OfflineCustomerInfoCalculatorTest (#997) via Cesar de la Vega (@vegaro) Fix OfflineCustomerInfoCalculatorTest Unresolved reference: ProducType (#995) via Cesar de la Vega (@vegaro) Add support for product_plan_identifier for offline customer info (#959) via Cesar de la Vega (@vegaro) Add non-subscriptions support to offline customer info (#958) via Cesar de la Vega (@vegaro) Query only active purchases when generating offline entitlements customer info (#1003) via Toni Rico (@tonidero) Fix PurchasesIntegrationTest building issue (#996 into main) (#998) via Cesar de la Vega (@vegaro) Fail offline entitlements computation if product entitlement mapping not available (#999) via Toni Rico (@tonidero) Fix build_magic_weather lane (#993) via Cesar de la Vega (@vegaro) Add backend integration tests and test product entitlement mapping endpoint (#988) via Toni Rico (@tonidero) Fix purchases integration tests (#980) via Toni Rico (@tonidero) Disable offline entitlements if active inapp purchases exist (#983) via Toni Rico (@tonidero) Clear cached customer info upon entering offline entitlements mode (#989) via Toni Rico (@tonidero) Update product entitlement mapping request to new format (#976) via Toni Rico (@tonidero) Support enabling/disabling offline entitlements (#964) via Toni Rico (@tonidero) Add back integration tests automation (#972) via Toni Rico (@tonidero) Upgrade to AGP 8.0 (#975) via Toni Rico (@tonidero) Extract post receipt logic to PostReceiptHelper (#967) via Toni Rico (@tonidero) Add isServerDown to error callback for postReceipt and getCustomerInfo requests (#963) via Toni Rico (@tonidero) Add back integration test flavors (#962) via Toni Rico (@tonidero) Fix storing test results (#966) via Cesar de la Vega (@vegaro) Extract detekt job from test job (#965) via Cesar de la Vega (@vegaro) To view new release, visit https://github.com/RevenueCat/purchases-android/releases/tag/6.2.0

iOS 4.19.0

New Features New ErrorCode.signatureVerificationFailed which will be used for an upcoming feature Bugfixes Purchases.deinit: don't reset Purchases.proxyURL (#2346) via NachoSoto (@NachoSoto) Other ChangesIntroduced Configuration.EntitlementVerificationMode and VerificationResult (#2277) via NachoSoto (@NachoSoto) PurchasesDiagnostics: added step to verify signature verification (#2267) via NachoSoto (@NachoSoto) HTTPClient: added signature validation and introduced ErrorCode.signatureVerificationFailed (#2272) via NachoSoto (@NachoSoto) ETagManager: don't use ETags if response verification failed (#2347) via NachoSoto (@NachoSoto) Integration Tests: removed @preconcurrency import (#2464) via NachoSoto (@NachoSoto) Clean up: moved ReceiptParserTests-Info.plist out of root (#2460) via NachoSoto (@NachoSoto) Update CHANGELOG (#2461) via NachoSoto (@NachoSoto) Update SwiftSnapshotTesting (#2453) via NachoSoto (@NachoSoto) Fixed docs (#2432) via Kaunteya Suryawanshi (@kaunteya) Remove unnecessary line break (#2435) via Andy Boedo (@aboedo) ProductEntitlementMapping: enabled entitlement mapping fetching (#2425) via NachoSoto (@NachoSoto) BackendPostReceiptDataTests: increased timeout to fix flaky test (#2426) via NachoSoto (@NachoSoto) Updated requirements to drop Xcode 13.x support (#2419) via NachoSoto (@NachoSoto) Integration Tests: fixed flaky errors when loading offerings (#2420) via NachoSoto (@NachoSoto) PurchaseTester: fixed compilation for internal entitlement verification (#2417) via NachoSoto (@NachoSoto) ETagManager/HTTPClient: sending new X-RC-Last-Refresh-Time header (#2373) via NachoSoto (@NachoSoto) ETagManager: don't send validation time if not present (#2490) via NachoSoto (@NachoSoto) SwiftUI Sample Project: Refactor Package terms method to a computed property (#2405) via Joseph Kokenge (@JOyo246) Clean up v3 load shedder integration tests (#2402) via Andy Boedo (@aboedo) Fix iOS 12 compilation (#2394) via NachoSoto (@NachoSoto) Added new VerificationResult.verifiedOnDevice (#2379) via NachoSoto (@NachoSoto) PurchaseTester: fix memory leaks (#2392) via Keita Watanabe (@kitwtnb) Integration tests: add scheduled job (#2389) via Andy Boedo (@aboedo) Add lane for running iOS v3 load shedder integration tests (#2388) via Andy Boedo (@aboedo) iOS v3 load shedder integration tests (#2387) via Andy Boedo (@aboedo) Offline Entitlements: created LoadShedderIntegrationTests (#2362) via NachoSoto (@NachoSoto) Purchases.configure: log warning if attempting to use a static appUserID (#2385) via Mark Villacampa (@MarkVillacampa) SubscriberAttributesManagerIntegrationTests: fixed flaky failures (#2381) via NachoSoto (@NachoSoto) @DefaultDecodable.Now: fixed flaky test (#2374) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI: fixed iOS compilation (#2376) via NachoSoto (@NachoSoto) SubscriberAttributesManagerIntegrationTests: fixed potential race condition (#2380) via NachoSoto (@NachoSoto) Offline Entitlements: create CustomerInfo from offline entitlements (#2358) via NachoSoto (@NachoSoto) Added @DefaultDecodable.Now (#2372) via NachoSoto (@NachoSoto) HTTPClient: debug log when performing redirects (#2371) via NachoSoto (@NachoSoto) HTTPClient: new flag to force server errors (#2370) via NachoSoto (@NachoSoto) OfferingsManager: fixed Xcode 13.x build (#2369) via NachoSoto (@NachoSoto) Offline Entitlements: store ProductEntitlementMapping in cache (#2355) via NachoSoto (@NachoSoto) Offline Entitlements: added support for fetching ProductEntitlementMappingResponse in OfflineEntitlementsAPI (#2353) via NachoSoto (@NachoSoto) Offline Entitlements: created ProductEntitlementMapping (#2365) via NachoSoto (@NachoSoto) Implemented NetworkError.isServerDown (#2367) via NachoSoto (@NachoSoto) ETagManager: added test for 304 responses with no etag (#2360) via NachoSoto (@NachoSoto) TestLogHandler: increased default capacity (#2357) via NachoSoto (@NachoSoto) OfferingsManager: moved log to common method to remove hardcoded string (#2363) via NachoSoto (@NachoSoto) Offline Entitlements: created ProductEntitlementMappingResponse (#2351) via NachoSoto (@NachoSoto) HTTPClient: added test for 2xx response for request with etag (#2361) via NachoSoto (@NachoSoto) PurchaseTesterSwiftUI improvements (#2345) via NachoSoto (@NachoSoto) ConfigureStrings: fixed double-space typo (#2344) via NachoSoto (@NachoSoto) ETagManagerTests: fixed tests on iOS 12 (#2349) via NachoSoto (@NachoSoto) DeviceCache: simplified constructor (#2354) via NachoSoto (@NachoSoto) Trusted Entitlements: changed all APIs to internal (#2350) via NachoSoto (@NachoSoto) VerificationResult.notRequested: removed caching reference (#2337) via NachoSoto (@NachoSoto) Finished signature verification HTTPClient tests (#2333) via NachoSoto (@NachoSoto) Configuration.Builder.with(entitlementVerificationMode:): improved documentation (#2334) via NachoSoto (@NachoSoto) ETagManager: don't ignore failed etags with Signing.VerificationMode.informational (#2331) via NachoSoto (@NachoSoto) IdentityManager: clear ETagManager and DeviceCache if verification is enabled but cached CustomerInfo is not (#2330) via NachoSoto (@NachoSoto) Made Configuration.EntitlementVerificationMode.enforced unavailable (#2329) via NachoSoto (@NachoSoto) Refactor: reorganized files in new Security and Misc folders (#2326) via NachoSoto (@NachoSoto) CustomerInfo: use same grace period logic for active subscriptions (#2327) via NachoSoto (@NachoSoto) HTTPClient: don't verify 4xx/5xx responses (#2322) via NachoSoto (@NachoSoto) EntitlementInfo: request date is not optional (#2325) via NachoSoto (@NachoSoto) CustomerInfo: removed entitlementVerification (#2320) via NachoSoto (@NachoSoto) Renamed VerificationResult.notVerified to .notRequested (#2321) via NachoSoto (@NachoSoto) EntitlementInfo: add a grace period limit to outdated entitlements (#2288) via NachoSoto (@NachoSoto) Update CustomerInfo.requestDate from 304 responses (#2310) via NachoSoto (@NachoSoto) Signing: added request time & eTag to signature verification (#2309) via NachoSoto (@NachoSoto) HTTPClient: changed header search to be case-insensitive (#2308) via NachoSoto (@NachoSoto) HTTPClient: automatically add nonce based on HTTPRequest.Path (#2286) via NachoSoto (@NachoSoto) PurchaseTester: added ability to reload CustomerInfo with a custom CacheFetchPolicy (#2312) via NachoSoto (@NachoSoto) Fix issue where underlying error information for product fetch errors was not printed in log. (#2281) via Chris Vasselli (@chrisvasselli) PurchaseTester: added ability to set Configuration.EntitlementVerificationMode (#2290) via NachoSoto (@NachoSoto) SwiftUI: Paywall View should respond to changes on the UserView model (#2297) via ConfusedVorlon (@ConfusedVorlon) Deprecate usesStoreKit2IfAvailable (#2293) via Andy Boedo (@aboedo) Signing: updated to use production public key (#2274) via NachoSoto (@NachoSoto) To view new release, visit https://github.com/RevenueCat/purchases-ios/releases/tag/4.19.0

iOS 4.18.0

New Features Introduced Custom Entitlements Computation mode (#2439) via Andy Boedo (@aboedo) Create separate SPM library to enable custom entitlement computation (#2440) via NachoSoto (@NachoSoto) This new library allows apps to use a smaller version of the RevenueCat SDK, intended for apps that will do their own entitlement computation separate from RevenueCat. Apps using this mode rely on webhooks to signal their backends to refresh entitlements with RevenueCat. See the demo app for an example. Bugfixes PurchaseOrchestrator: fix incorrect InitiationSource for SK1 queue transactions (#2430) via NachoSoto (@NachoSoto) Other Changes Update offerings cache when switchUser(to:) is called (#2455) via Andy Boedo (@aboedo) Updated example code for the sample app for Custom Entitlements (#2454) via Andy Boedo (@aboedo) Custom Entitlement Computation: API testers (#2452) via NachoSoto (@NachoSoto) Custom Entitlement Computation: avoid getCustomerInfo requests for cancelled purchases (#2449) via NachoSoto (@NachoSoto) Custom Entitlement Computation: disabled unnecessary APIs (#2442) via NachoSoto (@NachoSoto) StoreKit1Wrapper: added log when adding payment to queue (#2423) via NachoSoto (@NachoSoto) StoreKit1Wrapper: added debug log when transaction is removed but no callbacks to notify (#2418) via NachoSoto (@NachoSoto) customEntitlementsComputation: update the copy in the sample app to explain the new usage (#2443) via Andy Boedo (@aboedo) Clarify reasoning for disfavoredOverload in logIn (#2434) via Andy Boedo (@aboedo) Documentation: improved async API docs (#2432) via Kaunteya Suryawanshi (@kaunteya) To view new release, visit https://github.com/RevenueCat/purchases-ios/releases/tag/4.18.0

React Native 6.0.0-beta.1

The first beta of RevenueCat Purchases React Native v6 is here!! 😻 This latest release updates the Android SDK dependency from v5 to v6 to use BillingClient 5. This version of BillingClient brings an entire new subscription model which has resulted in large changes across the entire SDK. Migration Guides See Android Native - 5.x to 6.x Migration for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it in V6. This guide includes tips on product setup with the new model. New SubscriptionOption concept Purchasing In v5, a Google Play Android Package or StoreProduct represented a single purchaseable entity, and free trials or intro offers would automatically be applied to the purchase if the user was eligible. Now, in React Native v6, an Google Play Android Package or StoreProduct represents a duration of a subscription and contains all the ways to purchase that duration -- any offers and its base plan. Each of these purchase options are SubscriptionOptions. When passing a Package to purchasePackage() or StoreProduct to purchaseStoreProduct(), the SDK will use the following logic to choose whichSubscriptionOption to purchase: Filters out offers with "rc-ignore-offer" tag Uses SubscriptionOption with the longest free trial or cheapest first phase Only offers the user is eligible will be applied Falls back to base plan For more control, purchase subscription options with the new purchaseSubscriptionOption() method. Models StoreProduct now has a few new properties use for Google Play Android: defaultOption A subscription option that will automatically be applie when purchasing a Package or StoreProduct subscriptionOptions A list of subscription options (could be null) Observer Mode Observer mode is still supported in v6. Other than updating the SDK version, there are no changes required. To view new release, visit https://github.com/RevenueCat/react-native-purchases/releases/tag/6.0.0-beta.1

React Native 6.0.0-alpha.1

The first beta of RevenueCat Purchases React Native v6 is here!! 😻 This latest release updates the Android SDK dependency from v5 to v6 to use BillingClient 5. This version of BillingClient brings an entire new subscription model which has resulted in large changes across the entire SDK. Migration Guides See Android Native - 5.x to 6.x Migration for a more thorough explanation of the new Google subscription model announced with BillingClient 5 and how to take advantage of it in V6. This guide includes tips on product setup with the new model. New SubscriptionOption concept Purchasing In v5, a Google Play Android Package or StoreProduct represented a single purchaseable entity, and free trials or intro offers would automatically be applied to the purchase if the user was eligible. Now, in React Native v6, an Google Play Android Package or StoreProduct represents a duration of a subscription and contains all the ways to purchase that duration -- any offers and its base plan. Each of these purchase options are SubscriptionOptions. When passing a Package to purchasePackage() or StoreProduct to purchaseStoreProduct(), the SDK will use the following logic to choose whichSubscriptionOption to purchase: Filters out offers with "rc-ignore-offer" tag Uses SubscriptionOption with the longest free trial or cheapest first phase Only offers the user is eligible will be applied Falls back to base plan For more control, purchase subscription options with the new purchaseSubscriptionOption() method. Models StoreProduct now has a few new properties use for Google Play Android: defaultOption A subscription option that will automatically be applie when purchasing a Package or StoreProduct subscriptionOptions A list of subscription options (could be null) Observer Mode Observer mode is still supported in v6. Other than updating the SDK version, there are no changes required. To view new release, visit https://github.com/RevenueCat/react-native-purchases/releases/tag/6.0.0-alpha.1