diff --git a/.github/workflows/abtesting.yml b/.github/workflows/abtesting.yml index dbd92e12b..b0f447d5c 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 @@ -72,7 +72,9 @@ 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 run: | gem install xcpretty diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index 13cd58278..167668b10 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 @@ -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 884ff76d0..134ebd409 100644 --- a/.github/workflows/authentication.yml +++ b/.github/workflows/authentication.yml @@ -42,9 +42,9 @@ 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_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/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 74e769fa8..8e514bdbd 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -41,7 +41,9 @@ 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 run: | cd config diff --git a/.github/workflows/crashlytics.yml b/.github/workflows/crashlytics.yml index 905d27fcf..8fca3a785 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 @@ -59,7 +59,9 @@ 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 run: | gem install xcpretty diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 2bffc89b8..0a9502d0e 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -42,7 +42,9 @@ 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 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 @@ -77,7 +79,9 @@ 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 run: | gem install xcpretty diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index 3fe2865c6..bfcfb3a3c 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -41,7 +41,9 @@ 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 run: | cd firestore diff --git a/.github/workflows/functions.yml b/.github/workflows/functions.yml index e8b3a626e..ad70b47b5 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 @@ -53,7 +53,9 @@ 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 run: | gem install xcpretty diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 0844d4c71..422ce2904 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -40,7 +40,9 @@ 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 run: | cd inappmessaging diff --git a/.github/workflows/installations.yml b/.github/workflows/installations.yml index 4ba87fcca..1e18d74ba 100644 --- a/.github/workflows/installations.yml +++ b/.github/workflows/installations.yml @@ -40,7 +40,9 @@ 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 run: | cd installations diff --git a/.github/workflows/messaging.yml b/.github/workflows/messaging.yml index ac8ea65cc..68e29f7b9 100644 --- a/.github/workflows/messaging.yml +++ b/.github/workflows/messaging.yml @@ -40,7 +40,9 @@ 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 run: | cd messaging diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 74475607e..c67b2a58b 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -42,7 +42,9 @@ 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 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 @@ -77,7 +79,9 @@ 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 run: | gem install xcpretty diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index a15217d78..ec200b06b 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 @@ -53,7 +53,9 @@ 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 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..620510bf6 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,8 +36,10 @@ if [[ -z "${SPM:-}" ]]; then fi if [[ -z "${OS:-}" ]]; then OS=iOS - DEVICE="iPhone ${iphone_version}" 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 @@ -153,8 +149,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"