From 2cf153564607c7164916b27aff8938f5bf167e60 Mon Sep 17 00:00:00 2001 From: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:16:27 +0100 Subject: [PATCH] [AUTOMATIC] Release/5.13.0 (#4545) Co-authored-by: Cesar de la Vega --- .version | 2 +- CHANGELOG.latest.md | 27 ++- CHANGELOG.md | 30 ++++ RevenueCat.podspec | 2 +- RevenueCat.xcodeproj/project.pbxproj | 25 --- RevenueCatUI.podspec | 2 +- Sources/Misc/SystemInfo.swift | 2 +- .../CommonFiles/RevenueCat-Swift.h | 93 +++++++++-- .../PaywallsTester.xcodeproj/project.pbxproj | 157 +----------------- .../PaywallsTester - Live Config.xcscheme | 13 -- .../PaywallsTester - SK config.xcscheme | 13 -- ...urnsPurchaseBelongsToOtherUserError.1.json | 31 ++++ ...urnsPurchaseBelongsToOtherUserError.1.json | 31 ++++ ...urnsPurchaseBelongsToOtherUserError.1.json | 31 ++++ ...urnsPurchaseBelongsToOtherUserError.1.json | 31 ++++ ...urnsPurchaseBelongsToOtherUserError.1.json | 30 ++++ ...urnsPurchaseBelongsToOtherUserError.1.json | 31 ++++ scripts/docs/index.html | 2 +- scripts/docs/v4_api_migration_guide.html | 2 +- scripts/docs/v5_api_migration_guide.html | 2 +- 20 files changed, 332 insertions(+), 225 deletions(-) create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/iOS15-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/iOS16-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/iOS17-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/iOS18-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/macOS-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json create mode 100644 Tests/UnitTests/Networking/Backend/__Snapshots__/BackendPostRedeemWebPurchaseTests/watchOS-testPostRedeemWebPurchaseReturnsPurchaseBelongsToOtherUserError.1.json diff --git a/.version b/.version index 9e323a785b..26f30f79cc 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -5.13.0-SNAPSHOT +5.13.0 diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index feb9f08102..ef7d66731c 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,3 +1,28 @@ +## RevenueCat SDK +### ✨ New Features +* Adds `subscriptions` to `CustomerInfo` (#4508) via Cesar de la Vega (@vegaro) +### 🐞 Bugfixes +* [Paywalls] Fix PaywallTester compilation on Xcode 15 (#4540) via Mark Villacampa (@MarkVillacampa) +* Paywalls: Update Finnish "restore" localization (#4493) via Jeffrey Bunn (@Jethro87) + ## RevenueCatUI SDK ### 🐞 Bugfixes -* Fix PaywallEvents failing to deserialize (#4520) via Cesar de la Vega (@vegaro) +* Fix translucent navigation bar on paywalls by making it fully transparent (on iOS 16+) (#4543) via Josh Holtz (@joshdholtz) +* Fix build for app extensions (#4531) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* Adds missing revisionId to CustomerCenter impression event (#4537) via Cesar de la Vega (@vegaro) +* Customer Center deeplinks should always be opened externally (#4533) via Cesar de la Vega (@vegaro) +* Use `ManageSubscriptionsView` for users without active subscriptions (#4530) via Cesar de la Vega (@vegaro) + +### πŸ”„ Other Changes +* run-test-ios-15 in xcode 15 to fix incompatibilities with emergetools (#4319) via Cesar de la Vega (@vegaro) +* WebPurchaseRedemption: Rename `alreadyRedeemed` result to `purchaseBelongsToOtherUser` (#4542) via Toni Rico (@tonidero) +* [Paywalls] Add previews for different combinations of vertical/horizontal alignment and flex distributions (#4538) via Mark Villacampa (@MarkVillacampa) +* Renames isDeeplink to isWebLink (#4535) via Cesar de la Vega (@vegaro) +* Update Package.resolved (#4534) via Cesar de la Vega (@vegaro) +* Add repo name (#4532) via Noah Martin (@noahsmartin) +* [Paywalls] Add Emerge Snapshot Tests (#4529) via Mark Villacampa (@MarkVillacampa) +* Adds API Test for `jwsRepresentation` in obj-c (#4526) via Andy Boedo (@aboedo) +* Create `CustomerCenterEvent` (#4392) via Cesar de la Vega (@vegaro) +* [Paywalls] Add support for gradient backgrounds (#4522) via Mark Villacampa (@MarkVillacampa) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec11039329..9515fae00a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +## 5.13.0 +## RevenueCat SDK +### ✨ New Features +* Adds `subscriptions` to `CustomerInfo` (#4508) via Cesar de la Vega (@vegaro) +### 🐞 Bugfixes +* [Paywalls] Fix PaywallTester compilation on Xcode 15 (#4540) via Mark Villacampa (@MarkVillacampa) +* Paywalls: Update Finnish "restore" localization (#4493) via Jeffrey Bunn (@Jethro87) + +## RevenueCatUI SDK +### 🐞 Bugfixes +* Fix translucent navigation bar on paywalls by making it fully transparent (on iOS 16+) (#4543) via Josh Holtz (@joshdholtz) +* Fix build for app extensions (#4531) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* Adds missing revisionId to CustomerCenter impression event (#4537) via Cesar de la Vega (@vegaro) +* Customer Center deeplinks should always be opened externally (#4533) via Cesar de la Vega (@vegaro) +* Use `ManageSubscriptionsView` for users without active subscriptions (#4530) via Cesar de la Vega (@vegaro) + +### πŸ”„ Other Changes +* run-test-ios-15 in xcode 15 to fix incompatibilities with emergetools (#4319) via Cesar de la Vega (@vegaro) +* WebPurchaseRedemption: Rename `alreadyRedeemed` result to `purchaseBelongsToOtherUser` (#4542) via Toni Rico (@tonidero) +* [Paywalls] Add previews for different combinations of vertical/horizontal alignment and flex distributions (#4538) via Mark Villacampa (@MarkVillacampa) +* Renames isDeeplink to isWebLink (#4535) via Cesar de la Vega (@vegaro) +* Update Package.resolved (#4534) via Cesar de la Vega (@vegaro) +* Add repo name (#4532) via Noah Martin (@noahsmartin) +* [Paywalls] Add Emerge Snapshot Tests (#4529) via Mark Villacampa (@MarkVillacampa) +* Adds API Test for `jwsRepresentation` in obj-c (#4526) via Andy Boedo (@aboedo) +* Create `CustomerCenterEvent` (#4392) via Cesar de la Vega (@vegaro) +* [Paywalls] Add support for gradient backgrounds (#4522) via Mark Villacampa (@MarkVillacampa) + ## 5.12.1 ## RevenueCatUI SDK ### 🐞 Bugfixes diff --git a/RevenueCat.podspec b/RevenueCat.podspec index 8847659a67..93d2c8176e 100644 --- a/RevenueCat.podspec +++ b/RevenueCat.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCat" - s.version = "5.13.0-SNAPSHOT" + s.version = "5.13.0" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/RevenueCat.xcodeproj/project.pbxproj b/RevenueCat.xcodeproj/project.pbxproj index 51e69becfe..094cf6912b 100644 --- a/RevenueCat.xcodeproj/project.pbxproj +++ b/RevenueCat.xcodeproj/project.pbxproj @@ -1184,13 +1184,6 @@ remoteGlobalIDString = 2DEAC2D926EFE46E006914ED; remoteInfo = UnitTestsHostApp; }; - 4D6F4BE82CFE2FAB00353AF6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2DD5008F2C519EB4009C19B7 /* PaywallsTester.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FA29FBA82CCAA79800DA1976; - remoteInfo = PaywallsTesterTests; - }; 4F6BEE082A27B02400CD9322 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 352629F51F7C4B9100C04F2C /* Project object */; @@ -1654,7 +1647,6 @@ 4D6ABB0D2AF13FB100BB2A08 /* StoreEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreEnvironment.swift; sourceTree = ""; }; 4D6ABB0F2AF13FBD00BB2A08 /* SK2AppTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SK2AppTransaction.swift; sourceTree = ""; }; 4D6F4BCF2CF69DE300353AF6 /* ForegroundColorScheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForegroundColorScheme.swift; sourceTree = ""; }; - 4D6F4BE52CFE2FAB00353AF6 /* PaywallsTesterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaywallsTesterTests.swift; sourceTree = ""; }; 4D7A3E272B85729E00ABDE67 /* PurchasesOrchestratorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchasesOrchestratorTests.swift; sourceTree = ""; }; 4DBC30952B1DFA97001D33C7 /* StoreKitVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreKitVersion.swift; sourceTree = ""; }; 4DBF1F352B4D572400D52354 /* LocalReceiptFetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalReceiptFetcher.swift; sourceTree = ""; }; @@ -3023,7 +3015,6 @@ children = ( 2DD500402C519EB4009C19B7 /* ci_scripts */, 2DD5008E2C519EB4009C19B7 /* PaywallsTester */, - 4D6F4BE62CFE2FAB00353AF6 /* PaywallsTesterTests */, 2DD5008F2C519EB4009C19B7 /* PaywallsTester.xcodeproj */, 2DD500902C519EB4009C19B7 /* PaywallsTester.xcworkspace */, 2DD500912C519EB4009C19B7 /* Postprocessor.sh */, @@ -3179,7 +3170,6 @@ isa = PBXGroup; children = ( 2DD500F82C519EB4009C19B7 /* PaywallsTester.app */, - 4D6F4BE92CFE2FAB00353AF6 /* PaywallsTesterTests.xctest */, ); name = Products; sourceTree = ""; @@ -3909,14 +3899,6 @@ path = BasicTypes; sourceTree = ""; }; - 4D6F4BE62CFE2FAB00353AF6 /* PaywallsTesterTests */ = { - isa = PBXGroup; - children = ( - 4D6F4BE52CFE2FAB00353AF6 /* PaywallsTesterTests.swift */, - ); - path = PaywallsTesterTests; - sourceTree = ""; - }; 4F1428A52A4A1330006CD196 /* Test Data */ = { isa = PBXGroup; children = ( @@ -5460,13 +5442,6 @@ remoteRef = 2DD501092C519EB4009C19B7 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 4D6F4BE92CFE2FAB00353AF6 /* PaywallsTesterTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = PaywallsTesterTests.xctest; - remoteRef = 4D6F4BE82CFE2FAB00353AF6 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ diff --git a/RevenueCatUI.podspec b/RevenueCatUI.podspec index d4a4cf0aaa..ea5db427da 100644 --- a/RevenueCatUI.podspec +++ b/RevenueCatUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCatUI" - s.version = "5.13.0-SNAPSHOT" + s.version = "5.13.0" s.summary = "UI library for RevenueCat paywalls." s.description = <<-DESC diff --git a/Sources/Misc/SystemInfo.swift b/Sources/Misc/SystemInfo.swift index aa3de1d795..3a4b47bbfe 100644 --- a/Sources/Misc/SystemInfo.swift +++ b/Sources/Misc/SystemInfo.swift @@ -83,7 +83,7 @@ class SystemInfo { } static var frameworkVersion: String { - return "5.13.0-SNAPSHOT" + return "5.13.0" } static var systemVersion: String { diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index 2a300e41ab..2050aa33f3 100644 --- a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h +++ b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h @@ -726,12 +726,12 @@ SWIFT_CLASS_NAMED("Builder") @interface RCConfigurationBuilder (SWIFT_EXTENSION(RevenueCat)) -- (RCConfigurationBuilder * _Nonnull)withUsesStoreKit2IfAvailable:(BOOL)usesStoreKit2IfAvailable SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use .with(storeKitVersion:) to enable StoreKit 2"); +- (RCConfigurationBuilder * _Nonnull)withObserverMode:(BOOL)observerMode SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(macos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy."); @end @interface RCConfigurationBuilder (SWIFT_EXTENSION(RevenueCat)) -- (RCConfigurationBuilder * _Nonnull)withObserverMode:(BOOL)observerMode SWIFT_WARN_UNUSED_RESULT SWIFT_AVAILABILITY(macos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(watchos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(tvos,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy.") SWIFT_AVAILABILITY(ios,obsoleted=1,message="'with' has been renamed to 'withPurchasesAreCompletedBy:storeKitVersion:': Observer Mode is now named PurchasesAreCompletedBy."); +- (RCConfigurationBuilder * _Nonnull)withUsesStoreKit2IfAvailable:(BOOL)usesStoreKit2IfAvailable SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use .with(storeKitVersion:) to enable StoreKit 2"); @end /// Specifies the behavior for a caching API. @@ -807,7 +807,6 @@ SWIFT_CLASS_NAMED("Configuration") - @interface RCConfiguration (SWIFT_EXTENSION(RevenueCat)) @end @@ -845,10 +844,12 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCEntitlementVerificationMode, "EntitlementV }; + @class RCEntitlementInfos; @class NSDate; @class RCNonSubscriptionTransaction; @class NSURL; +@class RCSubscriptionInfo; /// A container for the most recent customer info returned from Purchases. /// These objects are non-mutable and do not update automatically. @@ -911,6 +912,8 @@ SWIFT_CLASS_NAMED("CustomerInfo") /// note: /// This can be nil, see -Purchases.restorePurchases(completion:) @property (nonatomic, readonly, copy) NSString * _Nullable originalApplicationVersion; +/// Dictionary of all subscription product identifiers and their subscription info +@property (nonatomic, readonly, copy) NSDictionary * _Nonnull subscriptionsByProductIdentifier; /// Get the expiration date for a given product identifier. You should use Entitlements though! /// \param productIdentifier Product identifier for product /// @@ -958,11 +961,11 @@ SWIFT_CLASS_NAMED("CustomerInfo") + @interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat)) @property (nonatomic, readonly, copy) NSDictionary * _Nonnull rawData; @end - @class RCStoreTransaction; @interface RCCustomerInfo (SWIFT_EXTENSION(RevenueCat)) @@ -1241,7 +1244,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCPurchasesErrorCode, "ErrorCode", open) { RCSignatureVerificationFailed SWIFT_COMPILE_NAME("signatureVerificationFailed") = 37, RCFeatureNotSupportedWithStoreKit1 SWIFT_COMPILE_NAME("featureNotSupportedWithStoreKit1") = 38, RCInvalidWebPurchaseToken SWIFT_COMPILE_NAME("invalidWebPurchaseToken") = 39, - RCAlreadyRedeemedWebPurchaseToken SWIFT_COMPILE_NAME("alreadyRedeemedWebPurchaseToken") = 40, + RCPurchaseBelongsToOtherUser SWIFT_COMPILE_NAME("purchaseBelongsToOtherUser") = 40, RCExpiredWebPurchaseToken SWIFT_COMPILE_NAME("expiredWebPurchaseToken") = 41, }; static NSString * _Nonnull const RCPurchasesErrorCodeDomain = @"RevenueCat.ErrorCode"; @@ -1411,6 +1414,8 @@ SWIFT_CLASS_NAMED("NonSubscriptionTransaction") @property (nonatomic, readonly, copy) NSString * _Nonnull transactionIdentifier; /// The unique identifier for the transaction created by the Store. @property (nonatomic, readonly, copy) NSString * _Nonnull storeTransactionIdentifier; +/// The Store where this transaction was performed. +@property (nonatomic, readonly) enum RCStore store; @property (nonatomic, readonly, copy) NSString * _Nonnull description; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @@ -2855,7 +2860,6 @@ SWIFT_CLASS_NAMED("PlatformInfo") - SWIFT_AVAILABILITY(visionos,introduced=2.0) SWIFT_AVAILABILITY(watchos,introduced=11.0) SWIFT_AVAILABILITY(tvos,introduced=18.0) SWIFT_AVAILABILITY(macos,introduced=15.0) SWIFT_AVAILABILITY(ios,introduced=18.0) @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) /// Returns the win-back offers that the subscriber is eligible for on the provided product. @@ -2881,6 +2885,7 @@ SWIFT_AVAILABILITY(visionos,introduced=2.0) SWIFT_AVAILABILITY(watchos,introduce + @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) - (void)logIn:(NSString * _Nonnull)appUserID completion:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, BOOL, NSError * _Nullable))completion; - (void)logIn:(NSString * _Nonnull)appUserID completionHandler:(void (^ _Nonnull)(RCCustomerInfo * _Nullable, BOOL, NSError * _Nullable))completionHandler; @@ -3017,6 +3022,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE @end + @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) /// Parses a deep link URL to verify it’s a RevenueCat web purchase redemption link /// seealso: @@ -3024,6 +3030,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE + (RCWebPurchaseRedemption * _Nullable)parseAsWebPurchaseRedemption:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly, copy) NSString * _Nonnull appUserID; @property (nonatomic, readonly) BOOL isAnonymous; +@property (nonatomic, readonly) BOOL isSandbox; - (void)getOfferingsWithCompletion:(void (^ _Nonnull)(RCOfferings * _Nullable, NSError * _Nullable))completion; - (void)offeringsWithCompletionHandler:(void (^ _Nonnull)(RCOfferings * _Nullable, NSError * _Nullable))completionHandler; @property (nonatomic, readonly, strong) RCOfferings * _Nullable cachedOfferings; @@ -3032,7 +3039,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE - @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) - (void)collectDeviceIdentifiers SWIFT_AVAILABILITY(maccatalyst,deprecated=0.0.1,message="'collectDeviceIdentifiers' has been renamed to 'attribution.collectDeviceIdentifiers()'") SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'collectDeviceIdentifiers' has been renamed to 'attribution.collectDeviceIdentifiers()'") SWIFT_AVAILABILITY(watchos,deprecated=0.0.1,message="'collectDeviceIdentifiers' has been renamed to 'attribution.collectDeviceIdentifiers()'") SWIFT_AVAILABILITY(tvos,deprecated=0.0.1,message="'collectDeviceIdentifiers' has been renamed to 'attribution.collectDeviceIdentifiers()'") SWIFT_AVAILABILITY(ios,deprecated=0.0.1,message="'collectDeviceIdentifiers' has been renamed to 'attribution.collectDeviceIdentifiers()'"); - (void)setAttributes:(NSDictionary * _Nonnull)attributes SWIFT_AVAILABILITY(maccatalyst,deprecated=0.0.1,message="'setAttributes' has been renamed to 'attribution.setAttributes(_:)'") SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'setAttributes' has been renamed to 'attribution.setAttributes(_:)'") SWIFT_AVAILABILITY(watchos,deprecated=0.0.1,message="'setAttributes' has been renamed to 'attribution.setAttributes(_:)'") SWIFT_AVAILABILITY(tvos,deprecated=0.0.1,message="'setAttributes' has been renamed to 'attribution.setAttributes(_:)'") SWIFT_AVAILABILITY(ios,deprecated=0.0.1,message="'setAttributes' has been renamed to 'attribution.setAttributes(_:)'"); @@ -3413,7 +3419,6 @@ SWIFT_CLASS("_TtC10RevenueCat22PurchasesReceiptParser") - @interface PurchasesReceiptParser (SWIFT_EXTENSION(RevenueCat)) /// A default instance of PurchasesReceiptParser SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=default) PurchasesReceiptParser * _Nonnull default_;) @@ -3422,6 +3427,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau + SWIFT_CLASS("_TtC10RevenueCat21RCPurchasesErrorUtils") SWIFT_AVAILABILITY(maccatalyst,obsoleted=1) SWIFT_AVAILABILITY(macos,obsoleted=1) SWIFT_AVAILABILITY(watchos,obsoleted=1) SWIFT_AVAILABILITY(tvos,obsoleted=1) SWIFT_AVAILABILITY(ios,obsoleted=1) @interface RCPurchasesErrorUtils : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @@ -3848,6 +3854,71 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) RCStorefront + (RCStorefront * _Nullable)sk1CurrentStorefront SWIFT_WARN_UNUSED_RESULT; @end + +/// Subscription purchases of the Customer +SWIFT_CLASS_NAMED("SubscriptionInfo") +@interface RCSubscriptionInfo : NSObject +/// The product identifier. +@property (nonatomic, readonly, copy) NSString * _Nonnull productIdentifier; +/// Date when the last subscription period started. +@property (nonatomic, readonly, copy) NSDate * _Nonnull purchaseDate; +/// Date when this subscription first started. This property does not update with renewals. +/// This property also does not update for product changes within a subscription group or +/// resubscriptions by lapsed subscribers. +@property (nonatomic, readonly, copy) NSDate * _Nullable originalPurchaseDate; +/// Date when the subscription expires/expired +@property (nonatomic, readonly, copy) NSDate * _Nullable expiresDate; +/// Store where the subscription was purchased. +@property (nonatomic, readonly) enum RCStore store; +/// Whether or not the purchase was made in sandbox mode. +@property (nonatomic, readonly) BOOL isSandbox; +/// Date when RevenueCat detected that auto-renewal was turned off for this subsription. +/// Note the subscription may still be active, check the expiresDate attribute. +@property (nonatomic, readonly, copy) NSDate * _Nullable unsubscribeDetectedAt; +/// Date when RevenueCat detected any billing issues with this subscription. +/// If and when the billing issue gets resolved, this field is set to nil. +/// Note the subscription may still be active, check the expiresDate attribute. +@property (nonatomic, readonly, copy) NSDate * _Nullable billingIssuesDetectedAt; +/// Date when any grace period for this subscription expires/expired. +/// nil if the customer has never been in a grace period. +@property (nonatomic, readonly, copy) NSDate * _Nullable gracePeriodExpiresDate; +/// How the Customer received access to this subscription: +///
    +///
  • +/// PurchaseOwnershipType/purchased: The customer bought the subscription. +///
  • +///
  • +/// PurchaseOwnershipType/familyShared: The Customer has access to the product via their family. +///
  • +///
+@property (nonatomic, readonly) enum RCPurchaseOwnershipType ownershipType; +/// Type of the current subscription period: +///
    +///
  • +/// PeriodType/normal: The product is in a normal period (default) +///
  • +///
  • +/// PeriodType/trial: The product is in a free trial period +///
  • +///
  • +/// PeriodType/intro: The product is in an introductory pricing period +///
  • +///
+@property (nonatomic, readonly) enum RCPeriodType periodType; +/// Date when RevenueCat detected a refund of this subscription. +@property (nonatomic, readonly, copy) NSDate * _Nullable refundedAt; +/// The transaction id in the store of the subscription. +@property (nonatomic, readonly, copy) NSString * _Nullable storeTransactionId; +/// Whether the subscription is currently active. +@property (nonatomic, readonly) BOOL isActive; +/// Whether the subscription will renew at the next billing period. +@property (nonatomic, readonly) BOOL willRenew; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + enum RCSubscriptionPeriodUnit : NSInteger; /// The duration of time between subscription renewals. @@ -3883,13 +3954,13 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) { @interface RCSubscriptionPeriod (SWIFT_EXTENSION(RevenueCat)) -/// The number of units per subscription period -@property (nonatomic, readonly) NSInteger numberOfUnits SWIFT_AVAILABILITY(macos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(watchos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(tvos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(ios,unavailable,message="'numberOfUnits' has been renamed to 'value'"); +@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription; @end @interface RCSubscriptionPeriod (SWIFT_EXTENSION(RevenueCat)) -@property (nonatomic, readonly, copy) NSString * _Nonnull debugDescription; +/// The number of units per subscription period +@property (nonatomic, readonly) NSInteger numberOfUnits SWIFT_AVAILABILITY(macos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(watchos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(tvos,unavailable,message="'numberOfUnits' has been renamed to 'value'") SWIFT_AVAILABILITY(ios,unavailable,message="'numberOfUnits' has been renamed to 'value'"); @end diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj index 46e213187a..3bf18c548f 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 56; objects = { /* Begin PBXBuildFile section */ @@ -58,19 +58,8 @@ 88DFC1932BCF490400273B6D /* OfferingsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88DFC1922BCF490400273B6D /* OfferingsResponse.swift */; }; 88DFC1942BCF490400273B6D /* PaywallsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88DFC1912BCF490400273B6D /* PaywallsResponse.swift */; }; 88DFC1972BCF4A5100273B6D /* MockData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88DFC1952BCF4A4300273B6D /* MockData.swift */; }; - FA29FBB22CCAA7A500DA1976 /* SnapshottingTests in Frameworks */ = {isa = PBXBuildFile; productRef = FA29FBB12CCAA7A500DA1976 /* SnapshottingTests */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - FA29FBAC2CCAA79800DA1976 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 4F6BED922A26A64200CD9322 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4F6BED992A26A64200CD9322; - remoteInfo = PaywallsTester; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXCopyFilesBuildPhase section */ 4F6BEDD72A26A68E00CD9322 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -86,7 +75,6 @@ /* Begin PBXFileReference section */ 2DBCEDFC2AC4BC060064C274 /* PaywallViewMode+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PaywallViewMode+Extensions.swift"; sourceTree = ""; }; - 4D2E84DB2D00EDA100C639D9 /* PaywallsTesterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaywallsTesterTests.swift; sourceTree = ""; }; 4F0B5EA02A97CD9300DB0FC9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 4F0B5EA12A97CDAC00DB0FC9 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; 4F102E262A840ECC0059EED6 /* CustomPaywall.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPaywall.swift; sourceTree = ""; }; @@ -150,7 +138,6 @@ 88DFC1912BCF490400273B6D /* PaywallsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaywallsResponse.swift; sourceTree = ""; }; 88DFC1922BCF490400273B6D /* OfferingsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfferingsResponse.swift; sourceTree = ""; }; 88DFC1952BCF4A4300273B6D /* MockData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockData.swift; sourceTree = ""; }; - FA29FBA82CCAA79800DA1976 /* PaywallsTesterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PaywallsTesterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -164,25 +151,9 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FA29FBA52CCAA79800DA1976 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FA29FBB22CCAA7A500DA1976 /* SnapshottingTests in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4D2E84DC2D00EDA100C639D9 /* PaywallsTesterTests */ = { - isa = PBXGroup; - children = ( - 4D2E84DB2D00EDA100C639D9 /* PaywallsTesterTests.swift */, - ); - path = PaywallsTesterTests; - sourceTree = ""; - }; 4F34FF682A60AEE300AADF11 /* UI */ = { isa = PBXGroup; children = ( @@ -199,7 +170,6 @@ 773C13462CB5865400219E42 /* Local.xcconfig */, 4F4EE7D02A5731CF00D7EAE1 /* purchases-ios */, 4FC046BB2A572E3700A28BCF /* PaywallsTester */, - 4D2E84DC2D00EDA100C639D9 /* PaywallsTesterTests */, 4F6BED9B2A26A64200CD9322 /* Products */, 4F6BEDCC2A26A68E00CD9322 /* Frameworks */, ); @@ -209,7 +179,6 @@ isa = PBXGroup; children = ( 4F6BED9A2A26A64200CD9322 /* PaywallsTester.app */, - FA29FBA82CCAA79800DA1976 /* PaywallsTesterTests.xctest */, ); name = Products; sourceTree = ""; @@ -402,27 +371,6 @@ productReference = 4F6BED9A2A26A64200CD9322 /* PaywallsTester.app */; productType = "com.apple.product-type.application"; }; - FA29FBA72CCAA79800DA1976 /* PaywallsTesterTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = FA29FBAE2CCAA79800DA1976 /* Build configuration list for PBXNativeTarget "PaywallsTesterTests" */; - buildPhases = ( - FA29FBA42CCAA79800DA1976 /* Sources */, - FA29FBA52CCAA79800DA1976 /* Frameworks */, - FA29FBA62CCAA79800DA1976 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FA29FBAD2CCAA79800DA1976 /* PBXTargetDependency */, - ); - name = PaywallsTesterTests; - packageProductDependencies = ( - FA29FBB12CCAA7A500DA1976 /* SnapshottingTests */, - ); - productName = PaywallsTesterTests; - productReference = FA29FBA82CCAA79800DA1976 /* PaywallsTesterTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -430,16 +378,12 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1600; + LastSwiftUpdateCheck = 1430; LastUpgradeCheck = 1430; TargetAttributes = { 4F6BED992A26A64200CD9322 = { CreatedOnToolsVersion = 14.3; }; - FA29FBA72CCAA79800DA1976 = { - CreatedOnToolsVersion = 16.0; - TestTargetID = 4F6BED992A26A64200CD9322; - }; }; }; buildConfigurationList = 4F6BED952A26A64200CD9322 /* Build configuration list for PBXProject "PaywallsTester" */; @@ -458,14 +402,12 @@ ); mainGroup = 4F6BED912A26A64200CD9322; packageReferences = ( - FA29FBA12CCAA76E00DA1976 /* XCRemoteSwiftPackageReference "SnapshotPreviews" */, ); productRefGroup = 4F6BED9B2A26A64200CD9322 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 4F6BED992A26A64200CD9322 /* PaywallsTester */, - FA29FBA72CCAA79800DA1976 /* PaywallsTesterTests */, ); }; /* End PBXProject section */ @@ -481,13 +423,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FA29FBA62CCAA79800DA1976 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -543,23 +478,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FA29FBA42CCAA79800DA1976 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - FA29FBAD2CCAA79800DA1976 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 4F6BED992A26A64200CD9322 /* PaywallsTester */; - targetProxy = FA29FBAC2CCAA79800DA1976 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 4F4557E42A6FFE6A00160521 /* Localizable.strings */ = { isa = PBXVariantGroup; @@ -789,54 +709,6 @@ }; name = Release; }; - FA29FBAF2CCAA79800DA1976 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.PaywallsTesterTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PaywallsTester.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PaywallsTester"; - }; - name = Debug; - }; - FA29FBB02CCAA79800DA1976 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.PaywallsTesterTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PaywallsTester.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PaywallsTester"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -858,28 +730,8 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FA29FBAE2CCAA79800DA1976 /* Build configuration list for PBXNativeTarget "PaywallsTesterTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FA29FBAF2CCAA79800DA1976 /* Debug */, - FA29FBB02CCAA79800DA1976 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ -/* Begin XCRemoteSwiftPackageReference section */ - FA29FBA12CCAA76E00DA1976 /* XCRemoteSwiftPackageReference "SnapshotPreviews" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 0.10.16; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 4F4EE7D12A5731E800D7EAE1 /* RevenueCat */ = { isa = XCSwiftPackageProductDependency; @@ -889,11 +741,6 @@ isa = XCSwiftPackageProductDependency; productName = RevenueCatUI; }; - FA29FBB12CCAA7A500DA1976 /* SnapshottingTests */ = { - isa = XCSwiftPackageProductDependency; - package = FA29FBA12CCAA76E00DA1976 /* XCRemoteSwiftPackageReference "SnapshotPreviews" */; - productName = SnapshottingTests; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 4F6BED922A26A64200CD9322 /* Project object */; diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/xcshareddata/xcschemes/PaywallsTester - Live Config.xcscheme b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/xcshareddata/xcschemes/PaywallsTester - Live Config.xcscheme index 45215ff4a6..0029172252 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/xcshareddata/xcschemes/PaywallsTester - Live Config.xcscheme +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/xcshareddata/xcschemes/PaywallsTester - Live Config.xcscheme @@ -64,19 +64,6 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" shouldAutocreateTestPlan = "YES"> - - - - - - - - - - - - - + diff --git a/scripts/docs/v4_api_migration_guide.html b/scripts/docs/v4_api_migration_guide.html index b977dbcc6a..61f8742077 100644 --- a/scripts/docs/v4_api_migration_guide.html +++ b/scripts/docs/v4_api_migration_guide.html @@ -2,7 +2,7 @@ - + diff --git a/scripts/docs/v5_api_migration_guide.html b/scripts/docs/v5_api_migration_guide.html index ca91c0e02f..fd60b34990 100644 --- a/scripts/docs/v5_api_migration_guide.html +++ b/scripts/docs/v5_api_migration_guide.html @@ -2,7 +2,7 @@ - +