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/4.21.0 #2571

Merged
merged 8 commits into from
Jun 1, 2023
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 .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ clean: true
author: RevenueCat
author_url: https://revenuecat.com
sdk: iphonesimulator
module_version: 4.20.0-SNAPSHOT
module_version: 4.21.0
github_url: https://github.com/revenuecat/purchases-ios
github_file_prefix: https://github.com/revenuecat/purchases-ios/tree/4.18.0-SNAPSHOT
output: generated_docs
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.20.0-SNAPSHOT
4.21.0
65 changes: 41 additions & 24 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
### New Features
* Add `StoreProduct.pricePerYear` (#2462) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: use offline-computed `CustomerInfo` when server is down (#2368) via NachoSoto (@NachoSoto)

### Bugfixes
* `HTTPClient`: don't assume error responses are JSON (#2529) via NachoSoto (@NachoSoto)
* `OfferingsManager`: return `Offerings` from new disk cache when server is down (#2495) via NachoSoto (@NachoSoto)
* `OfferingsManager`: don't consider timeouts as configuration errors (#2493) via NachoSoto (@NachoSoto)

* `AppleReceipt.debugDescription`: don't pretty-print JSON (#2564) via NachoSoto (@NachoSoto)
* `SK2StoreProduct`: fix crash on iOS 12 (#2565) via NachoSoto (@NachoSoto)
* `GetCustomerInfo` posts receipts if there are pending transactions (#2533) via NachoSoto (@NachoSoto)
### Performance Improvements
* Perf: `CustomerInfoManager.fetchAndCacheCustomerInfoIfStale` no longer fetches data if stale (#2508) via NachoSoto (@NachoSoto)

* `PurchasedProductsFetcher`: cache current entitlements (#2507) via NachoSoto (@NachoSoto)
* Performance: new check to ensure serialization / deserialization is done from background thread (#2496) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump fastlane from 2.212.2 to 2.213.0 (#2544) via dependabot[bot] (@dependabot[bot])
### Other Changes
* `Integration Tests`: workaround for `XCTest` crash after a test failure (#2532) via NachoSoto (@NachoSoto)
* `CircleCI`: save test archive on `loadshedder-integration-tests` (#2530) via NachoSoto (@NachoSoto)
* `SK2StoreProduct`: simplify `currencyCode` extraction (#2485) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added visual feedback for purchase success/failure (#2519) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: fixed macOS UI (#2516) via NachoSoto (@NachoSoto)
* `MainThreadMonitor`: fixed flakiness in CI (#2517) via NachoSoto (@NachoSoto)
* Update `fastlane-plugin-revenuecat_internal` (#2511) via Cesar de la Vega (@vegaro)
* `Xcode`: fixed `.storekit` file references in schemes (#2505) via NachoSoto (@NachoSoto)
* `MainThreadMonitor`: don't monitor thread if debugger is attached (#2502) via NachoSoto (@NachoSoto)
* `Purchases`: avoid double-log when setting `delegate` to `nil` (#2503) via NachoSoto (@NachoSoto)
* `Integration Tests`: added snapshot test for `OfferingsResponse` (#2499) via NachoSoto (@NachoSoto)
* Tests: grouped all `Matcher`s into one file (#2497) via NachoSoto (@NachoSoto)
* `DeviceCache`: refactored cache keys (#2494) via NachoSoto (@NachoSoto)
* `HTTPClient`: log actual response status code (#2487) via NachoSoto (@NachoSoto)
* Generate snapshots on CI (#2472) via Josh Holtz (@joshdholtz)
* `Integration Tests`: add `MainThreadMonitor` to ensure main thread is not blocked (#2463) via NachoSoto (@NachoSoto)
* Add message indicating tag doesn't exist (#2458) via Cesar de la Vega (@vegaro)
* `CustomerInfoManager`: post all unfinished transactions (#2563) via NachoSoto (@NachoSoto)
* `PostReceiptOperation`: added ability to also post `AdServices` token (#2566) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: improved computation log (#2562) via NachoSoto (@NachoSoto)
* Added `TransactionPoster` tests (#2557) via NachoSoto (@NachoSoto)
* Refactored `TransactionPoster`: removed 2 dependencies and abstracted parameters (#2542) via NachoSoto (@NachoSoto)
* `CustomerInfoManagerTests`: wait for `getAndCacheCustomerInfo` to finish (#2555) via NachoSoto (@NachoSoto)
* `StoreTransaction`: implemented `description` (#2556) via NachoSoto (@NachoSoto)
* `Backend.ResponseHandler` is now `@Sendable` (#2541) via NachoSoto (@NachoSoto)
* Extracted `TransactionPoster` from `PurchasesOrchestrator` (#2540) via NachoSoto (@NachoSoto)
* `enableAdServicesAttributionTokenCollection`: added integration test (#2551) via NachoSoto (@NachoSoto)
* `AttributionPoster`: replaced hardcoded strings with constants (#2548) via NachoSoto (@NachoSoto)
* `DefaultDecodable`: moved to `Misc/Codable/DefaultDecodable.swift` (#2528) via NachoSoto (@NachoSoto)
* `CircleCI`: specify device to run `backend_integration_tests` (#2547) via NachoSoto (@NachoSoto)
* Created `StoreKit2TransactionFetcher` (#2539) via NachoSoto (@NachoSoto)
* Fix load shedder integration tests (#2546) via Josh Holtz (@joshdholtz)
* Fix doc on `Offering.getMetadataValue` (#2545) via Josh Holtz (@joshdholtz)
* Extracted and tested `AsyncSequence.extractValues` (#2538) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: don't compute offline `CustomerInfo` when purchasing a consumable products (#2522) via NachoSoto (@NachoSoto)
* `OfflineEntitlementsManager`: disable offline `CustomerInfo` in observer mode (#2520) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: fixed leak detection (#2534) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added `ProxyView` to `iOS` (#2531) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: removed `AppStore.sync` call (#2521) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added new window on Mac to manage proxy (#2518) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: added log if fetching purchased products is slow (#2515) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: disable for custom entitlements mode (#2509) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: fixed iOS 12 tests (#2514) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: don't throw errors if purchased products were found (#2506) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: allow creating offline `CustomerInfo` with empty `ProductEntitlementMapping` (#2504) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: integration tests (#2501) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: don't cache offline `CustomerInfo` (#2378) via NachoSoto (@NachoSoto)
* `DangerousSettings`: debug-only `forceServerErrors` (#2486) via NachoSoto (@NachoSoto)
* `CocoapodsInstallation`: fixed `Xcode 14.3.0` issue (#2489) via NachoSoto (@NachoSoto)
* `CarthageInstallation`: removed workaround (#2488) via NachoSoto (@NachoSoto)
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
## 4.21.0
### New Features
* `Offline Entitlements`: use offline-computed `CustomerInfo` when server is down (#2368) via NachoSoto (@NachoSoto)

### Bugfixes
* `AppleReceipt.debugDescription`: don't pretty-print JSON (#2564) via NachoSoto (@NachoSoto)
* `SK2StoreProduct`: fix crash on iOS 12 (#2565) via NachoSoto (@NachoSoto)
* `GetCustomerInfo` posts receipts if there are pending transactions (#2533) via NachoSoto (@NachoSoto)
### Performance Improvements
* `PurchasedProductsFetcher`: cache current entitlements (#2507) via NachoSoto (@NachoSoto)
* Performance: new check to ensure serialization / deserialization is done from background thread (#2496) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump fastlane from 2.212.2 to 2.213.0 (#2544) via dependabot[bot] (@dependabot[bot])
### Other Changes
* `CustomerInfoManager`: post all unfinished transactions (#2563) via NachoSoto (@NachoSoto)
* `PostReceiptOperation`: added ability to also post `AdServices` token (#2566) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: improved computation log (#2562) via NachoSoto (@NachoSoto)
* Added `TransactionPoster` tests (#2557) via NachoSoto (@NachoSoto)
* Refactored `TransactionPoster`: removed 2 dependencies and abstracted parameters (#2542) via NachoSoto (@NachoSoto)
* `CustomerInfoManagerTests`: wait for `getAndCacheCustomerInfo` to finish (#2555) via NachoSoto (@NachoSoto)
* `StoreTransaction`: implemented `description` (#2556) via NachoSoto (@NachoSoto)
* `Backend.ResponseHandler` is now `@Sendable` (#2541) via NachoSoto (@NachoSoto)
* Extracted `TransactionPoster` from `PurchasesOrchestrator` (#2540) via NachoSoto (@NachoSoto)
* `enableAdServicesAttributionTokenCollection`: added integration test (#2551) via NachoSoto (@NachoSoto)
* `AttributionPoster`: replaced hardcoded strings with constants (#2548) via NachoSoto (@NachoSoto)
* `DefaultDecodable`: moved to `Misc/Codable/DefaultDecodable.swift` (#2528) via NachoSoto (@NachoSoto)
* `CircleCI`: specify device to run `backend_integration_tests` (#2547) via NachoSoto (@NachoSoto)
* Created `StoreKit2TransactionFetcher` (#2539) via NachoSoto (@NachoSoto)
* Fix load shedder integration tests (#2546) via Josh Holtz (@joshdholtz)
* Fix doc on `Offering.getMetadataValue` (#2545) via Josh Holtz (@joshdholtz)
* Extracted and tested `AsyncSequence.extractValues` (#2538) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: don't compute offline `CustomerInfo` when purchasing a consumable products (#2522) via NachoSoto (@NachoSoto)
* `OfflineEntitlementsManager`: disable offline `CustomerInfo` in observer mode (#2520) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: fixed leak detection (#2534) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added `ProxyView` to `iOS` (#2531) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: removed `AppStore.sync` call (#2521) via NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added new window on Mac to manage proxy (#2518) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: added log if fetching purchased products is slow (#2515) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: disable for custom entitlements mode (#2509) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: fixed iOS 12 tests (#2514) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: don't throw errors if purchased products were found (#2506) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: allow creating offline `CustomerInfo` with empty `ProductEntitlementMapping` (#2504) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: integration tests (#2501) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: don't cache offline `CustomerInfo` (#2378) via NachoSoto (@NachoSoto)
* `DangerousSettings`: debug-only `forceServerErrors` (#2486) via NachoSoto (@NachoSoto)
* `CocoapodsInstallation`: fixed `Xcode 14.3.0` issue (#2489) via NachoSoto (@NachoSoto)
* `CarthageInstallation`: removed workaround (#2488) via NachoSoto (@NachoSoto)

## 4.20.0
### New Features
* Add `StoreProduct.pricePerYear` (#2462) via NachoSoto (@NachoSoto)
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ GEM
CFPropertyList
naturally
sqlite3 (1.6.0-arm64-darwin)
sqlite3 (1.6.0-x86_64-darwin)
sqlite3 (1.6.0-x86_64-linux)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
Expand Down Expand Up @@ -345,6 +346,7 @@ GEM

PLATFORMS
arm64-darwin-21
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -358,4 +360,4 @@ DEPENDENCIES
rest-client

BUNDLED WITH
2.3.14
2.4.13
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 = "4.20.0-SNAPSHOT"
s.version = "4.21.0"
s.summary = "Subscription and in-app-purchase backend service."

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.20.0</string>
<string>4.21.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Misc/SystemInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SystemInfo {
}

static var frameworkVersion: String {
return "4.20.0-SNAPSHOT"
return "4.21.0"
}

static var systemVersion: String {
Expand Down
2 changes: 1 addition & 1 deletion Tests/BackendIntegrationTestApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.20.0</string>
<string>4.21.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion Tests/BackendIntegrationTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.20.0</string>
<string>4.21.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
2D6C02972549F7700039CB92 = {
CreatedOnToolsVersion = 12.1;
LastSwiftMigration = 1210;
TestTargetID = 2D6C027C2549F76E0039CB92;
};
};
};
Expand Down Expand Up @@ -474,6 +475,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 8SXR2327BM;
Expand All @@ -491,13 +493,15 @@
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CarthageInstallation.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CarthageInstallation";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why CarthageInstallation were failing.

};
name = Debug;
};
2D6C02B12549F7700039CB92 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 8SXR2327BM;
Expand All @@ -514,6 +518,7 @@
SWIFT_OBJC_BRIDGING_HEADER = "CarthageInstallationTests/CarthageInstallationTests-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CarthageInstallation.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/CarthageInstallation";
};
name = Release;
};
Expand Down
8 changes: 4 additions & 4 deletions Tests/InstallationTests/CommonFiles/InstallationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class InstallationTests: XCTestCase {
func testCanFetchCustomerInfo() throws {
let installationRunner = RCInstallationRunner()
installationRunner.start()
let expectation = XCTestExpectation(description: "get purchaserInfo")
let expectation = XCTestExpectation(description: "get CustomerInfo")

installationRunner.getCustomerInfo { (customerInfo, error) in
XCTAssert(error == nil)
XCTAssert(customerInfo != nil)
installationRunner.getCustomerInfo { customerInfo, error in
XCTAssertNil(error)
XCTAssertNotNil(customerInfo)
expectation.fulfill()
}
wait(for: [expectation], timeout: 10.0)
Expand Down
7 changes: 5 additions & 2 deletions Tests/InstallationTests/CommonFiles/RCInstallationRunner.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
@implementation RCInstallationRunner

- (void)start {
[RCPurchases setDebugLogsEnabled:true];
if (RCPurchases.isConfigured) {
return;
}

RCPurchases.logLevel = RCLogLevelVerbose;

// Server URL for the tests. If set to empty string, we'll use the default URL.
// Server URL for the tests. If set to empty string, we'll use the default URL.
NSString *proxyURL = @"REVENUECAT_PROXY_URL";
if (![proxyURL isEqualToString:@""]) {
Expand Down
Loading