Skip to content

Commit

Permalink
Bump BT v5 To Xcode 15.0.1 & Swift 5.9+ (#1231)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
agedd authored Mar 28, 2024
1 parent 8fec5b7 commit aab5b60
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 31 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ 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
with:
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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Braintree.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 75163f16229528991a9364c7c1a44cd57a30cac6

COCOAPODS: 1.11.2
COCOAPODS: 1.15.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit aab5b60

Please sign in to comment.