From aab5b60b21aae2679e5bab5951cf1d148ef665c4 Mon Sep 17 00:00:00 2001 From: agedd <105314544+agedd@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:52:29 -0500 Subject: [PATCH] Bump BT v5 To Xcode 15.0.1 & Swift 5.9+ (#1231) * bump xcode version * update os version * update cocoapods version * bump macOS version * update xcode version to 15.0.1 to support carthage merchants * update Package.swift and Braintree.podspec to Swift 5.9 --- .github/workflows/build.yml | 24 ++++++++++++------------ .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 24 ++++++++++++------------ Braintree.podspec | 2 +- CHANGELOG.md | 3 +++ Package.swift | 2 +- Podfile.lock | 2 +- README.md | 2 +- 8 files changed, 34 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0972a8f725..c9bfb479ed 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 14) - runs-on: macOS-latest + name: CocoaPods (Xcode 15.0.1) + runs-on: macOS-14 steps: - name: Check out repository uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app - name: Install CocoaPod dependencies run: pod install - name: Run pod lib lint run: pod lib lint carthage: - name: Carthage (Xcode 14) - runs-on: macOS-latest + name: Carthage (Xcode 15.0.1) + runs-on: macOS-14 steps: - name: Check out repository uses: actions/checkout@v3 @@ -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 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 14) - runs-on: macOS-latest + name: SPM (Xcode 15.0.1) + runs-on: macOS-14 steps: - name: Check out repository uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 239ea236a0..c6efea8fa1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,15 +8,15 @@ on: jobs: release: name: Release - runs-on: macOS-latest + runs-on: macOS-14 steps: - name: Check out repository uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Use Xcode 14.1 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 668d6f024f..88c29dd52e 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-latest + runs-on: macOS-14 steps: - name: Checkout repository uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 11,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Debug' -scheme 'UnitTests' -destination 'name=iPhone 14,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify ui_test_job: name: UI - runs-on: macOS-latest + runs-on: macOS-14 steps: - name: Checkout repository uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 11,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'UITests' -destination 'name=iPhone 14,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify integration_test_job: name: Integration - runs-on: macOS-latest + runs-on: macOS-14 steps: - name: Checkout repository uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Use Xcode 14 - run: sudo xcode-select -switch /Applications/Xcode_14.1.app + - name: Use Xcode 15.0.1 + run: sudo xcode-select -switch /Applications/Xcode_15.0.1.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 11,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify + run: set -o pipefail && xcodebuild -workspace 'Braintree.xcworkspace' -sdk 'iphonesimulator' -configuration 'Release' -scheme 'IntegrationTests' -destination 'name=iPhone 14,OS=17.2,platform=iOS Simulator' test | ./Pods/xcbeautify/xcbeautify diff --git a/Braintree.podspec b/Braintree.podspec index 38a8e4df1d..1d7e88092c 100644 --- a/Braintree.podspec +++ b/Braintree.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.platform = :ios, "12.0" s.compiler_flags = "-Wall -Werror -Wextra" - s.swift_version = "5.1" + s.swift_version = "5.9" s.default_subspecs = %w[Core Card PayPal] diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3f5db3a1..8ee250ba0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Braintree iOS SDK Release Notes +## unreleased +* Require Xcode 15.0+ and Swift 5.9+ (per [Apple App Store requirements](https://developer.apple.com/news/upcoming-requirements/?id=04292024a)) + ## 5.24.1 (2023-11-17) * BraintreePayPalDataCollector * Update previously incorrect version of PPRiskMagnes 5.4.1 with staging removed diff --git a/Package.swift b/Package.swift index f0ed7d6f34..30d8fbd57d 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription diff --git a/Podfile.lock b/Podfile.lock index 56c2157672..e9542774c8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -45,4 +45,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 75163f16229528991a9364c7c1a44cd57a30cac6 -COCOAPODS: 1.11.2 +COCOAPODS: 1.15.2 diff --git a/README.md b/README.md index 0117453889..a4894e78ec 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Welcome to Braintree's iOS SDK. This library will help you accept card and alter v5 is the latest major version of Braintree iOS. To update from v4, see the [v5 migration guide](https://github.com/braintree/braintree_ios/blob/master/V5_MIGRATION.md). -**The Braintree iOS SDK permits a deployment target of iOS 12.0 or higher**. It requires Xcode 14.1+ and Swift 5.7.1+. +**The Braintree iOS SDK permits a deployment target of iOS 12.0 or higher**. It requires Xcode 15.0+ and Swift 5.9+. ## Supported Payment Methods