From f40407ab400a401b2db1b9abedbce8a6a7bf1d35 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 15 Oct 2026 12:01:42 -0400 Subject: [PATCH 1/3] ci: require Xcode 26.2 as the minimum version Firebase now requires Xcode 26.2, so drop Xcode 16 support from CI, scripts, and sample code. - Bump the Xcode matrix and hardcoded paths from 16.4 to 26.2. - Select Xcode explicitly in jobs that used the runner default. The macOS-15 runner defaults to Xcode 16.4, so the matrix bump alone only changed the job names. - Make test.sh and build-for-testing.sh exit on Xcode < 26 and remove the Xcode 16 device defaults. - Replace the no-op sudo xcode-select in test.sh with xcode-select -p, matching build-for-testing.sh. - Remove the unused ios_version and DEVICE variables. - Remove the Swift < 6.2 allowBluetoothHFP shim from AudioController.swift. --- .github/workflows/abtesting.yml | 4 +++- .github/workflows/analytics.yml | 2 +- .github/workflows/authentication.yml | 2 +- .github/workflows/config.yml | 2 ++ .github/workflows/crashlytics.yml | 4 +++- .github/workflows/database.yml | 6 +++++- .github/workflows/firestore.yml | 2 ++ .github/workflows/functions.yml | 4 +++- .github/workflows/inappmessaging.yml | 2 ++ .github/workflows/installations.yml | 2 ++ .github/workflows/messaging.yml | 2 ++ .github/workflows/performance.yml | 6 +++++- .github/workflows/storage.yml | 4 +++- .../Shared/Audio/AudioController.swift | 6 ------ scripts/build-for-testing.sh | 8 +------- scripts/test.sh | 14 +++----------- 16 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index dbd92e12b..e46feff35 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -39,7 +39,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS, macOS, watchOS, catalyst] include: - os: iOS @@ -73,6 +73,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index 13cd58278..93c1f9210 100644 --- a/.github/workflows/analytics.yml +++ b/.github/workflows/analytics.yml @@ -38,7 +38,7 @@ jobs: # TODO: Re-enable when ODM2 catalyst support is investigated # os: [iOS, catalyst, tvOS, macOS] os: [iOS, tvOS, macOS] - xcode: ["16.4"] + xcode: ["26.2"] include: - os: iOS device: iPhone 16 diff --git a/.github/workflows/authentication.yml b/.github/workflows/authentication.yml index 884ff76d0..8f527f4d0 100644 --- a/.github/workflows/authentication.yml +++ b/.github/workflows/authentication.yml @@ -44,7 +44,7 @@ jobs: - name: Checkout uses: actions/checkout@master - name: Xcode - run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 74e769fa8..63a7f452f 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd config diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 905d27fcf..c2c6f3891 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -35,7 +35,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS, macOS, watchOS] include: - os: iOS @@ -60,6 +60,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 2bffc89b8..623477539 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -43,6 +43,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | gem install xcpretty @@ -56,7 +58,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS, macOS] include: - os: iOS @@ -78,6 +80,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 3fe2865c6..d2544c725 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -42,6 +42,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd firestore diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index e8b3a626e..d648cad3b 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -35,7 +35,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS, macOS] include: - os: iOS @@ -54,6 +54,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 0844d4c71..9476b7a54 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -41,6 +41,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd inappmessaging diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 4ba87fcca..9e9c9ba22 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -41,6 +41,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd installations diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index ac8ea65cc..0e4cd49b4 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -41,6 +41,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd messaging diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 74475607e..2529325c3 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -43,6 +43,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup run: | cd performance @@ -56,7 +58,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS] include: - os: iOS @@ -78,6 +80,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index a15217d78..00dab62f9 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -35,7 +35,7 @@ jobs: runs-on: macOS-15 strategy: matrix: - xcode: ["16.4"] + xcode: ["26.2"] os: [iOS, tvOS, macOS] include: - os: iOS @@ -54,6 +54,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@master + - name: Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup run: | gem install xcpretty diff --git a/firebaseai/FirebaseAIExample/Shared/Audio/AudioController.swift b/firebaseai/FirebaseAIExample/Shared/Audio/AudioController.swift index 0fc1647fa..f9f69be39 100644 --- a/firebaseai/FirebaseAIExample/Shared/Audio/AudioController.swift +++ b/firebaseai/FirebaseAIExample/Shared/Audio/AudioController.swift @@ -15,12 +15,6 @@ import AVFoundation import OSLog -#if compiler(<6.2) - extension AVAudioSession.CategoryOptions { - static let allowBluetoothHFP = AVAudioSession.CategoryOptions.allowBluetooth - } -#endif - /// Controls audio playback and recording. actor AudioController { private var logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "generative-ai") diff --git a/scripts/build-for-testing.sh b/scripts/build-for-testing.sh index bd8121743..c1d23bcea 100755 --- a/scripts/build-for-testing.sh +++ b/scripts/build-for-testing.sh @@ -26,11 +26,7 @@ xcode_version=$(xcodebuild -version | grep Xcode) xcode_version="${xcode_version/Xcode /}" xcode_major="${xcode_version/.*/}" -if [[ "$xcode_major" -ge 26 ]]; then - iphone_version="17" -elif [[ "$xcode_major" -ge 16 ]]; then - iphone_version="16" -else +if [[ "$xcode_major" -lt 26 ]]; then echo "Unsupported Xcode version $xcode_version; exiting." 1>&2 exit 1 fi @@ -42,9 +38,7 @@ if [[ -z "${SPM:-}" ]]; then fi if [[ -z "${OS:-}" ]]; then OS=iOS - DEVICE="iPhone ${iphone_version}" echo "Defaulting to OS=$OS" - echo "Defaulting to DEVICE=$DEVICE" fi # Set have_secrets to true or false. diff --git a/scripts/test.sh b/scripts/test.sh index 734658635..59858b482 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -24,13 +24,7 @@ xcode_version=$(xcodebuild -version | grep Xcode) xcode_version="${xcode_version/Xcode /}" xcode_major="${xcode_version/.*/}" -if [[ "$xcode_major" -ge 26 ]]; then - iphone_version="17 Pro" - ios_version="26.1" -elif [[ "$xcode_major" -ge 16 ]]; then - iphone_version="16 Pro" - ios_version="18.6" -else +if [[ "$xcode_major" -lt 26 ]]; then echo "Unsupported Xcode version $xcode_version; exiting." 1>&2 exit 1 fi @@ -42,7 +36,7 @@ if [[ -z "${SPM:-}" ]]; then fi if [[ -z "${OS:-}" ]]; then OS=iOS - DEVICE="iPhone ${iphone_version}" + DEVICE="iPhone 17 Pro" echo "Defaulting to OS=$OS" echo "Defaulting to DEVICE=$DEVICE" fi @@ -153,8 +147,6 @@ function xcb() { } # Run xcodebuild -if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then - sudo xcode-select -s "/Applications/Xcode_${xcode_version}.app/Contents/Developer" -fi +xcode-select -p xcb "${flags[@]}" echo "$message" From 49dcc264065082ec6ddb00e38be168ca150deb0e Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 15 Oct 2026 12:23:28 -0400 Subject: [PATCH 2/3] ci: pin GitHub Actions to commit SHAs zizmor's unpinned-uses policy requires actions to be pinned to a commit hash. Pin actions/checkout@master to v6.0.1, matching the existing pins in firebaseai.yml and check.yml, and pin actions/cache@v4 to v4.3.0, the commit v4 currently points to. --- .github/workflows/abtesting.yml | 2 +- .github/workflows/analytics.yml | 2 +- .github/workflows/authentication.yml | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/config.yml | 2 +- .github/workflows/crashlytics.yml | 2 +- .github/workflows/database.yml | 4 ++-- .github/workflows/firestore.yml | 2 +- .github/workflows/functions.yml | 2 +- .github/workflows/inappmessaging.yml | 2 +- .github/workflows/installations.yml | 2 +- .github/workflows/messaging.yml | 2 +- .github/workflows/performance.yml | 4 ++-- .github/workflows/storage.yml | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index e46feff35..b0f447d5c 100644 --- a/.github/workflows/abtesting.yml +++ b/.github/workflows/abtesting.yml @@ -72,7 +72,7 @@ jobs: TEST: ${{ matrix.test }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index 93c1f9210..167668b10 100644 --- a/.github/workflows/analytics.yml +++ b/.github/workflows/analytics.yml @@ -64,7 +64,7 @@ jobs: DIR: analytics steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/authentication.yml b/.github/workflows/authentication.yml index 8f527f4d0..134ebd409 100644 --- a/.github/workflows/authentication.yml +++ b/.github/workflows/authentication.yml @@ -42,7 +42,7 @@ jobs: SCHEME: AuthenticationExample steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a26cbfcd2..a2e5f69ee 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Cache Mint packages - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ env.MINT_PATH }} key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 63a7f452f..8e514bdbd 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -41,7 +41,7 @@ jobs: TEST: true steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index c2c6f3891..8fca3a785 100644 --- a/.github/workflows/crashlytics.yml +++ b/.github/workflows/crashlytics.yml @@ -59,7 +59,7 @@ jobs: TEST: ${{ matrix.test }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 623477539..0a9502d0e 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -42,7 +42,7 @@ jobs: SCHEME: DatabaseExample steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup @@ -79,7 +79,7 @@ jobs: TEST: ${{ matrix.test }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index d2544c725..bfcfb3a3c 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -41,7 +41,7 @@ jobs: SCHEME: FirestoreExample steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index d648cad3b..ad70b47b5 100644 --- a/.github/workflows/functions.yml +++ b/.github/workflows/functions.yml @@ -53,7 +53,7 @@ jobs: TEST: false steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 9476b7a54..422ce2904 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -40,7 +40,7 @@ jobs: TEST: false steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 9e9c9ba22..1e18d74ba 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -40,7 +40,7 @@ jobs: DIR: installations steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index 0e4cd49b4..68e29f7b9 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -40,7 +40,7 @@ jobs: DIR: messaging steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 2529325c3..c67b2a58b 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -42,7 +42,7 @@ jobs: SCHEME: PerformanceExample (iOS) steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer - name: Setup @@ -79,7 +79,7 @@ jobs: SCHEME: ${{ matrix.scheme }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 00dab62f9..ec200b06b 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -53,7 +53,7 @@ jobs: TEST: false steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Xcode run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - name: Setup From fa6a2d228668a30d02b886d7b52f5b10ef45ce7c Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Thu, 15 Oct 2026 12:24:02 -0400 Subject: [PATCH 3/3] ci: default DEVICE whenever OS is iOS test.sh only defaulted DEVICE when OS was also unset, so running it with OS=iOS and no DEVICE exited on an unbound variable under set -u. Default DEVICE to iPhone 17 Pro whenever OS is iOS and DEVICE is unset. Callers that set both or neither are unaffected. Suggested in code review by gemini-code-assist. --- scripts/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 59858b482..620510bf6 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -36,8 +36,10 @@ if [[ -z "${SPM:-}" ]]; then fi if [[ -z "${OS:-}" ]]; then OS=iOS - DEVICE="iPhone 17 Pro" echo "Defaulting to OS=$OS" +fi +if [[ -z "${DEVICE:-}" && "$OS" == "iOS" ]]; then + DEVICE="iPhone 17 Pro" echo "Defaulting to DEVICE=$DEVICE" fi if [[ -z "${TEST:-}" ]]; then