Skip to content

Commit

Permalink
[V7] Update workflows to use Xcode 16.2.0 + Swift Version 5.10 (#1501)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
richherrera authored Jan 22, 2025
1 parent cfe59b4 commit 86d9d40
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 43 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 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
with:
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
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 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
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-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)
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-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
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, "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]

Expand Down
11 changes: 0 additions & 11 deletions Braintree.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,6 @@
ReferencedContainer = "container:Braintree.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9CE5179A282D54030013C740"
BuildableName = "BraintreePayPalNativeCheckoutTests.xctest"
BlueprintName = "BraintreePayPalNativeCheckoutTests"
ReferencedContainer = "container:Braintree.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO"
parallelizable = "YES">
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
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.9
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion V7_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 86d9d40

Please sign in to comment.