diff --git a/.jazzy.yaml b/.jazzy.yaml index 2819d46e87..1db8811446 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -2,9 +2,9 @@ clean: true author: RevenueCat author_url: https://revenuecat.com sdk: iphonesimulator -module_version: 4.17.0-SNAPSHOT +module_version: 4.17.0 github_url: https://github.com/revenuecat/purchases-ios -github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/4.17.0-SNAPSHOT +github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/4.17.0 output: generated_docs include: - "Sources/**/*" diff --git a/.version b/.version index 25f4b8988b..43b5827154 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -4.17.0-SNAPSHOT +4.17.0 diff --git a/CHANGELOG.latest.md b/CHANGELOG.latest.md index b0b7587d26..d1b8f8aeae 100644 --- a/CHANGELOG.latest.md +++ b/CHANGELOG.latest.md @@ -1,12 +1,17 @@ ### New Features -* Created `ReceiptParser` SPM (#2155) via NachoSoto (@NachoSoto) -* Exposed `PurchasesReceiptParser` and `AppleReceipt` (#2153) via NachoSoto (@NachoSoto) +* Added new `ReceiptParser.fetchAndParseLocalReceipt` (#2204) via NachoSoto (@NachoSoto) +* `PurchasesReceiptParser`: added API to parse receipts from `base64` string (#2200) via NachoSoto (@NachoSoto) ### Bugfixes -* `Restore purchases`: post product data when posting receipts (#2178) via NachoSoto (@NachoSoto) +* `CustomerInfo`: support parsing schema version 2 to restore SDK `v3.x` compatibility (#2213) via NachoSoto (@NachoSoto) ### Other Changes -* Added `Dictionary.merge` (#2190) via NachoSoto (@NachoSoto) -* `CircleCI`: use Xcode 14.2.0 (#2187) via NachoSoto (@NachoSoto) -* `ReceiptParser`: a few documentation improvements (#2189) via NachoSoto (@NachoSoto) -* `Purchase Tester`: fixed `TestFlight` deployment (#2188) via NachoSoto (@NachoSoto) -* `Purchase Tester`: display specific `IntroEligibilityStatus` (#2184) via NachoSoto (@NachoSoto) -* `Purchase Tester`: fixed `SubscriptionPeriod` (#2185) via NachoSoto (@NachoSoto) +* `JSONDecoder`: added decoding type when logging `DecodingError.keyNotFound` (#2212) via NachoSoto (@NachoSoto) +* Added `ReceiptParserTests` (#2203) via NachoSoto (@NachoSoto) +* Deploy `PurchaseTester` for `macOS` (#2011) via NachoSoto (@NachoSoto) +* `ReceiptFetcher`: refactored implementation to log error when failing to fetch receipt (#2202) via NachoSoto (@NachoSoto) +* `PostReceiptDataOperation`: replaced receipt `base64` with `hash` for cache key (#2199) via NachoSoto (@NachoSoto) +* `PurchaseTester`: small refactor to simplify `Date` formatting (#2210) via NachoSoto (@NachoSoto) +* `PurchasesReceiptParser`: improved documentation to reference `default` (#2197) via NachoSoto (@NachoSoto) +* Created `CachingTrialOrIntroPriceEligibilityChecker` (#2007) via NachoSoto (@NachoSoto) +* Update Gemfile.lock (#2205) via Cesar de la Vega (@vegaro) +* remove stalebot in favor of SLAs in Zendesk (#2196) via Andy Boedo (@aboedo) +* Update fastlane-plugin-revenuecat_internal to latest version (#2194) via Cesar de la Vega (@vegaro) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ec602bc4d..700d1a6d85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +## 4.17.0 +### New Features +* Added new `ReceiptParser.fetchAndParseLocalReceipt` (#2204) via NachoSoto (@NachoSoto) +* `PurchasesReceiptParser`: added API to parse receipts from `base64` string (#2200) via NachoSoto (@NachoSoto) +### Bugfixes +* `CustomerInfo`: support parsing schema version 2 to restore SDK `v3.x` compatibility (#2213) via NachoSoto (@NachoSoto) +### Other Changes +* `JSONDecoder`: added decoding type when logging `DecodingError.keyNotFound` (#2212) via NachoSoto (@NachoSoto) +* Added `ReceiptParserTests` (#2203) via NachoSoto (@NachoSoto) +* Deploy `PurchaseTester` for `macOS` (#2011) via NachoSoto (@NachoSoto) +* `ReceiptFetcher`: refactored implementation to log error when failing to fetch receipt (#2202) via NachoSoto (@NachoSoto) +* `PostReceiptDataOperation`: replaced receipt `base64` with `hash` for cache key (#2199) via NachoSoto (@NachoSoto) +* `PurchaseTester`: small refactor to simplify `Date` formatting (#2210) via NachoSoto (@NachoSoto) +* `PurchasesReceiptParser`: improved documentation to reference `default` (#2197) via NachoSoto (@NachoSoto) +* Created `CachingTrialOrIntroPriceEligibilityChecker` (#2007) via NachoSoto (@NachoSoto) +* Update Gemfile.lock (#2205) via Cesar de la Vega (@vegaro) +* remove stalebot in favor of SLAs in Zendesk (#2196) via Andy Boedo (@aboedo) +* Update fastlane-plugin-revenuecat_internal to latest version (#2194) via Cesar de la Vega (@vegaro) + ## 4.16.0 ### New Features * Created `ReceiptParser` SPM (#2155) via NachoSoto (@NachoSoto) diff --git a/RevenueCat.podspec b/RevenueCat.podspec index e6d9d8a79c..c5867f163a 100644 --- a/RevenueCat.podspec +++ b/RevenueCat.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RevenueCat" - s.version = "4.17.0-SNAPSHOT" + s.version = "4.17.0" s.summary = "Subscription and in-app-purchase backend service." s.description = <<-DESC diff --git a/Sources/Misc/SystemInfo.swift b/Sources/Misc/SystemInfo.swift index f24bc86a93..b90a2ab182 100644 --- a/Sources/Misc/SystemInfo.swift +++ b/Sources/Misc/SystemInfo.swift @@ -50,7 +50,7 @@ class SystemInfo { } static var frameworkVersion: String { - return "4.17.0-SNAPSHOT" + return "4.17.0" } static var systemVersion: String { diff --git a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h index e53357ae79..2b21f2afcd 100644 --- a/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h +++ b/Tests/InstallationTests/CommonFiles/RevenueCat-Swift.h @@ -1036,6 +1036,7 @@ SWIFT_CLASS_NAMED("IntroEligibility") + @interface RCIntroEligibility (SWIFT_EXTENSION(RevenueCat)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @@ -2273,33 +2274,6 @@ SWIFT_CLASS_NAMED("PlatformInfo") -@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("Configure behavior through the RevenueCat dashboard 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. @@ -2393,6 +2367,33 @@ 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("Configure behavior through the RevenueCat dashboard 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)) + (RCPurchases * _Nonnull)configureWithAPIKey:(NSString * _Nonnull)apiKey appUserID:(NSString * _Nullable)appUserID observerMode:(BOOL)observerMode userDefaults:(NSUserDefaults * _Nullable)userDefaults SWIFT_AVAILABILITY(maccatalyst,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(macos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(watchos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(tvos,deprecated=1,message="'configure' has been renamed to 'configure(with:)'") SWIFT_AVAILABILITY(ios,deprecated=1,message="'configure' has been renamed to 'configure(with:)'"); @@ -2720,7 +2721,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau @end - SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=13.0) SWIFT_AVAILABILITY(macos,introduced=10.15) SWIFT_AVAILABILITY(ios,introduced=13.0) @interface RCPurchasesDiagnostics (SWIFT_EXTENSION(RevenueCat)) /// Perform tests to ensure SDK is configured correctly. @@ -2735,8 +2735,15 @@ SWIFT_AVAILABILITY(watchos,introduced=6.2) SWIFT_AVAILABILITY(tvos,introduced=13 + /// 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: +/// \code +/// let parser = PurchasesReceiptParser.default +/// let receipt = try parser.parse(from: data) +/// +/// \endcode SWIFT_CLASS("_TtC10RevenueCat22PurchasesReceiptParser") @interface PurchasesReceiptParser : NSObject - (nonnull instancetype)init SWIFT_UNAVAILABLE; @@ -2745,13 +2752,14 @@ 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_;) @@ -3106,13 +3114,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 9a9adee26e..1bcdf9329e 100644 --- a/scripts/docs/index.html +++ b/scripts/docs/index.html @@ -2,7 +2,7 @@ - +