Skip to content

Commit

Permalink
run-test-ios-15 in xcode 15 to fix incompatibilities with emergetools (
Browse files Browse the repository at this point in the history
…#4319)

Co-authored-by: RevenueCat Git Bot <[email protected]>
  • Loading branch information
vegaro and RCGitBot authored Dec 5, 2024
1 parent c24de73 commit 9b7313e
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 29 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -762,14 +762,16 @@ jobs:
run-test-ios-15:
executor:
name: macos-executor
xcode_version: '14.3.0'
# Needs to be 15.2.0 because if not running on Swift 5.9, the tests fail
xcode_version: '15.2.0'

steps:
- checkout
- set-maximum-duration
- install-dependencies:
install_swiftlint: false
- update-spm-installation-commit
- install-runtime:
runtime-name: iOS 15.5
- run:
name: Run tests
command: bundle exec fastlane test_ios
Expand Down
18 changes: 14 additions & 4 deletions Tests/UnitTests/FoundationExtensions/LocaleExtensionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ class LocaleExtensionsTests: TestCase {
// Fixed in iOS 17 on Xcode 15
expect(Locale(identifier: "").rc_languageCode).to(beNil())
} else {
// Broken in iOS 16 on Xcode 15
expect(Locale(identifier: "").rc_languageCode) == "en"
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *) {
// Broken in iOS 16 on Xcode 15
expect(Locale(identifier: "").rc_languageCode) == "en"
} else {
// iOS 15 on Xcode 15
expect(Locale(identifier: "").rc_languageCode).to(beNil())
}
}
#else
expect(Locale(identifier: "").rc_languageCode).to(beNil())
Expand All @@ -61,8 +66,13 @@ class LocaleExtensionsTests: TestCase {
// Fixed in iOS 17 on Xcode 15
expect(Locale(identifier: "").removingRegion).to(beNil())
} else {
// Broken in iOS 16 on Xcode 15
expect(Locale(identifier: "").removingRegion?.identifier) == "en"
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *) {
// Broken in iOS 16 on Xcode 15
expect(Locale(identifier: "").removingRegion?.identifier) == "en"
} else {
// iOS 15 on Xcode 15
expect(Locale(identifier: "").removingRegion).to(beNil())
}
}
#else
expect(Locale(identifier: "").removingRegion).to(beNil())
Expand Down
22 changes: 10 additions & 12 deletions Tests/UnitTests/Paywalls/PaywallDataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,16 @@ class PaywallDataTests: BaseHTTPResponseTest {
}

func testLocalesOrderedByPriority() throws {
let expected: [String]

if #available(iOS 16.0, tvOS 16.0, watchOS 9.0, *) {
expected = [
"en-US"
]
} else {
expected = [
// `Locale.preferredLanguages` returns `en` before iOS 17.
"en"
]
}
#if swift(>=5.9)
let expected = [
"en-US"
]
#else
let expected = [
// `Locale.preferredLanguages` returns `en` before Xcode 15.
"en"
]
#endif

expect(PaywallData.localesOrderedByPriority.map(\.identifier)) == expected
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"X-Platform-Flavor" : "Unity",
"X-Platform-Flavor-Version" : "2.3.3",
"X-Platform-Version" : "Version 17.0.0 (Build 21A342)",
"X-Preferred-Locales" : "en",
"X-Preferred-Locales" : "en_US",
"X-Retry-Count" : "0",
"X-Storefront" : "USA",
"X-StoreKit-Version" : "1",
Expand Down

0 comments on commit 9b7313e

Please sign in to comment.