From 86d9d400a3817902026b2e0caadfa2ce1a715dcf Mon Sep 17 00:00:00 2001 From: Rich Herrera Date: Wed, 22 Jan 2025 09:35:37 -0600 Subject: [PATCH] [V7] Update workflows to use Xcode 16.2.0 + Swift Version 5.10 (#1501) * Bump Braintree.podspec and Package.swift to 5.10 * Update workflows to use Xcode 16 * Update workflows to use xcode 16.2.0 * Update test workflow os version * Test sdk name * Test path instead of symlink * Test name iphone 18.1 * Test sdk iphonesimulator18.1 * Revert sdk config and use macos-15-xlarge * Test iphone 16 name and 18.2 os * Update all tests to use macos-15-xlarge * Update release.yml to use macos-15-xlarge * Update build.yml to use macos-15-xlarge * Update CHANGELOG * Update migration guide * Update README --- .github/workflows/build.yml | 24 +++++++++---------- .github/workflows/release.yml | 6 ++--- .github/workflows/tests.yml | 24 +++++++++---------- Braintree.podspec | 2 +- .../xcshareddata/xcschemes/UnitTests.xcscheme | 11 --------- CHANGELOG.md | 1 + Package.swift | 2 +- README.md | 4 ++-- V7_MIGRATION.md | 2 +- 9 files changed, 33 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f92182dee..d674cda2b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,23 +5,23 @@ concurrency: cancel-in-progress: true jobs: cocoapods: - name: CocoaPods (Xcode 15.0.1) - runs-on: macOS-14-xlarge + name: CocoaPods (Xcode 16.2.0) + runs-on: macOS-15-xlarge steps: - name: Check out repository uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Install CocoaPod dependencies run: pod install - name: Run pod lib lint run: pod lib lint carthage: - name: Carthage (Xcode 15.0.1) - runs-on: macOS-14-xlarge + name: Carthage (Xcode 16.2.0) + runs-on: macOS-15-xlarge steps: - name: Check out repository uses: actions/checkout@v4 @@ -29,8 +29,8 @@ jobs: fetch-depth: 0 ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Remove SPMTest run: | git checkout $GITHUB_HEAD_REF @@ -47,16 +47,16 @@ jobs: - name: Build CarthageTest run: xcodebuild -project 'SampleApps/CarthageTest/CarthageTest.xcodeproj' -scheme 'CarthageTest' clean build CODE_SIGNING_ALLOWED=NO spm: - name: SPM (Xcode 15.0.1) - runs-on: macOS-14-xlarge + name: SPM (Xcode 16.2.0) + runs-on: macOS-15-xlarge steps: - name: Check out repository uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Use current branch run: sed -i '' 's/branch = .*/branch = \"'"${GITHUB_HEAD_REF//\//\/}"'\";/' SampleApps/SPMTest/SPMTest.xcodeproj/project.pbxproj - name: Run swift package resolve diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a8ee14776..bacbf4ec36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,15 +8,15 @@ on: jobs: release: name: Release - runs-on: macOS-14-xlarge + runs-on: macOS-15-xlarge steps: - name: Check out repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Check for unreleased section in changelog run: grep "## unreleased" CHANGELOG.md || (echo "::error::No unreleased section found in CHANGELOG"; exit 1) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4c82b9c06..05b7928ca8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,50 +6,50 @@ concurrency: jobs: unit_test_job: name: Unit - runs-on: macOS-14-xlarge + runs-on: macOS-15-xlarge steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Install Package dependencies run: swift package resolve - name: Install CocoaPod dependencies run: pod install - name: Run Unit Tests - run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Debug' -scheme 'UnitTests' -destination 'name=iPhone 15,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Debug' -scheme 'UnitTests' -destination 'name=iPhone 16,OS=18.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify ui_test_job: name: UI - runs-on: macOS-14-xlarge + runs-on: macOS-15-xlarge steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Install CocoaPod dependencies run: pod install - name: Run UI Tests - run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'UITests' -destination 'name=iPhone 15,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'UITests' -destination 'name=iPhone 16,OS=18.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify integration_test_job: name: Integration - runs-on: macOS-14-xlarge + runs-on: macOS-15-xlarge steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 15.0.1 - run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app + - name: Use Xcode 16.2.0 + run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app - name: Install Package dependencies run: swift package resolve - name: Install CocoaPod dependencies run: pod install - name: Run Integration Tests - run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'IntegrationTests' -destination 'name=iPhone 15,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'IntegrationTests' -destination 'name=iPhone 16,OS=18.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify diff --git a/Braintree.podspec b/Braintree.podspec index 839bf1b0f0..05ec46c58e 100644 --- a/Braintree.podspec +++ b/Braintree.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.platform = :ios, "16.0" s.compiler_flags = "-Wall -Werror -Wextra" - s.swift_version = "5.9" + s.swift_version = "5.10" s.default_subspecs = %w[Core Card PayPal] diff --git a/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme b/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme index cf93ea140e..cbd00f5499 100644 --- a/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme +++ b/Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme @@ -141,17 +141,6 @@ ReferencedContainer = "container:Braintree.xcodeproj"> - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md index 500281cd43..15370e4398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Braintree iOS SDK Release Notes ## unreleased (v7) +* Require Xcode 16.2+ and Swift 5.10+ * Breaking Changes * Bump minimum supported deployment target to iOS 16+ * `countryCodeAlpha2` now returns a 2 character country code instead of a 3 character country code diff --git a/Package.swift b/Package.swift index e12efe4611..4e1dde5299 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/README.md b/README.md index b7a34103b1..45d516413f 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ Welcome to Braintree's iOS SDK. This library will help you accept card and alternative payments in your iOS app. +**The Braintree iOS SDK permits a deployment target of iOS 16.0 or higher**. It requires Xcode 16.2+ and Swift 5.10+. + ## 📣 Announcements - **Upgrade your integration to continue accepting Braintree payments** 📣 The SSL certificates for current iOS SDK versions (v5 and v6) are set to expire by June 31, 2025. Upgrade to v5.26.0+ and v6.17.0+, respectively, to continue using the Braintree SDK. [Click here for more details](https://github.com/braintree/braintree_ios/issues/1277) - v6 is the latest major version of Braintree iOS. To update from v5, see the [v6 migration guide](https://github.com/braintree/braintree_ios/blob/main/V6_MIGRATION.md). If you have not yet migrated to v5, see the [v5 migration guide](https://github.com/braintree/braintree_ios/blob/5.x/V5_MIGRATION.md) -**The Braintree iOS SDK permits a deployment target of iOS 16.0 or higher**. It requires Xcode 15.0+ and Swift 5.9+. - ## Supported Payment Methods - [Credit Cards](https://developer.paypal.com/braintree/docs/guides/credit-cards/overview) diff --git a/V7_MIGRATION.md b/V7_MIGRATION.md index c08403eb1a..6a3e212135 100644 --- a/V7_MIGRATION.md +++ b/V7_MIGRATION.md @@ -17,7 +17,7 @@ _Documentation for v7 will be published to https://developer.paypal.com/braintre ## Supported Versions -v7 bumps to a minimum deployment target of iOS 16+. +v7 supports a minimum deployment target of iOS 16+. It requires the use of Xcode 16.2+ and Swift 5.10+. ## Card v7 updates `BTCard` to require setting all properties through the initializer, removing support for dot syntax. To construct a `BTCard`, pass the properties directly in the initializer.