diff --git a/.version b/.version index 98c2e7688f..1bc788d3b6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -5.6.0-SNAPSHOT +5.6.0 diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index 950966de0f..d622a35eef 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,134 +1,27 @@ -## πŸ«‚ Customer Center Beta πŸ«‚ - -This release adds public beta support for the new Customer Center on iOS 15.0+. - -This central hub is a self-service section that can be added to your app to help your users manage their subscriptions on their own, reducing the support burden on developers -like you so you can spend more time building apps and less time dealing with support issues. We are hoping adding this new section to your app can help you reduce customer support -interactions, obtain feedback from your users and ultimately reduce churn by retaining them as subscribers, helping you make more money. - -See our [Customer Center documentation](https://www.revenuecat.com/docs/tools/customer-center) for more information. - -### Features currently available -* Users can cancel current subscriptions -* Users can ask for refunds -* Users can change their subscription plans -* Users can restore previous purchases and contact your support email if they have trouble restoring -* Users will be asked to update their app if they are on an older version before being able to contact your support email -* Developers can ask for reasons for cancellations or refunds, and automatically offer promo offers to retain users -* Configuration is done in the RevenueCat dashboard, and advanced configuration is available via JSON - -### Limitations -* Only available on iOS 15+ -* Limited visual configuration options in the dashboard. It is possible to configure the Customer Center via JSON. -* We are exposing a SwiftUI view and a modifier at the moment. We haven't built a UIKit wrapper to help integrating on UIKit apps, but it's in the roadmap. - -### How to enable -You can use the CustomerCenterView view directly: - -```swift -var body: some View { - Group { - NavigationStack { - HomeView() - .navigationTitle("Home") - .navigationBarTitleDisplayMode(.inline) - .toolbar { - ToolbarItem(placement: .topBarLeading) { - Button { - } label: { - Image(systemName: "line.3.horizontal") - } - } - ToolbarItem(placement: .topBarTrailing) { - Button { - self.isCustomerCenterPresented = true - } label: { - Image(systemName: "person.crop.circle") - } - } - } - } - } - .foregroundColor(.white) - .sheet(isPresented: $isCustomerCenterPresented) { - CustomerCenterView() - } -} -``` - -Or you can use the modifier: - -```swift -VStack { - Button { - self.presentingCustomerCenter = true - } label: { - TemplateLabel(name: "Customer Center", icon: "person.fill") - } -} -.presentCustomerCenter(isPresented: self.$presentingCustomerCenter) { - self.presentingCustomerCenter = false -} -``` - -### Listening to events - -You can listen to events in the Customer Center using the `customerCenterActionHandler` closure: - -```swift -CustomerCenterView { customerCenterAction in - switch customerCenterAction { - case .restoreStarted: - case .restoreFailed(_): - case .restoreCompleted(_): - case .showingManageSubscriptions: - case .refundRequestStarted(_): - case .refundRequestCompleted(_): - } -} -``` - -or if using the modifier: - -```swift -.presentCustomerCenter( - isPresented: self.$presentingCustomerCenter, - customerCenterActionHandler: { action in - switch action { - case .restoreCompleted(let customerInfo): - case .restoreStarted: - case .restoreFailed(let error): - case .showingManageSubscriptions: - case .refundRequestStarted(let productId): - case .refundRequestCompleted(let status): - case .feedbackSurveyCompleted(let surveyOptionID): - } - } -) { - self.presentingCustomerCenter = false -} -``` - -## Release Notes - -### RevenueCatUI SDK -#### Paywall Components -##### 🐞 Bugfixes -* Match text, image, and stack properties and behaviors from dashboard (#4261) via Josh Holtz (@joshdholtz) -#### Customer Center -##### 🐞 Bugfixes -* More customer center docs and fix init (#4304) via Cesar de la Vega (@vegaro) -* Remove background from FeedbackSurveyView (#4300) via Cesar de la Vega (@vegaro) - -#### πŸ”„ Other Changes -* Fix iOS 15 tests (#4320) via Cesar de la Vega (@vegaro) -* Generating new test snapshots for `main` - watchos (#4323) via RevenueCat Git Bot (@RCGitBot) -* Generating new test snapshots for `main` - macos (#4322) via RevenueCat Git Bot (@RCGitBot) -* Adds an `onDismiss` callback to `ErrorDisplay` (#4312) via JayShortway (@JayShortway) -* Added previews for text component, image component, and paywall for template 1 (#4306) via Josh Holtz (@joshdholtz) -* Remove `CUSTOMER_CENTER_ENABLED` (#4305) via Cesar de la Vega (@vegaro) -* [Diagnostics] Refactor diagnostics track methods to handle background work automatically (#4270) via Toni Rico (@tonidero) -* [Diagnostics] Add `apple_products_request` event (#4247) via Toni Rico (@tonidero) -* Bump webrick from 1.7.0 to 1.8.2 in /Tests/InstallationTests/CocoapodsInstallation (#4313) via dependabot[bot] (@dependabot[bot]) -* Bump fastlane from 2.222.0 to 2.223.1 (#4309) via dependabot[bot] (@dependabot[bot]) -* Bump fastlane-plugin-revenuecat_internal from `55a0455` to `5b2e35c` (#4310) via dependabot[bot] (@dependabot[bot]) +## RevenueCat SDK +### 🐞 Bugfixes +* Fix `hasFeature(RetroactiveAttribute)` check in iOS 14 (#4359) via Cesar de la Vega (@vegaro) +* Only Treat Deferred StoreKit Messages as Shown When They are Shown (#4344) via Will Taylor (@fire-at-will) +### πŸ“¦ Dependency Updates +* Bump fastlane from 2.223.1 to 2.224.0 (#4354) via dependabot[bot] (@dependabot[bot]) +* Bump fastlane-plugin-revenuecat_internal from `5b2e35c` to `3b1e7cf` (#4347) via dependabot[bot] (@dependabot[bot]) +### Win-back Offers +#### ✨ New Features +* CAT-1726: Support Deferring Win-Back StoreKit Messages (#4343) via Will Taylor (@fire-at-will) + +## RevenueCatUI SDK +### 🐞 Bugfixes +* Fixes double callbacks when using `PaywallViewController` (#4333) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* Fix setting accent color in Customer Center (#4358) via Cesar de la Vega (@vegaro) +* Improve promotional offer button when pressed (#4342) via Cesar de la Vega (@vegaro) +* [CustomerCenter] Hide unknown paths (#4350) via Toni Rico (@tonidero) +* Remove access to Localization env variable in ManageSubscriptionsViewModel (#4339) via Cesar de la Vega (@vegaro) + +### πŸ”„ Other Changes +* Update MagicWeather sample app (#4337) via nyeu (@nyeu) +* Allows enabling PAYWALL_COMPONENTS using a Local.xcconfig file. (#4341) via JayShortway (@JayShortway) +* Better logs for promotional offer view (#4336) via Cesar de la Vega (@vegaro) +* Fix Xcode 16 warnings (#4334) via Mark Villacampa (@MarkVillacampa) +* Run CI tests on iOS18/watchOS11 & Use Xcode 16 (#4295) via Will Taylor (@fire-at-will) diff --git a/CHANGELOG.md b/CHANGELOG.md index 441d6c49bb..f3cfaab247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,32 @@ +## 5.6.0 +## RevenueCat SDK +### 🐞 Bugfixes +* Fix `hasFeature(RetroactiveAttribute)` check in iOS 14 (#4359) via Cesar de la Vega (@vegaro) +* Only Treat Deferred StoreKit Messages as Shown When They are Shown (#4344) via Will Taylor (@fire-at-will) +### πŸ“¦ Dependency Updates +* Bump fastlane from 2.223.1 to 2.224.0 (#4354) via dependabot[bot] (@dependabot[bot]) +* Bump fastlane-plugin-revenuecat_internal from `5b2e35c` to `3b1e7cf` (#4347) via dependabot[bot] (@dependabot[bot]) +### Win-back Offers +#### ✨ New Features +* CAT-1726: Support Deferring Win-Back StoreKit Messages (#4343) via Will Taylor (@fire-at-will) + +## RevenueCatUI SDK +### 🐞 Bugfixes +* Fixes double callbacks when using `PaywallViewController` (#4333) via Cesar de la Vega (@vegaro) +### Customer Center +#### 🐞 Bugfixes +* Fix setting accent color in Customer Center (#4358) via Cesar de la Vega (@vegaro) +* Improve promotional offer button when pressed (#4342) via Cesar de la Vega (@vegaro) +* [CustomerCenter] Hide unknown paths (#4350) via Toni Rico (@tonidero) +* Remove access to Localization env variable in ManageSubscriptionsViewModel (#4339) via Cesar de la Vega (@vegaro) + +### πŸ”„ Other Changes +* Update MagicWeather sample app (#4337) via nyeu (@nyeu) +* Allows enabling PAYWALL_COMPONENTS using a Local.xcconfig file. (#4341) via JayShortway (@JayShortway) +* Better logs for promotional offer view (#4336) via Cesar de la Vega (@vegaro) +* Fix Xcode 16 warnings (#4334) via Mark Villacampa (@MarkVillacampa) +* Run CI tests on iOS18/watchOS11 & Use Xcode 16 (#4295) via Will Taylor (@fire-at-will) + ## 5.5.0 ## πŸ«‚ Customer Center Beta πŸ«‚ diff --git a/RevenueCat.podspec b/RevenueCat.podspec index 94fc8397fd..10302ef8ca 100644 --- a/RevenueCat.podspec +++ b/RevenueCat.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCat" - s.version = "5.6.0-SNAPSHOT" + s.version = "5.6.0" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/RevenueCatUI.podspec b/RevenueCatUI.podspec index 36df72ea36..badab1b675 100644 --- a/RevenueCatUI.podspec +++ b/RevenueCatUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCatUI" - s.version = "5.6.0-SNAPSHOT" + s.version = "5.6.0" s.summary = "UI library for RevenueCat paywalls." s.description = <<-DESC diff --git a/Sources/Misc/SystemInfo.swift b/Sources/Misc/SystemInfo.swift index 885fe150d1..a5e03a1944 100644 --- a/Sources/Misc/SystemInfo.swift +++ b/Sources/Misc/SystemInfo.swift @@ -75,7 +75,7 @@ class SystemInfo { } static var frameworkVersion: String { - return "5.6.0-SNAPSHOT" + return "5.6.0" } static var systemVersion: String { diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index e4db15be61..e53b4163d8 100644 --- a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h +++ b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h @@ -1,4 +1,4 @@ -// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4) +// Generated by Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.9.10 clang-1600.0.26.2) #ifndef REVENUECAT_SWIFT_H #define REVENUECAT_SWIFT_H #pragma clang diagnostic push @@ -40,6 +40,8 @@ #include #endif #if defined(__cplusplus) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-modular-include-in-framework-module" #if defined(__arm64e__) && __has_include() # include #else @@ -53,6 +55,7 @@ # endif #pragma clang diagnostic pop #endif +#pragma clang diagnostic pop #endif #if !defined(SWIFT_TYPEDEFS) @@ -289,6 +292,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" +#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" #if __has_attribute(external_source_symbol) # pragma push_macro("any") @@ -650,8 +654,9 @@ SWIFT_CLASS_NAMED("Builder") /// Set platformInfo. - (RCConfigurationBuilder * _Nonnull)withPlatformInfo:(RCPlatformInfo * _Nonnull)platformInfo SWIFT_WARN_UNUSED_RESULT; /// Set showStoreMessagesAutomatically. Enabled by default. -/// If enabled, if the user has billing issues, has yet to accept a price increase consent or -/// there are other messages from StoreKit, they will be displayed automatically when the app is initialized. +/// If enabled, if the user has billing issues, has yet to accept a price increase consent, is eligible for a +/// win-back offer, or there are other messages from StoreKit, they will be displayed automatically when +/// the app is initialized. /// If you want to disable this behavior so that you can customize when these messages are shown, make sure /// you configure the SDK as early as possible in the app’s lifetime, otherwise messages will be displayed /// automatically. @@ -714,12 +719,12 @@ SWIFT_CLASS_NAMED("Builder") @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 @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 /// Specifies the behavior for a caching API. @@ -756,6 +761,7 @@ SWIFT_CLASS("_TtC10RevenueCat25CacheableNetworkOperation") @end + /// Configuration can be used when configuring the Purchases instance. It is not required to be used, but /// highly recommended. This class follows a builder pattern. /// To configure your Purchases instance using this object, follow these steps. @@ -1014,6 +1020,7 @@ SWIFT_CLASS("_TtC10RevenueCat24DiagnosticsPostOperation") @interface DiagnosticsPostOperation : NetworkOperation @end + enum RCPeriodType : NSInteger; enum RCStore : NSInteger; enum RCPurchaseOwnershipType : NSInteger; @@ -1257,12 +1264,14 @@ SWIFT_CLASS("_TtC10RevenueCat32GetCustomerCenterConfigOperation") + SWIFT_CLASS("_TtC10RevenueCat24GetCustomerInfoOperation") @interface GetCustomerInfoOperation : CacheableNetworkOperation @end + SWIFT_CLASS("_TtC10RevenueCat28GetIntroEligibilityOperation") @interface GetIntroEligibilityOperation : NetworkOperation @end @@ -1270,12 +1279,14 @@ SWIFT_CLASS("_TtC10RevenueCat28GetIntroEligibilityOperation") + SWIFT_CLASS("_TtC10RevenueCat21GetOfferingsOperation") @interface GetOfferingsOperation : CacheableNetworkOperation @end + SWIFT_CLASS("_TtC10RevenueCat37GetProductEntitlementMappingOperation") @interface GetProductEntitlementMappingOperation : CacheableNetworkOperation @end @@ -1283,6 +1294,7 @@ SWIFT_CLASS("_TtC10RevenueCat37GetProductEntitlementMappingOperation") + SWIFT_CLASS("_TtC10RevenueCat15HealthOperation") @interface HealthOperation : CacheableNetworkOperation @end @@ -1290,6 +1302,7 @@ SWIFT_CLASS("_TtC10RevenueCat15HealthOperation") + enum RCIntroEligibilityStatus : NSInteger; /// Holds the introductory price status @@ -1342,6 +1355,7 @@ SWIFT_CLASS("_TtC10RevenueCat14LogInOperation") + /// Enumeration of the different verbosity levels. ///

Related Symbols

///
    @@ -1362,6 +1376,7 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCLogLevel, "LogLevel", open) { + /// Information that represents a non-subscription purchase made by a user. /// This can be one of these types of product: ///
      @@ -1657,24 +1672,28 @@ SWIFT_CLASS("_TtC10RevenueCat28PostAdServicesTokenOperation") + SWIFT_CLASS("_TtC10RevenueCat28PostAttributionDataOperation") @interface PostAttributionDataOperation : NetworkOperation @end + SWIFT_CLASS("_TtC10RevenueCat28PostOfferForSigningOperation") @interface PostOfferForSigningOperation : NetworkOperation @end + /// A NetworkOperation for posting PaywallEvents. SWIFT_CLASS("_TtC10RevenueCat26PostPaywallEventsOperation") @interface PostPaywallEventsOperation : NetworkOperation @end + SWIFT_CLASS("_TtC10RevenueCat24PostReceiptDataOperation") @interface PostReceiptDataOperation : CacheableNetworkOperation @end @@ -1682,11 +1701,13 @@ SWIFT_CLASS("_TtC10RevenueCat24PostReceiptDataOperation") + SWIFT_CLASS("_TtC10RevenueCat33PostSubscriberAttributesOperation") @interface PostSubscriberAttributesOperation : NetworkOperation @end + @class RCTargetingContext; /// Stores information about how a Package was presented. @@ -3196,7 +3217,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau @end - @interface RCPurchasesDiagnostics (SWIFT_EXTENSION(RevenueCat)) /// Perform tests to ensure SDK is configured correctly. ///
        @@ -3210,6 +3230,7 @@ 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: @@ -3226,14 +3247,13 @@ 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_;) @@ -3242,6 +3262,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; @@ -3276,6 +3297,8 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCRefundRequestStatus, "RefundRequestStatus" + + /// Enum of supported stores typedef SWIFT_ENUM_NAMED(NSInteger, RCStore, "Store", open) { /// For entitlements granted via Apple App Store. @@ -3365,6 +3388,10 @@ typedef SWIFT_ENUM_NAMED(NSInteger, RCStoreMessageType, "StoreMessageType", open RCStoreMessageTypePriceIncreaseConsent = 1, /// Generic Store messages RCStoreMessageTypeGeneric = 2, +/// Message shown when a subscriber is eligible to redeem a win-back offer that you’ve +/// configured in App Store Connect. More information can be found +/// here. + RCStoreMessageTypeWinBackOffer = 3, }; enum RCStoreProductType : NSInteger; diff --git a/scripts/docs/index.html b/scripts/docs/index.html index a151493a32..1c844e9d95 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 216751c651..17bab4a17e 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 e68ae21b54..d4ff6c213c 100644 --- a/scripts/docs/v5_api_migration_guide.html +++ b/scripts/docs/v5_api_migration_guide.html @@ -2,7 +2,7 @@ - +