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..57fc63780d 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,3 +1,21 @@ +## RevenueCat SDK +### ✨ New Features +* Adds `subscriptions` to `CustomerInfo` (#4508) via Cesar de la Vega (@vegaro) +### 🐞 Bugfixes +* 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 build for app extensions (#4531) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* 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 +* 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..fda9cd1ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +## 5.13.0 +## RevenueCat SDK +### ✨ New Features +* Adds `subscriptions` to `CustomerInfo` (#4508) via Cesar de la Vega (@vegaro) +### 🐞 Bugfixes +* Paywalls: Update Finnish "restore" localization (#4493) via Jeffrey Bunn (@Jethro87) + +## RevenueCatUI SDK +### 🐞 Bugfixes +* Fix build for app extensions (#4531) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* 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 +* 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/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..a9fe587bac 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)) @@ -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/scripts/docs/index.html b/scripts/docs/index.html index a8b6cbe1cd..74decd934f 100644 --- a/scripts/docs/index.html +++ b/scripts/docs/index.html @@ -2,7 +2,7 @@ - + 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 @@ - +