diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index 7b16de6064f..ef41e52a963 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -28,14 +28,14 @@ jobs: package-release: # Don't run on private repo. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 with: cache_key: package-release - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - name: Xcode 15.2 + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -54,11 +54,11 @@ jobs: build: # Don't run on private repo unless it is a PR. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - name: Xcode 15.2 + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - name: Build run: | cd ReleaseTooling @@ -68,14 +68,14 @@ jobs: # Don't run on private repo. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' needs: build - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: mikehardy/buildcache-action@c87cea0ccd718971d6cc39e672c4f26815b6c126 with: cache_key: package-head - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - name: Xcode 15.2 + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -341,10 +341,8 @@ jobs: SDK: "Database" strategy: matrix: - os: [macos-12] - include: - - os: macos-12 - xcode: Xcode_14.2 + os: [macos-13] + xcode: [Xcode_15.2] # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources. # - os: macos-13 # xcode: Xcode_15.2 @@ -446,59 +444,55 @@ jobs: name: quickstart_artifacts_dynamiclinks path: quickstart-ios/ - quickstart_framework_firestore: - # Don't run on private repo. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - needs: package-head - env: - plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} - SDK: "Firestore" - strategy: - matrix: - os: [macos-12] - include: - - os: macos-12 - xcode: Xcode_14.2 - # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources. - # - os: macos-13 - # xcode: Xcode_15.2 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Get framework dir - uses: actions/download-artifact@v4 - with: - name: Firebase-actions-dir - - uses: ruby/setup-ruby@v1 - - name: Setup Bundler - run: ./scripts/setup_bundler.sh - - name: Move frameworks - run: | - mkdir -p "${HOME}"/ios_frameworks/ - find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + - - uses: actions/checkout@v4 - - name: Setup quickstart - run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ - "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ - "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* - - name: Xcode - run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer - - name: Install Secret GoogleService-Info.plist - run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ - quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" - - name: Test Quickstart - run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") - - name: Remove data before upload - if: ${{ failure() }} - run: scripts/remove_data.sh firestore - - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: quickstart_artifacts_firestore - path: quickstart-ios/ + # quickstart_framework_firestore: + # # Don't run on private repo. + # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + # needs: package-head + # env: + # plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} + # SDK: "Firestore" + # strategy: + # matrix: + # # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources. + # os: [macos-13] + # xcode: [Xcode_15.2] + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - name: Get framework dir + # uses: actions/download-artifact@v4 + # with: + # name: Firebase-actions-dir + # - uses: ruby/setup-ruby@v1 + # - name: Setup Bundler + # run: ./scripts/setup_bundler.sh + # - name: Move frameworks + # run: | + # mkdir -p "${HOME}"/ios_frameworks/ + # find "${GITHUB_WORKSPACE}" -name "Firebase*latest.zip" -exec unzip -d "${HOME}"/ios_frameworks/ {} + + # - uses: actions/checkout@v4 + # - name: Setup quickstart + # run: SAMPLE="$SDK" TARGET="${SDK}Example" NON_FIREBASE_SDKS="SDWebImage FirebaseAuthUI FirebaseEmailAuthUI" scripts/setup_quickstart_framework.sh \ + # "${HOME}"/ios_frameworks/Firebase/NonFirebaseSDKs/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAuth/* \ + # "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/* + # - name: Xcode + # run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer + # - name: Install Secret GoogleService-Info.plist + # run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-firestore.plist.gpg \ + # quickstart-ios/firestore/GoogleService-Info.plist "$plist_secret" + # - name: Test Quickstart + # run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart_framework.sh "${SDK}") + # - name: Remove data before upload + # if: ${{ failure() }} + # run: scripts/remove_data.sh firestore + # - uses: actions/upload-artifact@v4 + # if: ${{ failure() }} + # with: + # name: quickstart_artifacts_firestore + # path: quickstart-ios/ check_framework_firestore_symbols: # Don't run on private repo. @@ -508,8 +502,8 @@ jobs: FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1 runs-on: macos-13 steps: - - name: Xcode 14.1 - run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer + - name: Xcode 15.2 + run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer - uses: actions/checkout@v4 - name: Get framework dir uses: actions/download-artifact@v4 diff --git a/FirebaseCore/CHANGELOG.md b/FirebaseCore/CHANGELOG.md index 03e8a150f03..f164a6980c0 100644 --- a/FirebaseCore/CHANGELOG.md +++ b/FirebaseCore/CHANGELOG.md @@ -1,4 +1,6 @@ # Unreleased +- [changed] Firebase now requires at least Xcode 15.2. See + https://developer.apple.com/news/?id=fxu2qp7b for more info. - [Zip Distribution] Update zip integration instructions with tips for preserving symlinks and protecting code signatures. diff --git a/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift b/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift index 1dd183e0c75..580f5ddbe45 100755 --- a/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift +++ b/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift @@ -709,10 +709,16 @@ struct FrameworkBuilder { .appendingPathComponent(frameworkBuildName(name) + ".xcframework") // The arguments for the frameworks need to be separated. - var frameworkArgs: [String] = [] - for frameworkBuilt in frameworks { - frameworkArgs.append("-framework") - frameworkArgs.append(frameworkBuilt.path) + let frameworkArgs = frameworks.flatMap { frameworkPath in + do { + // Xcode 15.0-15.2: Return the canonical path to work around issue + // https://forums.swift.org/t/67439 + let frameworkCanonicalPath = try frameworkPath.resourceValues(forKeys: [.canonicalPathKey]) + .canonicalPath! + return ["-framework", frameworkCanonicalPath] + } catch { + fatalError("Failed to get canonical path for \(frameworkPath): \(error)") + } } let outputArgs = ["-output", xcframework.path]