purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.

MIT License

Stars
2.1K
Committers
65

Bot releases are visible (Hide)

purchases-ios - 4.25.3

Published by RCGitBot about 1 year ago

This release is compatible with Xcode 15 beta 6 and visionOS beta 3

Bugfixes

  • visionOS: support for Xcode 15 beta 6 (#2989) via NachoSoto (@NachoSoto)
  • CachingProductsManager: avoid crash when caching different products with same identifier (#2979) via NachoSoto (@NachoSoto)
  • PurchasesOrchestrator: disambiguate transactions from the queue (#2890) via NachoSoto (@NachoSoto)

Performance Improvements

  • StoreKit2TransactionListener: handle transactions asynchronously (#2910) via NachoSoto (@NachoSoto)

Other Changes

  • Atomic: avoid race conditions modifying dictionaries (#2981) via NachoSoto (@NachoSoto)
  • Logging: avoid logging "updating offerings" when request is cached (#2904) via NachoSoto (@NachoSoto)
  • StoreKit2TransactionListener: converted into an actor (#2909) via NachoSoto (@NachoSoto)
  • Integration Tests: added more observer mode tests (#2905) via NachoSoto (@NachoSoto)
  • Created PostedTransactionCache (#2911) via NachoSoto (@NachoSoto)
  • IntroEligibility: changed products to Set<String> (#2976) via NachoSoto (@NachoSoto)
  • AdServices: Rename postAdServicesTokenIfNeeded() to postAdServicesTokenOncePerInstallIfNeeded() (#2968) via Josh Holtz (@joshdholtz)
  • SK1StoreProduct: changed productType warning to debug (#2957) via NachoSoto (@NachoSoto)
  • PrivacyInfo.xcprivacy: added UserDefaults to access API types (#2913) via NachoSoto (@NachoSoto)
  • Integration Tests: new test to verify that SK1 purchases don't leave SK2 unfinished transactions (#2906) via NachoSoto (@NachoSoto)
  • Logging: log entire cache key with verbose logs (#2888) via NachoSoto (@NachoSoto)
  • StoreProduct: added test covering warning log (#2897) via NachoSoto (@NachoSoto)
  • CustomEntitlementComputation: use custom API key (#2879) via Toni Rico (@tonidero)
  • CachingProductsManager: removed duplicate log and added tests (#2898) via NachoSoto (@NachoSoto)
  • Xcode 15 beta 5: fixed test compilation (#2885) via NachoSoto (@NachoSoto)
purchases-ios - 4.25.2

Published by RCGitBot about 1 year ago

This release is compatible with Xcode 15 beta 5 and visionOS beta 2

Bugfixes

  • xrOS: fixed SubscriptionStoreView for visionOS beta 2 (#2884) via Josh Holtz (@joshdholtz)

Performance Improvements

  • Perf: update CustomerInfo cache before anything else (#2865) via NachoSoto (@NachoSoto)

Other Changes

  • SimpleApp: added support for localization (#2880) via NachoSoto (@NachoSoto)
  • TestStoreProduct: made available on release builds (#2861) via NachoSoto (@NachoSoto)
  • Tests: increased default logger capacity (#2870) via NachoSoto (@NachoSoto)
  • CustomEntitlementComputation: removed invalidateCustomerInfoCache (#2866) via NachoSoto (@NachoSoto)
  • SimpleApp: updates for TestFlight compatibility (#2862) via NachoSoto (@NachoSoto)
  • BasePurchasesTests: consolidate to only initialize one DeviceCache (#2863) via NachoSoto (@NachoSoto)
  • Codable: debug log entire JSON when decoding fails (#2864) via NachoSoto (@NachoSoto)
  • IntegrationTests: replaced Purchases.shared with a throwing property (#2867) via NachoSoto (@NachoSoto)
  • NetworkError: 2 new tests to ensure underlying error is included in description (#2843) via NachoSoto (@NachoSoto)
  • Add SPM Package.resolved for Xcode Cloud (#2844) via NachoSoto (@NachoSoto)
  • CustomEntitlementComputation: added integration test for cancellations (#2849) via NachoSoto (@NachoSoto)
  • CustomEntitlementComputation: removed syncPurchases/restorePurchases (#2854) via NachoSoto (@NachoSoto)
purchases-ios - 4.25.1

Published by RCGitBot over 1 year ago

Dependency Updates

  • Bump fastlane from 2.213.0 to 2.214.0 (#2824) via dependabot[bot] (@dependabot[bot])

Other Changes

  • MainThreadMonitor: don't crash if there is no test in progress (#2838) via NachoSoto (@NachoSoto)
  • CI: fixed Fastlane APITester lanes (#2836) via NachoSoto (@NachoSoto)
  • Integration Tests: workaround Swift runtime crash (#2826) via NachoSoto (@NachoSoto)
  • @EnsureNonEmptyArrayDecodable (#2831) via NachoSoto (@NachoSoto)
  • iOS 17: added tests for simulating cancellations (#2597) via NachoSoto (@NachoSoto)
  • CI: make all Codecov jobs informational (#2828) via NachoSoto (@NachoSoto)
  • MainThreadMonitor: check deadlocks only ever N seconds (#2820) via NachoSoto (@NachoSoto)
  • New @NonEmptyStringDecodable (#2819) via NachoSoto (@NachoSoto)
  • MockDeviceCache: avoid using real UserDefaults (#2814) via NachoSoto (@NachoSoto)
  • throwAssertion: fixed Xcode 15 compilation (#2813) via NachoSoto (@NachoSoto)
  • CustomEntitlementsComputation: fixed API testers (#2815) via NachoSoto (@NachoSoto)
  • PackageTypeTests: fixed iOS 12 (#2807) via NachoSoto (@NachoSoto)
  • Tests: avoid race-condition in leak detection (#2806) via NachoSoto (@NachoSoto)
  • Revert "Unit Tests: removed leak detection" (#2805) via NachoSoto (@NachoSoto)
  • PackageType: Codable implementation (#2797) via NachoSoto (@NachoSoto)
  • SystemInfo.init no longer throws (#2803) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: add support for signing POST body (#2753) via NachoSoto (@NachoSoto)
  • Tests: unified default timeouts (#2801) via NachoSoto (@NachoSoto)
  • Tests: removed forced-unwrap (#2799) via NachoSoto (@NachoSoto)
  • Tests: added missing super.setUp() (#2804) via NachoSoto (@NachoSoto)
  • Replaced FatalErrorUtil with Nimble (#2802) via NachoSoto (@NachoSoto)
  • Tests: fixed another flaky test (#2795) via NachoSoto (@NachoSoto)
  • TimingUtil: improved tests by using Clock (#2794) via NachoSoto (@NachoSoto)
  • IgnoreDecodeErrors: log decoding error (#2778) via NachoSoto (@NachoSoto)
  • TestLogHandler: changed all tests to explicitly deinitialize it (#2784) via NachoSoto (@NachoSoto)
  • LocalReceiptParserStoreKitTests: fixed flaky test failure (#2785) via NachoSoto (@NachoSoto)
  • Unit Tests: removed leak detection (#2792) via NachoSoto (@NachoSoto)
  • Tests: fixed another flaky failure with asynchronous check (#2786) via NachoSoto (@NachoSoto)
purchases-ios - 4.25.0

Published by RCGitBot over 1 year ago

New Features

  • Trusted Entitlements: (#2621) via NachoSoto (@NachoSoto)

This new feature prevents MitM attacks between the SDK and the RevenueCat server.
With verification enabled, the SDK ensures that the response created by the server was not modified by a third-party, and the entitlements received are exactly what was sent.
This is 100% opt-in. EntitlementInfos have a new VerificationResult property, which will indicate the validity of the responses when this feature is enabled.

let purchases = Purchases.configure(
  with: Configuration
    .builder(withAPIKey: "")
    .with(entitlementVerificationMode: .informational)
)
let customerInfo = try await purchases.customerInfo()
if !customerInfo.entitlements.verification.isVerified {
  print("Entitlements could not be verified")
}

You can learn more from the documentation.

Other Changes

  • TrustedEntitlements: new VerificationResult.isVerified (#2788) via NachoSoto (@NachoSoto)
  • Refactor: extracted Collection.subscript(safe:) (#2779) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: added link to docs in ErrorCode.signatureVerificationFailed (#2783) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: improved documentation (#2782) via NachoSoto (@NachoSoto)
  • Tests: fixed flaky failure with asynchronous check (#2777) via NachoSoto (@NachoSoto)
  • Integration Tests: re-enable signature verification tests (#2744) via NachoSoto (@NachoSoto)
  • CI: remove Jazzy (#2775) via NachoSoto (@NachoSoto)
  • Signing: inject ClockType to ensure hardcoded signatures don't fail when intermediate key expires (#2771) via NachoSoto (@NachoSoto)
purchases-ios - 4.24.1

Published by RCGitBot over 1 year ago

Bugfixes

  • PurchasesDiagnostics: don't test signature verification if it's disabled (#2757) via NachoSoto (@NachoSoto)

Other Changes

  • AnyEncodable: also implement Decodable (#2769) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: log signature errors on requests with .informational mode (#2751) via NachoSoto (@NachoSoto)
  • Tests: optimized several tests (#2754) via NachoSoto (@NachoSoto)
  • SimpleApp: allow HTTP traffic (#2763) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: added support for unauthenticated endpoints (#2761) via NachoSoto (@NachoSoto)
  • Integration Tests: TestLogHandler no longer crashes tests (#2760) via NachoSoto (@NachoSoto)
  • SimpleApp: changed bundle identifier (#2759) via NachoSoto (@NachoSoto)
  • Testing: add new SimpleApp (#2756) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: update handling of escaped URLs (#2758) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: produce verification failures for static endpoints with no signature (#2752) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: added tests to verify offerings and product entitlement mapping (#2667) via NachoSoto (@NachoSoto)
  • Integration Tests: refactored expiration detection (#2700) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: add API key and HTTPRequest.Path to signature (#2746) via NachoSoto (@NachoSoto)
  • HTTPRequest.Path: escape appUserID (#2747) via NachoSoto (@NachoSoto)
  • Documentation: add reference to TestStoreProduct (#2743) via NachoSoto (@NachoSoto)
  • PostReceiptDataOperation: add new testReceiptIdentifier parameter (#2749) via NachoSoto (@NachoSoto)
  • Integration Tests: updated load-shedder offerings snapshot (#2748) via NachoSoto (@NachoSoto)
  • Signing: extract and verify intermediate key (#2715) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: update handling of 304 responses (#2698) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: new Signature format (#2679) via NachoSoto (@NachoSoto)
  • Integration Tests: avoid crashes when stopping tests early (#2741) via NachoSoto (@NachoSoto)
purchases-ios - 4.24.0

Published by RCGitBot over 1 year ago

New Features

  • New TestStoreProduct for creating mock StoreProducts and Offerings (#2711) via NachoSoto (@NachoSoto)

✨ With this new API you can now create fake products for unit tests and SwiftUI previews! 🎉

Example:

let product = TestStoreProduct(
    localizedTitle: "PRO monthly",
    price: 3.99,
    localizedPriceString: "$3.99",
    productIdentifier: "com.revenuecat.product",
    productType: .autoRenewableSubscription,
    localizedDescription: "Description",
    subscriptionGroupIdentifier: "group",
    subscriptionPeriod: .init(value: 1, unit: .month)
)
let offering = Offering(
    identifier: "offering",
    serverDescription: "Main offering",
    metadata: [:],
    availablePackages: [
        .init(
            identifier: "monthly",
            packageType: .monthly,
            storeProduct: product.toStoreProduct(),
            offeringIdentifier: offering
        )
    ]
)

Dependency Updates

  • Bump fastlane-plugin-revenuecat_internal from 13773d2 to b2108fb (#2706) via dependabot[bot] (@dependabot[bot])

Other Changes

  • VerificationResult: CustomDebugStringConvertible (#2739) via NachoSoto (@NachoSoto)
  • Refactor: simplified PurchasesOrchestrator.syncPurchases (#2731) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: add integration tests to verify CustomerInfo cache invalidation (#2730) via NachoSoto (@NachoSoto)
  • SystemInfo.identifierForVendor: add tests (#2732) via NachoSoto (@NachoSoto)
  • Tests: disabled iOS 11.x tests to fix Xcode 15 tests (#2720) via NachoSoto (@NachoSoto)
  • DebugViewSwiftUITests: create separate snapshots for each OS version (#2721) via NachoSoto (@NachoSoto)
  • Integration Tests: fix clearing UserDefaults before each test (#2719) via NachoSoto (@NachoSoto)
  • Remove unused Signing.loadPublicKey(with:) (#2714) via NachoSoto (@NachoSoto)
  • Add UInt32(littleEndian32Bits:) and UInt32.littleEndianData (#2713) via NachoSoto (@NachoSoto)
  • TimingUtil: added synchronous API (#2716) via NachoSoto (@NachoSoto)
  • XCFramework: sign archive for Xcode 15 (#2709) via NachoSoto (@NachoSoto)
  • CI: removed carthage_archive from release lane (#2710) via NachoSoto (@NachoSoto)
  • PriceFormatterProvider.priceFormatterForSK2: enable on all versions (#2712) via NachoSoto (@NachoSoto)
  • xrOS: add support for debugRevenueCatOverlay (#2702) via NachoSoto (@NachoSoto)
  • Refactor method to get product ID including plan ID in android purchases (#2708) via Toni Rico (@tonidero)
  • Purchases.restoreLogHandler (#2699) via NachoSoto (@NachoSoto)
  • Remove alpha from purchase tester icon to upload to testflight (#2705) via Toni Rico (@tonidero)
purchases-ios - 4.23.1

Published by RCGitBot over 1 year ago

Bugfixes

  • Fix google play purchases missing purchase date (#2703) via Toni Rico (@tonidero)

Other Changes

  • PurchaseTester: fixed watchOS build and ASC deployment (#2701) via NachoSoto (@NachoSoto)
  • Add Data.sha1 (#2696) via NachoSoto (@NachoSoto)
  • Refactor: extract ErrorResponse into its own file (#2697) via NachoSoto (@NachoSoto)
  • Add Sequence<AdditiveArithmetic>.sum() (#2694) via NachoSoto (@NachoSoto)
  • Refactored Data.asString implementation (#2695) via NachoSoto (@NachoSoto)
  • Diagnostics: new FileHandler for abstracting file operations (#2673) via NachoSoto (@NachoSoto)
purchases-ios - 4.23.0

Published by RCGitBot over 1 year ago

This release is compatible with Xcode 15 beta 2 and visionOS beta 1

New Features

  • xrOS: added to list of supported platforms (#2682) via NachoSoto (@NachoSoto)

Bugfixes

  • xrOS: fixed compilation by disabling debug overlay (#2681) via NachoSoto (@NachoSoto)
  • xrOS: added support for new purchase(confirmIn:options:) method (#2683) via NachoSoto (@NachoSoto)
  • Xcode 15: handle Locale.currencyCode deprecation (#2680) via NachoSoto (@NachoSoto)

Other Changes

  • PurchaseTester: fixed release compilation (#2689) via NachoSoto (@NachoSoto)
  • xrOS: fixed runtime warning (#2691) via NachoSoto (@NachoSoto)
  • xrOS: added support to PurchaseTester (#2685) via NachoSoto (@NachoSoto)
  • Signature Verification: new Integration Tests (#2642) via NachoSoto (@NachoSoto)
  • ErrorUtils: handle PurchasesError to avoid creating unknown errors (#2686) via NachoSoto (@NachoSoto)
purchases-ios - 4.22.1

Published by RCGitBot over 1 year ago

Bugfixes

  • PurchasesOrchestrator: update CustomerInfoManager cache after processing transactions (#2676) via NachoSoto (@NachoSoto)
  • ErrorResponse: drastically improved error messages, no more "unknown error"s (#2660) via NachoSoto (@NachoSoto)
  • PaywallExtensions: post purchases with Offering identifier (#2645) via NachoSoto (@NachoSoto)
  • Support product_plan_identifier for purchased subscriptions from Google Play (#2654) via Josh Holtz (@joshdholtz)

Performance Improvements

  • copy(with: VerificationResult): optimization to avoid copies (#2639) via NachoSoto (@NachoSoto)

Other Changes

  • ETagManager: refactored e-tag creation and tests (#2671) via NachoSoto (@NachoSoto)
  • getPromotionalOffer: return ErrorCode.ineligibleError if receipt is not found (#2678) via NachoSoto (@NachoSoto)
  • TimingUtil: removed slow purchase logs (#2677) via NachoSoto (@NachoSoto)
  • CI: changed Codecov to informational (#2670) via NachoSoto (@NachoSoto)
  • LoadShedderIntegrationTests: verify requests are actually handled by load shedder (#2663) via NachoSoto (@NachoSoto)
  • ETagManager.httpResultFromCacheOrBackend: return response headers (#2666) via NachoSoto (@NachoSoto)
  • Integration Tests: added tests to verify 304 behavior (#2659) via NachoSoto (@NachoSoto)
  • HTTPClient: disable URLSession cache (#2668) via NachoSoto (@NachoSoto)
  • Documented HTTPStatusCode.isSuccessfullySynced (#2661) via NachoSoto (@NachoSoto)
  • NetworkError.signatureVerificationFailed: added status code to error userInfo (#2657) via NachoSoto (@NachoSoto)
  • HTTPClient: improved log for failed requests (#2669) via NachoSoto (@NachoSoto)
  • ETagManager: added new verbose logs (#2656) via NachoSoto (@NachoSoto)
  • Signature Verification: added test-only log for debugging invalid signatures (#2658) via NachoSoto (@NachoSoto)
  • Fixed HTTPResponse.description (#2664) via NachoSoto (@NachoSoto)
  • Changed Logger to use os_log (#2608) via NachoSoto (@NachoSoto)
  • MainThreadMonitor: increased threshold (#2662) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay: display receiptURL (#2652) via NachoSoto (@NachoSoto)
  • PurchaseTester: added ability to display debugRevenueCatOverlay (#2653) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay: ability to close on macOS/Catalyst (#2649) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay: added support for macOS (#2648) via NachoSoto (@NachoSoto)
  • LoadShedderIntegrationTests: enable signature verification (#2655) via NachoSoto (@NachoSoto)
  • ImageSnapshot: fixed Xcode 15 compilation (#2651) via NachoSoto (@NachoSoto)
  • OfferingsManager: don't clear offerings cache timestamp when request fails (#2359) via NachoSoto (@NachoSoto)
  • StoreKitObserverModeIntegrationTests: added test for posting renewals (#2590) via NachoSoto (@NachoSoto)
  • Always initialize StoreKit2TransactionListener even on SK1 mode (#2612) via NachoSoto (@NachoSoto)
  • ErrorUtils.missingReceiptFileError: added receipt URL userInfo context (#2650) via NachoSoto (@NachoSoto)
  • Added .xcprivacy for Xcode 15 (#2619) via NachoSoto (@NachoSoto)
  • Trusted Entitlements: added debug log with ResponseVerificationMode (#2647) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay: simplified title (#2641) via NachoSoto (@NachoSoto)
  • Simplified Purchases.updateAllCachesIfNeeded (#2626) via NachoSoto (@NachoSoto)
  • HTTPResponseTests: fixed disabled test (#2643) via NachoSoto (@NachoSoto)
  • Add InternalDangerousSettings.forceSignatureFailures (#2635) via NachoSoto (@NachoSoto)
  • IntegrationTests: explicit StoreKit 1 mode (#2636) via NachoSoto (@NachoSoto)
  • Signing: removed API for loading key from a file (#2638) via NachoSoto (@NachoSoto)
purchases-ios - 4.23.0-beta.1

Published by RCGitBot over 1 year ago

New Features

Introducing Trusted Entitlements 🛡️ (beta):

Fixes #1900.

This new feature prevents MitM attacks between the SDK and the RevenueCat server.
With verification enabled, the SDK ensures that the response created by the server was not modified by a third-party, and the entitlements received are exactly what was sent.
This is 100% opt-in. EntitlementInfos have a new VerificationResult property, which will indicate the validity of the responses when this feature is enabled.

let purchases = Purchases.configure(
  with: Configuration
    .builder(withAPIKey: "")
    .with(entitlementVerificationMode: .informational)
)
let customerInfo = try await purchases.customerInfo()
if customerInfo.entitlements.verification != .verified {
  print("Entitlements could not be verified")
}
purchases-ios - 4.22.0

Published by RCGitBot over 1 year ago

This release is compatible with Xcode 15 beta 2

New Features

  • New DebugViewController: UIKit counterpart for SwiftUI's debugRevenueCatOverlay (#2631) via NachoSoto (@NachoSoto)
  • Created PaywallExtensions: StoreView and SubscriptionStoreView overloads for Offering (#2593) via NachoSoto (@NachoSoto)
  • Introduced debugRevenueCatOverlay(): new SwiftUI debug overlay (#2567) via NachoSoto (@NachoSoto)

Bugfixes

  • Removed preventPurchasePopupCallFromTriggeringCacheRefresh, update caches on willEnterForeground (#2623) via NachoSoto (@NachoSoto)
  • Fixed Catalyst build with Xcode 15 beta 1 (#2586) via NachoSoto (@NachoSoto)

Dependency Updates

  • Bump danger from 9.3.0 to 9.3.1 (#2592) via dependabot[bot] (@dependabot[bot])

Other Changes

  • StoreTransaction: added new Storefront to API testers (#2634) via NachoSoto (@NachoSoto)
  • DebugView: added snapshot tests (#2630) via NachoSoto (@NachoSoto)
  • verifyNoUnfinishedTransactions/verifyUnfinishedTransaction: added missing #file parameter (#2625) via NachoSoto (@NachoSoto)
  • PostReceiptDataOperation: clean up cache key (#2628) via NachoSoto (@NachoSoto)
  • PurchasesOrchestrator: also get Storefront from SK1 (#2629) via NachoSoto (@NachoSoto)
  • CI: disable iOS 17 for now (#2627) via NachoSoto (@NachoSoto)
  • Tests: fixed crash on iOS 13 (#2624) via NachoSoto (@NachoSoto)
  • StoreTransaction: read Storefront from StoreKit.Transaction (#2611) via NachoSoto (@NachoSoto)
  • StoreKitConfigTestCase/BaseStoreKitIntegrationTests: also clear transactions after every test (#2616) via NachoSoto (@NachoSoto)
  • ErrorCode.networkError: improved description (#2610) via NachoSoto (@NachoSoto)
  • PurchaseTester: make CI job always point to current version (#2622) via NachoSoto (@NachoSoto)
  • Improved finishAllUnfinishedTransactions (#2615) via NachoSoto (@NachoSoto)
  • StoreKitConfigTestCase: improved waitForStoreKitTestIfNeeded (#2614) via NachoSoto (@NachoSoto)
  • StoreKitConfigTestCase: set continueAfterFailure to false (#2617) via NachoSoto (@NachoSoto)
  • PaywallExtensions: fixed compilation (#2613) via NachoSoto (@NachoSoto)
  • CI: added iOS 17 job (#2591) via NachoSoto (@NachoSoto)
  • Encodable.jsonEncodedData: fixed tests on iOS 17 due to inconsistent key ordering (#2607) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay: added ability to display new SubscriptionStoreView (#2595) via NachoSoto (@NachoSoto)
  • Refactor: extracted all log strings (#2600) via NachoSoto (@NachoSoto)
  • Changed tests to work around URL decoding differences in iOS 17 (#2605) via NachoSoto (@NachoSoto)
  • Removed unnecessary Strings.trimmedOrError (#2601) via NachoSoto (@NachoSoto)
  • Fixed test compilation with Xcode 15 (#2602) via NachoSoto (@NachoSoto)
  • Tests: added iOS 17 snapshots (#2603) via NachoSoto (@NachoSoto)
  • StoreProductDiscount: added description (#2604) via NachoSoto (@NachoSoto)
  • debugRevenueCatOverlay improvements (#2594) via NachoSoto (@NachoSoto)
  • Xcode 15: fixed all documentation warnings (#2596) via NachoSoto (@NachoSoto)
  • StoreKitObserverModeIntegrationTests: fixed and disabled SK2 testPurchaseInDevicePostsReceipt (#2589) via NachoSoto (@NachoSoto)
  • StoreKit2TransactionListener: added log when receiving Transactions.Updates (#2588) via NachoSoto (@NachoSoto)
  • Dictionary.MergeStrategy: simplify implementation (#2587) via NachoSoto (@NachoSoto)
  • Configuration.Builder: fixed doc reference (#2583) via NachoSoto (@NachoSoto)
  • APITesters: available since iOS 11 (#2581) via NachoSoto (@NachoSoto)
purchases-ios - 4.21.1

Published by RCGitBot over 1 year ago

This release is compatible with Xcode 15 beta 1

Bugfixes

  • Dictionary.MergeStrategy: fixed Xcode 15 compilation (#2582) via NachoSoto (@NachoSoto)

Other Changes

  • Custom Entitlements Computation: added missing scheme to project (#2579) via NachoSoto (@NachoSoto)
  • Custom Entitlements Computation: added Integration Tests (#2568) via NachoSoto (@NachoSoto)
  • ProductsManager: improved display of underlying errors (#2575) via NachoSoto (@NachoSoto)
  • StoreKit1Wrapper: added debug log for duplicate finishTransaction calls (#2577) via NachoSoto (@NachoSoto)
  • Fixed typo in file name (#2578) via NachoSoto (@NachoSoto)
  • Integration Tests: avoid crashes when printing receipt (#2570) via NachoSoto (@NachoSoto)
  • Package.swift fix warning for unrecognized Info.plist (#2573) via NachoSoto (@NachoSoto)
purchases-ios - 4.21.0

Published by RCGitBot over 1 year ago

New Features

  • Offline Entitlements: use offline-computed CustomerInfo when server is down (#2368) via NachoSoto (@NachoSoto)

✨ 🌟 With this new feature, even if our main and backup servers are down, the SDK can continue to process purchases. This is enabled transparently to the user, and when the servers come back online, the SDK automatically syncs the information so it can be visible in the dashboard.

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)
purchases-ios - 4.19.1

Published by RCGitBot over 1 year ago

Other Changes

  • PostReceiptOperation: added ability to also post AdServices token (#2549) via NachoSoto (@NachoSoto)
purchases-ios - 4.20.0

Published by RCGitBot over 1 year ago

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)
purchases-ios - 4.19.0

Published by RCGitBot over 1 year ago

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)
  • Introduced 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)
purchases-ios - 4.18.0

Published by RCGitBot over 1 year ago

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 and usage instructions.

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)
purchases-ios - 4.17.11

Published by RCGitBot over 1 year ago

Bug Fixes

  • CustomerInfoManager: fixed deadlock caused by reading CustomerInfo inside of observer (#2412) via NachoSoto (@NachoSoto)
purchases-ios - 4.17.10

Published by RCGitBot over 1 year ago

Bugfixes

  • Fix NotificationCenter deadlock in customerInfoListener (#2407) via Andy Boedo (@aboedo)
  • Xcode 14.3: fixed compilation errors (#2399) via NachoSoto (@NachoSoto)
  • DispatchTimeInterval: fixed Xcode 14.3 compilation (#2397) via NachoSoto (@NachoSoto)

Other Changes

  • CircleCI: use Xcode 14.3.0 (#2398) via NachoSoto (@NachoSoto)
purchases-ios - 4.17.9

Published by RCGitBot over 1 year ago

Bugfixes

  • DeviceCache: workaround for potential deadlock (#2375)

Performance Improvements

  • PostReceiptDataOperation / GetCustomerInfoOperation: only invoke response handlers once (#2377) via NachoSoto (@NachoSoto)

Other Changes

  • Redirect to latest version of migration guide (#2384)
  • Fix migration guide link (#2383)
  • SwiftLint: fixed lint with new 0.51.0 version (#2395)