diff --git a/.version b/.version index 8227564ff5..ad95545a81 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -5.17.0-SNAPSHOT +5.17.0 diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index 6066b884ac..2d364b859d 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,19 +1,21 @@ ## RevenueCat SDK -### 🐞 Bugfixes -* Always call readyForPromotedProduct on main thread/actor (#4613) via Will Taylor (@fire-at-will) +### Paywallv2 +#### 🐞 Bugfixes +* Fix period abbreviated when multiple days/weeks/months/years (#4769) via Josh Holtz (@joshdholtz) ## RevenueCatUI SDK -### 🐞 Bugfixes -* Fix Gradient Preview on iOS 15 (#4762) via Will Taylor (@fire-at-will) +### Customer Center +#### ✨ New Features +* feat: Dont show cancel path if lifetime subscription (#4755) via Facundo Menzella (@facumenzella) +* feat: Enable cancellation in CustomerCenter for catalyst (#4768) via Facundo Menzella (@facumenzella) +#### 🐞 Bugfixes +* fix: Track impression in CustomerCenter only once (#4778) via Facundo Menzella (@facumenzella) +* Fix for survey answered event not being tracked when not setting a `customerCenterActionHandler` (#4777) via Cesar de la Vega (@vegaro) +### Paywallv2 +#### 🐞 Bugfixes +* Hooks up purchase handler preference keys for Paywalls V2 (#4780) via Josh Holtz (@joshdholtz) +* Fixed issues with finding some locales (ex: `zh-Hans` and `zh-Hant`) (#4771) via Josh Holtz (@joshdholtz) ### πŸ”„ Other Changes -* chore: Tweak default copy for dateWhenAppWasPurchased (#4703) via Facundo Menzella (@facumenzella) -* Rename RC Billing to Web Billing (#4734) via Antonio Borrero Granell (@antoniobg) -* Document Weak PurchasesDelegate Reference (#4756) via Will Taylor (@fire-at-will) -* chore: A simple message for posterity (#4758) via Facundo Menzella (@facumenzella) -* UI preview mode/always fetch offerings (#4754) via Antonio Pallares (@ajpallares) -* feat: Add tests for customer center events encoding (#4739) via Facundo Menzella (@facumenzella) -* UI Preview Mode: add extra header to network requests (#4752) via Antonio Pallares (@ajpallares) -* chore: Avoid gemfile.lock updates by fixing dependencies (#4694) via Facundo Menzella (@facumenzella) -* UI Preview Mode: mock products (#4735) via Antonio Pallares (@ajpallares) -* [Paywalls] Add extra gradient previews (#4750) via Mark Villacampa (@MarkVillacampa) +* feat: Introduce ISODurationFormatter (#4776) via Facundo Menzella (@facumenzella) +* [Paywalls V2] Support generic fonts (#4766) via Josh Holtz (@joshdholtz) diff --git a/CHANGELOG.md b/CHANGELOG.md index 649aaf8b23..e3a569776f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +## 5.17.0 +## RevenueCat SDK +### Paywallv2 +#### 🐞 Bugfixes +* Fix period abbreviated when multiple days/weeks/months/years (#4769) via Josh Holtz (@joshdholtz) + +## RevenueCatUI SDK +### Customer Center +#### ✨ New Features +* feat: Dont show cancel path if lifetime subscription (#4755) via Facundo Menzella (@facumenzella) +* feat: Enable cancellation in CustomerCenter for catalyst (#4768) via Facundo Menzella (@facumenzella) +#### 🐞 Bugfixes +* fix: Track impression in CustomerCenter only once (#4778) via Facundo Menzella (@facumenzella) +* Fix for survey answered event not being tracked when not setting a `customerCenterActionHandler` (#4777) via Cesar de la Vega (@vegaro) +### Paywallv2 +#### 🐞 Bugfixes +* Hooks up purchase handler preference keys for Paywalls V2 (#4780) via Josh Holtz (@joshdholtz) +* Fixed issues with finding some locales (ex: `zh-Hans` and `zh-Hant`) (#4771) via Josh Holtz (@joshdholtz) + +### πŸ”„ Other Changes +* feat: Introduce ISODurationFormatter (#4776) via Facundo Menzella (@facumenzella) +* [Paywalls V2] Support generic fonts (#4766) via Josh Holtz (@joshdholtz) + ## 5.16.1 ## RevenueCat SDK ### 🐞 Bugfixes diff --git a/RevenueCat.podspec b/RevenueCat.podspec index eae6093efb..7d23b06cd7 100644 --- a/RevenueCat.podspec +++ b/RevenueCat.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCat" - s.version = "5.17.0-SNAPSHOT" + s.version = "5.17.0" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/RevenueCatUI.podspec b/RevenueCatUI.podspec index fbdef464dd..af4fd5c258 100644 --- a/RevenueCatUI.podspec +++ b/RevenueCatUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCatUI" - s.version = "5.17.0-SNAPSHOT" + s.version = "5.17.0" s.summary = "UI library for RevenueCat paywalls." s.description = <<-DESC diff --git a/RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift b/RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift index 1ce3168792..ac2136c56b 100644 --- a/RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift +++ b/RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift @@ -481,60 +481,51 @@ struct TextComponentView_Previews: PreviewProvider { .previewLayout(.sizeThatFits) .previewDisplayName("Condition - Has medium but not medium") - // Process variable (V2) - TextComponentView( - // swiftlint:disable:next force_try - viewModel: try! .init( - localizationProvider: .init( - locale: Locale.current, - localizedStrings: [ - "id_1": .string( - "{{ product.store_product_name }} is " + - "{{ product.price_per_period }} " + - "({{ product.relative_discount }})" - ) - ] - ), - uiConfigProvider: .init(uiConfig: PreviewUIConfig.make()), - component: .init( - text: "id_1", - color: .init(light: .hex("#000000")) + VStack { + // Process variable (V2) + TextComponentView( + // swiftlint:disable:next force_try + viewModel: try! .init( + localizationProvider: .init( + locale: Locale.current, + localizedStrings: [ + "id_1": .string( + "{{ product.store_product_name }} is " + + "{{ product.price_per_period }} " + + "({{ product.relative_discount }})" + ) + ] + ), + uiConfigProvider: .init(uiConfig: PreviewUIConfig.make()), + component: .init( + text: "id_1", + color: .init(light: .hex("#000000")) + ) ) ) - ) - .previewRequiredEnvironmentProperties( - packageContext: .init( - package: PreviewMock.annualStandardPackage, - variableContext: .init(packages: [ - PreviewMock.monthlyStandardPackage, - PreviewMock.annualStandardPackage - ]) - ) - ) - .previewLayout(.sizeThatFits) - .previewDisplayName("Process variable (V2)") - // Process variable (V1) - TextComponentView( - // swiftlint:disable:next force_try - viewModel: try! .init( - localizationProvider: .init( - locale: Locale.current, - localizedStrings: [ - "id_1": .string( - "{{ product_name }} is " + - "{{ price_per_period_full }} " + - "({{ sub_relative_discount }})" - ) - ] - ), - uiConfigProvider: .init(uiConfig: PreviewUIConfig.make()), - component: .init( - text: "id_1", - color: .init(light: .hex("#000000")) + // Process variable (V1) + TextComponentView( + // swiftlint:disable:next force_try + viewModel: try! .init( + localizationProvider: .init( + locale: Locale.current, + localizedStrings: [ + "id_1": .string( + "{{ product_name }} is " + + "{{ price_per_period_full }} " + + "({{ sub_relative_discount }})" + ) + ] + ), + uiConfigProvider: .init(uiConfig: PreviewUIConfig.make()), + component: .init( + text: "id_1", + color: .init(light: .hex("#000000")) + ) ) ) - ) + } .previewRequiredEnvironmentProperties( packageContext: .init( package: PreviewMock.annualStandardPackage, @@ -545,7 +536,8 @@ struct TextComponentView_Previews: PreviewProvider { ) ) .previewLayout(.sizeThatFits) - .previewDisplayName("Process variable (V1)") + .previewDisplayName("Process variable") + } } diff --git a/Sources/Misc/SystemInfo.swift b/Sources/Misc/SystemInfo.swift index 9246030116..df4713816f 100644 --- a/Sources/Misc/SystemInfo.swift +++ b/Sources/Misc/SystemInfo.swift @@ -83,7 +83,7 @@ class SystemInfo { } static var frameworkVersion: String { - return "5.17.0-SNAPSHOT" + return "5.17.0" } static var systemVersion: String { diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index b66dd90f20..157573b638 100644 --- a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h +++ b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h @@ -2921,35 +2921,6 @@ SWIFT_AVAILABILITY(visionos,introduced=2.0) SWIFT_AVAILABILITY(watchos,introduce @end -@interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) -/// Enable debug logging. Useful for debugging issues with the lovely team @RevenueCat. -SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DEPRECATED_MSG("use Purchases.logLevel instead");) -+ (BOOL)debugLogsEnabled SWIFT_WARN_UNUSED_RESULT; -+ (void)setDebugLogsEnabled:(BOOL)newValue; -/// Deprecated -@property (nonatomic) BOOL allowSharingAppStoreAccount SWIFT_DEPRECATED_MSG("\n Configure behavior through the RevenueCat dashboard instead. If you have configured the \"Legacy\" restore\n behavior in the [RevenueCat Dashboard](app.revenuecat.com) and are currently setting this to `true`, keep\n this setting active.\n "); -/// Deprecated. Where responsibility for completing purchase transactions lies. -@property (nonatomic) BOOL finishTransactions SWIFT_DEPRECATED_MSG("Use ``purchasesAreCompletedBy`` instead."); -/// Deprecated -+ (void)addAttributionData:(NSDictionary * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set functions instead"); -/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns. -///

Related articles

-/// -/// \param data Dictionary provided by the network. -/// -/// \param network Enum for the network the data is coming from, see AttributionNetwork for supported -/// networks. -/// -/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id. -/// -+ (void)addAttributionData:(NSDictionary * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set functions instead"); -@end - - @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) /// Configures an instance of the Purchases SDK with a specified Configuration. /// The instance will be set as a singleton. @@ -3047,6 +3018,35 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DE @end +@interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) +/// Enable debug logging. Useful for debugging issues with the lovely team @RevenueCat. +SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL debugLogsEnabled SWIFT_DEPRECATED_MSG("use Purchases.logLevel instead");) ++ (BOOL)debugLogsEnabled SWIFT_WARN_UNUSED_RESULT; ++ (void)setDebugLogsEnabled:(BOOL)newValue; +/// Deprecated +@property (nonatomic) BOOL allowSharingAppStoreAccount SWIFT_DEPRECATED_MSG("\n Configure behavior through the RevenueCat dashboard instead. If you have configured the \"Legacy\" restore\n behavior in the [RevenueCat Dashboard](app.revenuecat.com) and are currently setting this to `true`, keep\n this setting active.\n "); +/// Deprecated. Where responsibility for completing purchase transactions lies. +@property (nonatomic) BOOL finishTransactions SWIFT_DEPRECATED_MSG("Use ``purchasesAreCompletedBy`` instead."); +/// Deprecated ++ (void)addAttributionData:(NSDictionary * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set functions instead"); +/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns. +///

Related articles

+/// +/// \param data Dictionary provided by the network. +/// +/// \param network Enum for the network the data is coming from, see AttributionNetwork for supported +/// networks. +/// +/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id. +/// ++ (void)addAttributionData:(NSDictionary * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set functions instead"); +@end + + @interface RCPurchases (SWIFT_EXTENSION(RevenueCat)) /// Parses a deep link URL to verify it’s a RevenueCat web purchase redemption link @@ -3407,6 +3407,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau @end + @interface RCPurchasesDiagnostics (SWIFT_EXTENSION(RevenueCat)) /// Perform tests to ensure SDK is configured correctly. ///
    @@ -3420,7 +3421,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau - /// A type that can parse Apple receipts from a device. /// This implements parsing based on Apple’s documentation. /// To use this class you must access PurchasesReceiptParser/default: @@ -3438,12 +3438,12 @@ SWIFT_CLASS("_TtC10RevenueCat22PurchasesReceiptParser") + @interface PurchasesReceiptParser (SWIFT_EXTENSION(RevenueCat)) - (BOOL)receiptHasTransactionsWithReceiptData:(NSData * _Nonnull)receiptData SWIFT_WARN_UNUSED_RESULT; @end - @interface PurchasesReceiptParser (SWIFT_EXTENSION(RevenueCat)) /// A default instance of PurchasesReceiptParser SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=default) PurchasesReceiptParser * _Nonnull default_;) @@ -4025,18 +4025,19 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCSubscriptionPeriodUnit, "Unit", open) { @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 @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 + SWIFT_CLASS("_TtC10RevenueCat20TrackingManagerProxy") @interface TrackingManagerProxy : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull authorizationStatusPropertyName; diff --git a/Tests/RevenueCatUITests/CustomerCenter/FeedbackSurveyViewModelTests.swift b/Tests/RevenueCatUITests/CustomerCenter/FeedbackSurveyViewModelTests.swift index aed16003bd..554bbf4521 100644 --- a/Tests/RevenueCatUITests/CustomerCenter/FeedbackSurveyViewModelTests.swift +++ b/Tests/RevenueCatUITests/CustomerCenter/FeedbackSurveyViewModelTests.swift @@ -18,6 +18,8 @@ import Nimble @testable import RevenueCatUI import XCTest +#if os(iOS) + @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) @available(macOS, unavailable) @available(tvOS, unavailable) @@ -492,3 +494,5 @@ private struct MockStoreProductDiscount: StoreProductDiscountType { let type: StoreProductDiscount.DiscountType } + +#endif diff --git a/scripts/docs/index.html b/scripts/docs/index.html index 80a2afbe49..024ea767ed 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 c922503828..7ec1219b20 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 c01ac57fbc..08f53f4b12 100644 --- a/scripts/docs/v5_api_migration_guide.html +++ b/scripts/docs/v5_api_migration_guide.html @@ -2,7 +2,7 @@ - +