Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTOMATIC] Release/5.17.0 #4783

Merged
merged 4 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.17.0-SNAPSHOT
5.17.0
30 changes: 16 additions & 14 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -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)
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion RevenueCat.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion RevenueCatUI.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
92 changes: 42 additions & 50 deletions RevenueCatUI/Templates/V2/Components/Text/TextComponentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -485,60 +485,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,
Expand All @@ -549,7 +540,8 @@ struct TextComponentView_Previews: PreviewProvider {
)
)
.previewLayout(.sizeThatFits)
.previewDisplayName("Process variable (V1)")
.previewDisplayName("Process variable")

}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Misc/SystemInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class SystemInfo {
}

static var frameworkVersion: String {
return "5.17.0-SNAPSHOT"
return "5.17.0"
}

static var systemVersion: String {
Expand Down
69 changes: 35 additions & 34 deletions Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns.
/// <h4>Related articles</h4>
/// <ul>
/// <li>
/// <a href="https://docs.revenuecat.com/docs/attribution">Attribution</a>
/// </li>
/// </ul>
/// \param data Dictionary provided by the network.
///
/// \param network Enum for the network the data is coming from, see <code>AttributionNetwork</code> for supported
/// networks.
///
/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id.
///
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
@end


@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Configures an instance of the Purchases SDK with a specified <code>Configuration</code>.
/// The instance will be set as a singleton.
Expand Down Expand Up @@ -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<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
/// Send your attribution data to RevenueCat so you can track the revenue generated by your different campaigns.
/// <h4>Related articles</h4>
/// <ul>
/// <li>
/// <a href="https://docs.revenuecat.com/docs/attribution">Attribution</a>
/// </li>
/// </ul>
/// \param data Dictionary provided by the network.
///
/// \param network Enum for the network the data is coming from, see <code>AttributionNetwork</code> for supported
/// networks.
///
/// \param networkUserId User Id that should be sent to the network. Default is the current App User Id.
///
+ (void)addAttributionData:(NSDictionary<NSString *, id> * _Nonnull)data fromNetwork:(enum RCAttributionNetwork)network forNetworkUserId:(NSString * _Nullable)networkUserId SWIFT_DEPRECATED_MSG("Use the set<NetworkId> functions instead");
@end



@interface RCPurchases (SWIFT_EXTENSION(RevenueCat))
/// Parses a deep link URL to verify it’s a RevenueCat web purchase redemption link
Expand Down Expand Up @@ -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.
/// <ul>
Expand All @@ -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 <a href="https://rev.cat/apple-receipt-fields">Apple’s documentation</a>.
/// To use this class you must access <code>PurchasesReceiptParser/default</code>:
Expand All @@ -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 <code>PurchasesReceiptParser</code>
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=default) PurchasesReceiptParser * _Nonnull default_;)
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -492,3 +494,5 @@ private struct MockStoreProductDiscount: StoreProductDiscountType {
let type: StoreProductDiscount.DiscountType

}

#endif
2 changes: 1 addition & 1 deletion scripts/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.16.1/documentation/revenuecat"/>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.17.0/documentation/revenuecat"/>
</head>
<body>
</body>
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/v4_api_migration_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.17.0-SNAPSHOT/documentation/revenuecat/v4_api_migration_guide"/>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.17.0/documentation/revenuecat/v4_api_migration_guide"/>
</head>
<body>
</body>
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/v5_api_migration_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.17.0-SNAPSHOT/documentation/revenuecat/v5_api_migration_guide"/>
<meta http-equiv="refresh" content="0; url=https://revenuecat.github.io/purchases-ios-docs/5.17.0/documentation/revenuecat/v5_api_migration_guide"/>
</head>
<body>
</body>
Expand Down