Explorar el Código

Merge remote-tracking branch 'origin/main' into auth-swift

Paul Beusterien hace 1 año
padre
commit
2cf218de25

+ 1 - 1
.github/workflows/api_diff_report.yml

@@ -36,7 +36,7 @@ jobs:
       - name: Setup python
         uses: actions/setup-python@v4
         with:
-          python-version: 3.7
+          python-version: '3.10'
 
       - name: Install Prerequisites
         run:  ~/api_diff_report/prerequisite.sh

+ 60 - 59
.github/workflows/functions.yml

@@ -110,68 +110,69 @@ jobs:
     - name: Unit Tests
       run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
 
-  quickstart:
-    # 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'
-    env:
-      plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      LEGACY: true
-    # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
-    runs-on: macos-12
+  # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
+  # quickstart:
+  #   # 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'
+  #   env:
+  #     plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     LEGACY: true
+  #   # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
+  #   runs-on: macos-12
 
-    steps:
-    - uses: actions/checkout@v4
-    - uses: ruby/setup-ruby@v1
-    - name: Setup quickstart
-      run: scripts/setup_quickstart.sh functions
-    - name: install secret googleservice-info.plist
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
-          quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
-    - name: Setup custom URL scheme
-      run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
-    - name: Test objc quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
-    - name: Test swift quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
+  #   steps:
+  #   - uses: actions/checkout@v4
+  #   - uses: ruby/setup-ruby@v1
+  #   - name: Setup quickstart
+  #     run: scripts/setup_quickstart.sh functions
+  #   - name: install secret googleservice-info.plist
+  #     run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
+  #         quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
+  #   - name: Setup custom URL scheme
+  #     run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
+  #   - name: Test objc quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
+  #   - name: Test swift quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
 
-  quickstart-ftl-cron-only:
-    # Don't run on private repo
-    if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
-    env:
-      plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      LEGACY: true
-    # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
-    runs-on: macos-12
+  # quickstart-ftl-cron-only:
+  #   # Don't run on private repo
+  #   if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'
+  #   env:
+  #     plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     LEGACY: true
+  #   # TODO: Move to macos-14 and Xcode 15. The legacy quickstart uses material which doesn't build on Xcode 15.
+  #   runs-on: macos-12
 
-    steps:
-    - uses: actions/checkout@v4
-    - uses: ruby/setup-ruby@v1
-    - uses: actions/setup-python@v4
-      with:
-        python-version: '3.11'
-    - name: Setup quickstart
-      run: scripts/setup_quickstart.sh functions
-    - name: install secret googleservice-info.plist
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
-          quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
-    - name: Setup custom URL scheme
-      run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
-    - name: Build objc quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
-    - name: Build swift quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
-    - id: ftl_test
-      uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
-      with:
-        credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
-        testapp_dir: quickstart-ios/build-for-testing
-        test_type: "xctest"
+  #   steps:
+  #   - uses: actions/checkout@v4
+  #   - uses: ruby/setup-ruby@v1
+  #   - uses: actions/setup-python@v4
+  #     with:
+  #       python-version: '3.11'
+  #   - name: Setup quickstart
+  #     run: scripts/setup_quickstart.sh functions
+  #   - name: install secret googleservice-info.plist
+  #     run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
+  #         quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
+  #   - name: Setup custom URL scheme
+  #     run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
+  #   - name: Build objc quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions)
+  #   - name: Build swift quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart_ftl.sh Functions swift)
+  #   - id: ftl_test
+  #     uses: FirebaseExtended/github-actions/firebase-test-lab@v1.4
+  #     with:
+  #       credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
+  #       testapp_dir: quickstart-ios/build-for-testing
+  #       test_type: "xctest"
 
   functions-cron-only:
     # Don't run on private repo.

+ 4 - 3
.github/workflows/performance.yml

@@ -79,7 +79,7 @@ jobs:
     env:
       plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
       signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-    runs-on: macos-12  # TODO: the legacy ObjC quickstarts don't run with Xcode 15.
+    runs-on: macos-14
     steps:
     - uses: actions/checkout@v4
     - uses: ruby/setup-ruby@v1
@@ -90,8 +90,9 @@ jobs:
           quickstart-ios/performance/GoogleService-Info.plist "$plist_secret"
     - name: Test swift quickstart
       run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true swift)
-    - name: Test objc quickstart
-      run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
+    # TODO: The legacy ObjC quickstarts don't run with Xcode 15, re-able if we get these working.
+    # - name: Test objc quickstart
+    #   run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Performance true)
 
   quickstart-ftl-cron-only:
     if: github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule'

+ 41 - 40
.github/workflows/prerelease.yml

@@ -434,47 +434,48 @@ jobs:
         name: quickstart_artifacts_firestore
         path: quickstart-ios/
 
-  functions_quickstart:
+  # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
+  #functions_quickstart:
     # 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 == 'workflow_dispatch'
-    needs: buildup_SpecsTesting_repo
-    env:
-      plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      testing_repo_dir: "/tmp/test/"
-      testing_repo: "firebase-ios-sdk"
-      LEGACY: true
-    # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
-    runs-on: macos-12
-    steps:
-    - uses: actions/checkout@v4
-    - uses: ruby/setup-ruby@v1
-    - name: Get token
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
-          bot-access.txt "$bot_token_secret"
-    - name: Setup testing repo and quickstart
-      run: |
-          botaccess=`cat bot-access.txt`
-          BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions prerelease_testing
-    - name: install secret googleservice-info.plist
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
-          quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
-    - name: Setup custom URL scheme
-      run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
-    - name: Test objc quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
-    - name: Test swift quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
-    - name: Remove data before upload
-      run: scripts/remove_data.sh functions release_testing
-    - uses: actions/upload-artifact@v4
-      if: ${{ failure() }}
-      with:
-        name: quickstart_artifacts_functions
-        path: quickstart-ios/
+    # if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'workflow_dispatch'
+    # needs: buildup_SpecsTesting_repo
+    # env:
+    #   plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+    #   signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+    #   bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+    #   testing_repo_dir: "/tmp/test/"
+    #   testing_repo: "firebase-ios-sdk"
+    #   LEGACY: true
+    # # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
+    # runs-on: macos-12
+    # steps:
+    # - uses: actions/checkout@v4
+    # - uses: ruby/setup-ruby@v1
+    # - name: Get token
+    #   run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
+    #       bot-access.txt "$bot_token_secret"
+    # - name: Setup testing repo and quickstart
+    #   run: |
+    #       botaccess=`cat bot-access.txt`
+    #       BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions prerelease_testing
+    # - name: install secret googleservice-info.plist
+    #   run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
+    #       quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
+    # - name: Setup custom URL scheme
+    #   run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
+    # - name: Test objc quickstart
+    #   run: ([ -z $plist_secret ] ||
+    #         scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
+    # - name: Test swift quickstart
+    #   run: ([ -z $plist_secret ] ||
+    #         scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
+    # - name: Remove data before upload
+    #   run: scripts/remove_data.sh functions release_testing
+    # - uses: actions/upload-artifact@v4
+    #   if: ${{ failure() }}
+    #   with:
+    #     name: quickstart_artifacts_functions
+    #     path: quickstart-ios/
 
   inappmessaging_quickstart:
     # Don't run on private repo unless it is a PR.

+ 41 - 41
.github/workflows/release.yml

@@ -385,47 +385,47 @@ jobs:
         name: quickstart_artifacts_firestore
         path: quickstart-ios/
 
-  functions_quickstart:
-    # 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'
-    needs: buildup_SpecsTesting_repo
-    env:
-      plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
-      testing_repo_dir: "/tmp/test/"
-      testing_repo: "firebase-ios-sdk"
-      LEGACY: true
-    # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
-    runs-on: macos-12
-    steps:
-    - uses: actions/checkout@v4
-    - uses: ruby/setup-ruby@v1
-    - name: Get token
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
-          bot-access.txt "$bot_token_secret"
-    - name: Setup testing repo and quickstart
-      run: |
-          botaccess=`cat bot-access.txt`
-          BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions nightly_release_testing
-    - name: install secret googleservice-info.plist
-      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
-          quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
-    - name: Setup custom URL scheme
-      run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
-    - name: Test objc quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
-    - name: Test swift quickstart
-      run: ([ -z $plist_secret ] ||
-            scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
-    - name: Remove data before upload
-      run: scripts/remove_data.sh functions release_testing
-    - uses: actions/upload-artifact@v4
-      if: ${{ failure() }}
-      with:
-        name: quickstart_artifacts_functions
-        path: quickstart-ios/
+  # TODO: The functions quickstart uses Material which isn't supported by Xcode 15
+  # functions_quickstart:
+  #   # 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'
+  #   needs: buildup_SpecsTesting_repo
+  #   env:
+  #     plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
+  #     testing_repo_dir: "/tmp/test/"
+  #     testing_repo: "firebase-ios-sdk"
+  #     LEGACY: true
+  #   runs-on: macos-12
+  #   steps:
+  #   - uses: actions/checkout@v4
+  #   - uses: ruby/setup-ruby@v1
+  #   - name: Get token
+  #     run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \
+  #         bot-access.txt "$bot_token_secret"
+  #   - name: Setup testing repo and quickstart
+  #     run: |
+  #         botaccess=`cat bot-access.txt`
+  #         BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh functions nightly_release_testing
+  #   - name: install secret googleservice-info.plist
+  #     run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-functions.plist.gpg \
+  #         quickstart-ios/functions/GoogleService-Info.plist "$plist_secret"
+  #   - name: Setup custom URL scheme
+  #     run: sed -i '' 's/REVERSED_CLIENT_ID/com.googleusercontent.apps.1025801074639-6p6ebi8amuklcjrto20gvpe295smm8u6/' quickstart-ios/functions/LegacyFunctionsQuickstart/FunctionsExample/Info.plist
+  #   - name: Test objc quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true)
+  #   - name: Test swift quickstart
+  #     run: ([ -z $plist_secret ] ||
+  #           scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Functions true swift)
+  #   - name: Remove data before upload
+  #     run: scripts/remove_data.sh functions release_testing
+  #   - uses: actions/upload-artifact@v4
+  #     if: ${{ failure() }}
+  #     with:
+  #       name: quickstart_artifacts_functions
+  #       path: quickstart-ios/
 
   inappmessaging_quickstart:
     # Don't run on private repo unless it is a PR.

+ 2 - 2
.github/workflows/storage.yml

@@ -96,8 +96,8 @@ jobs:
     strategy:
       matrix:
         include:
-          - os: macos-13
-            xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15.
+          #- os: macos-13
+          #  xcode: Xcode_14.2 # TODO: the legacy ObjC quickstart doesn't build with Xcode 15.
           - swift: swift
             os: macos-14
             xcode: Xcode_15.3

+ 62 - 68
.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

+ 3 - 2
Crashlytics/CHANGELOG.md

@@ -1,5 +1,6 @@
-# Unreleased
-- [changed] Removed usages of user defaults API to eliminate required reason impact.
+# 10.25.0
+- [changed] Removed usages of user defaults API from internal Firebase Sessions
+  dependency to eliminate required reason impact.
 
 # 10.24.0
 - [fixed] Fix `'FirebaseCrashlytics/FirebaseCrashlytics-Swift.h' file not found`

+ 9 - 4
Crashlytics/Crashlytics/Controllers/FIRCLSRolloutsPersistenceManager.m

@@ -58,10 +58,15 @@
   NSFileHandle *rolloutsFile = [NSFileHandle fileHandleForUpdatingAtPath:rolloutsPath];
 
   dispatch_sync(FIRCLSGetLoggingQueue(), ^{
-    [rolloutsFile seekToEndOfFile];
-    [rolloutsFile writeData:rollouts];
-    NSData *newLineData = [@"\n" dataUsingEncoding:NSUTF8StringEncoding];
-    [rolloutsFile writeData:newLineData];
+    @try {
+      [rolloutsFile seekToEndOfFile];
+      NSMutableData *rolloutsWithNewLineData = [rollouts mutableCopy];
+      [rolloutsWithNewLineData appendData:[@"\n" dataUsingEncoding:NSUTF8StringEncoding]];
+      [rolloutsFile writeData:rolloutsWithNewLineData];
+    } @catch (NSException *exception) {
+      FIRCLSDebugLog(@"Failed to write new rollouts. Exception name: %s - message: %s",
+                     exception.name, exception.reason);
+    }
   });
 }
 

+ 1 - 1
FirebaseAnalytics.podspec

@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
     s.authors          = 'Google, Inc.'
 
     s.source           = {
-        :http => 'https://dl.google.com/firebase/ios/analytics/5d4d6d5e776b3fba/FirebaseAnalytics-10.24.0.tar.gz'
+        :http => 'https://dl.google.com/firebase/ios/analytics/4b9dbef45221ba96/FirebaseAnalytics-10.25.0.tar.gz'
     }
 
     s.cocoapods_version = '>= 1.12.0'

+ 1 - 1
FirebaseAppCheck/CHANGELOG.md

@@ -1,4 +1,4 @@
-# Unreleased
+# 10.25.0
 - [changed] Removed usages of user defaults API to eliminate required reason impact.
 
 # 10.19.1

+ 2 - 2
FirebaseAuth/Interop/Public/FirebaseAuthInterop/FIRAuthInterop.h

@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
 /** @typedef FIRTokenCallback
  @brief The type of block which gets called when a token is ready.
  */
-typedef void (^FIRTokenCallback)(NSString *_Nullable token, NSError *_Nullable error)
+typedef void (^FIRTokenCallback)(NSString *_Nullable_result token, NSError *_Nullable error)
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 /// Common methods for Auth interoperability.
@@ -34,7 +34,7 @@ NS_SWIFT_NAME(AuthInterop)
 /// Retrieves the Firebase authentication token, possibly refreshing it if it has expired.
 - (void)getTokenForcingRefresh:(BOOL)forceRefresh
                   withCallback:
-                      (void (^)(NSString *_Nullable token, NSError *_Nullable error))callback
+                      (void (^)(NSString *_Nullable_result token, NSError *_Nullable error))callback
     NS_SWIFT_NAME(getToken(forcingRefresh:completion:));
 
 /// Get the current Auth user's UID. Returns nil if there is no user signed in.

+ 3 - 1
FirebaseCore/CHANGELOG.md

@@ -1,4 +1,6 @@
-# Unreleased
+# Firebase 10.25.0
+- [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.
 

+ 1 - 1
FirebaseDatabase/CHANGELOG.md

@@ -1,4 +1,4 @@
-# Unreleased
+# 10.25.0
 - [changed] Removed usages of user defaults API to eliminate required reason impact.
 
 # 10.17.0

+ 1 - 1
FirebaseFunctions.podspec

@@ -40,7 +40,7 @@ Cloud Functions for Firebase.
   s.dependency 'FirebaseCore', '~> 10.0'
   s.dependency 'FirebaseCoreExtension', '~> 10.0'
   s.dependency 'FirebaseAppCheckInterop', '~> 10.10'
-  s.dependency 'FirebaseAuthInterop', '~> 10.0'
+  s.dependency 'FirebaseAuthInterop', '~> 10.25'
   s.dependency 'FirebaseMessagingInterop', '~> 10.0'
   s.dependency 'FirebaseSharedSwift', '~> 10.0'
   s.dependency 'GTMSessionFetcher/Core', '>= 2.1', '< 4.0'

+ 7 - 2
FirebaseInAppMessaging/CHANGELOG.md

@@ -1,5 +1,10 @@
-# Unreleased
-- [changed] Removed usages of user defaults API to eliminate required reason impact.
+# 10.25.0
+- [changed] Removed usages of user defaults API to eliminate required reason
+  impact.
+- [changed] When installing In App Messaging via the zip distribution, its UI
+  resource bundle is now embedded within the In App Messaging framework.
+  Choose _Embed & Sign_ when integrating the framework. See the zip
+  distribution's README.md for more instructions.
 
 # 10.22.0
 - [fixed] Fixed an `objc_retain` crash. (#12393)

+ 10 - 1
FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m

@@ -67,7 +67,16 @@
     NSBundle *containingBundle;
     NSURL *bundleURL;
     // The containing bundle is different whether FIAM is statically or dynamically linked.
-    for (containingBundle in @[ [NSBundle mainBundle], [NSBundle bundleForClass:myClass] ]) {
+    for (containingBundle in @[
+           // Statically linked.
+           [NSBundle mainBundle],
+           // Dynamically linked.
+           [NSBundle bundleForClass:myClass],
+           // Embedded static framework (zip distribution).
+           [NSBundle bundleWithURL:[NSBundle.mainBundle.bundleURL
+                                       URLByAppendingPathComponent:
+                                           @"Frameworks/FirebaseInAppMessaging.framework"]]
+         ]) {
       bundleURL = [containingBundle URLForResource:bundledResource withExtension:@"bundle"];
       if (bundleURL != nil) break;
     }

+ 1 - 1
FirebasePerformance/CHANGELOG.md

@@ -1,4 +1,4 @@
-# Unreleased
+# 10.25.0
 - [changed] Removed usages of user defaults API to eliminate required reason impact.
 
 # 10.18.0

+ 4 - 0
FirebaseRemoteConfig/CHANGELOG.md

@@ -1,3 +1,7 @@
+# 10.25.0
+- [fixed] Fixed bug preventing Remote Config from working with a custom sqlite3
+  dependency (#10884).
+
 # 10.23.0
 - [changed] Add support for other Firebase products to integrate with Remote Config.
 

+ 6 - 3
FirebaseRemoteConfig/Sources/RCNConfigDBManager.m

@@ -215,9 +215,12 @@ static NSArray *RemoteConfigMetadataTableColumnsInOrder(void) {
     if (!RemoteConfigCreateFilePathIfNotExist(dbPath)) {
       return;
     }
-    int flags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE |
-                SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION |
-                SQLITE_OPEN_FULLMUTEX;
+
+    int flags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_FULLMUTEX;
+#ifdef SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION
+    flags |= SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION;
+#endif
+
     if (sqlite3_open_v2(databasePath, &strongSelf->_database, flags, NULL) == SQLITE_OK) {
       // Always try to create table if not exists for backward compatibility.
       if (![strongSelf createTableSchema]) {

+ 1 - 1
FirebaseStorage.podspec

@@ -38,7 +38,7 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
   ]
 
   s.dependency 'FirebaseAppCheckInterop', '~> 10.0'
-  s.dependency 'FirebaseAuthInterop', '~> 10.0'
+  s.dependency 'FirebaseAuthInterop', '~> 10.25'
   s.dependency 'FirebaseCore', '~> 10.0'
   s.dependency 'FirebaseCoreExtension', '~> 10.0'
   s.dependency 'GTMSessionFetcher/Core', '>= 2.1', '< 4.0'

+ 2 - 1
Firestore/CHANGELOG.md

@@ -1,4 +1,5 @@
-# Unreleased
+# 10.25.0
+- [fixed] Allow blob of data with zero length. (#11773, #12620)
 - [changed] Passing a non-nil value to the `@DocumentID` property wrapper's
   setter no longer logs a warning since it discouraged valid patterns,
   e.g., updating the document ID after the document is created in Firestore. (#12756)

+ 34 - 0
Firestore/Swift/Tests/Integration/CodableIntegrationTests.swift

@@ -185,6 +185,40 @@ class CodableIntegrationTests: FSTIntegrationTestCase {
     }
   }
 
+  func testDataBlob() throws {
+    struct Model: Encodable {
+      var name: String
+      var data: Data
+      var emptyData: Data
+    }
+    let model = Model(
+      name: "name",
+      data: Data([1, 2, 3, 4]),
+      emptyData: Data()
+    )
+
+    let docToWrite = documentRef()
+
+    for flavor in allFlavors {
+      try setData(from: model, forDocument: docToWrite, withFlavor: flavor)
+
+      let data = readDocument(forRef: docToWrite)
+
+      XCTAssertEqual(data["data"] as! Data, Data([1, 2, 3, 4]), "Failed with flavor \(flavor)")
+      XCTAssertEqual(data["emptyData"] as! Data, Data(), "Failed with flavor \(flavor)")
+    }
+
+    disableNetwork()
+    defer {
+      enableNetwork()
+    }
+
+    try docToWrite.setData(from: model)
+    let data = readDocument(forRef: docToWrite)
+    XCTAssertEqual(data["data"] as! Data, Data([1, 2, 3, 4]), "Failed with flavor offline docRef")
+    XCTAssertEqual(data["emptyData"] as! Data, Data(), "Failed with flavor offline docRef")
+  }
+
   func testExplicitNull() throws {
     struct Model: Encodable {
       var name: String

+ 1 - 0
Firestore/core/src/nanopb/nanopb_util.h

@@ -179,6 +179,7 @@ inline NSData* _Nonnull MakeNSData(const ByteString& str) {
 }
 
 inline NSData* _Nonnull MakeNSData(const pb_bytes_array_t* _Nullable data) {
+  if (data == nil) return [[NSData alloc] init];
   return [[NSData alloc] initWithBytes:data->bytes length:data->size];
 }
 

+ 1 - 1
GoogleAppMeasurement.podspec

@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
     s.authors          = 'Google, Inc.'
 
     s.source           = {
-        :http => 'https://dl.google.com/firebase/ios/analytics/cc4d75392af34c62/GoogleAppMeasurement-10.24.0.tar.gz'
+        :http => 'https://dl.google.com/firebase/ios/analytics/e188a43fe59129de/GoogleAppMeasurement-10.25.0.tar.gz'
     }
 
     s.cocoapods_version = '>= 1.12.0'

+ 1 - 1
GoogleAppMeasurementOnDeviceConversion.podspec

@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
     s.authors          = 'Google, Inc.'
 
     s.source           = {
-        :http => 'https://dl.google.com/firebase/ios/analytics/b9fcf205b593a673/GoogleAppMeasurementOnDeviceConversion-10.24.0.tar.gz'
+        :http => 'https://dl.google.com/firebase/ios/analytics/0ab6fae3eaa42752/GoogleAppMeasurementOnDeviceConversion-10.25.0.tar.gz'
     }
 
     s.cocoapods_version = '>= 1.12.0'

+ 5 - 5
Package.swift

@@ -320,8 +320,8 @@ let package = Package(
     ),
     .binaryTarget(
       name: "FirebaseAnalytics",
-      url: "https://dl.google.com/firebase/ios/swiftpm/10.24.0/FirebaseAnalytics.zip",
-      checksum: "6b5e1d250f73c18cc1548235e7e88c0eb8d3ed82accbc92d0706f9791ade28e5"
+      url: "https://dl.google.com/firebase/ios/swiftpm/10.25.0/FirebaseAnalytics.zip",
+      checksum: "b2a313c4d58a6eee38b4e5b50462a889fbeb5bc9c1fd35d5f1579ec8e0b68463"
     ),
     .target(
       name: "FirebaseAnalyticsSwiftTarget",
@@ -1381,7 +1381,7 @@ func googleAppMeasurementDependency() -> Package.Dependency {
     return .package(url: appMeasurementURL, branch: "main")
   }
 
-  return .package(url: appMeasurementURL, exact: "10.24.0")
+  return .package(url: appMeasurementURL, exact: "10.25.0")
 }
 
 func abseilDependency() -> Package.Dependency {
@@ -1551,8 +1551,8 @@ func firestoreTargets() -> [Target] {
     } else {
       return .binaryTarget(
         name: "FirebaseFirestoreInternal",
-        url: "https://dl.google.com/firebase/ios/bin/firestore/10.24.0/rc0/FirebaseFirestoreInternal.zip",
-        checksum: "d503fea5b9dcb02dfddd0df85c4353890d49b93e9fd38b79badae151eab62931"
+        url: "https://dl.google.com/firebase/ios/bin/firestore/10.25.0/rc0/FirebaseFirestoreInternal.zip",
+        checksum: "afa9ec6af0712406a1fcd4a69d01d31156308de23d3a8e2622721c72fd72485e"
       )
     }
   }()

+ 39 - 64
ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift

@@ -55,16 +55,8 @@ struct FrameworkBuilder {
                                     setCarthage: Bool,
                                     podInfo: CocoaPodUtils.PodInfo) -> ([URL], URL?) {
     let fileManager = FileManager.default
-    let outputDir = fileManager.temporaryDirectory(withName: "frameworks_being_built")
     let logsDir = logsOutputDir ?? fileManager.temporaryDirectory(withName: "build_logs")
     do {
-      // Remove the compiled frameworks directory, this isn't the cache we're using.
-      if fileManager.directoryExists(at: outputDir) {
-        try fileManager.removeItem(at: outputDir)
-      }
-
-      try fileManager.createDirectory(at: outputDir, withIntermediateDirectories: true)
-
       // Create our logs directory if it doesn't exist.
       if !fileManager.directoryExists(at: logsDir) {
         try fileManager.createDirectory(at: logsDir, withIntermediateDirectories: true)
@@ -74,13 +66,12 @@ struct FrameworkBuilder {
     }
 
     if dynamicFrameworks {
-      return (buildDynamicFrameworks(withName: framework, logsDir: logsDir, outputDir: outputDir),
+      return (buildDynamicFrameworks(withName: framework, logsDir: logsDir),
               nil)
     } else {
       return buildStaticFrameworks(
         withName: framework,
         logsDir: logsDir,
-        outputDir: outputDir,
         setCarthage: setCarthage,
         podInfo: podInfo
       )
@@ -312,8 +303,7 @@ struct FrameworkBuilder {
   /// - Parameter logsDir: The path to the directory to place build logs.
   /// - Returns: A path to the newly compiled frameworks (with any included Resources embedded).
   private func buildDynamicFrameworks(withName framework: String,
-                                      logsDir: URL,
-                                      outputDir: URL) -> [URL] {
+                                      logsDir: URL) -> [URL] {
     // xcframework doesn't lipo things together but accepts fat frameworks for one target.
     // We group architectures here to deal with this fact.
     var thinFrameworks = [URL]()
@@ -340,7 +330,6 @@ struct FrameworkBuilder {
   /// - Returns: A path to the newly compiled framework, and the Resource URL.
   private func buildStaticFrameworks(withName framework: String,
                                      logsDir: URL,
-                                     outputDir: URL,
                                      setCarthage: Bool,
                                      podInfo: CocoaPodUtils.PodInfo) -> ([URL], URL) {
     // Build every architecture and save the locations in an array to be assembled.
@@ -350,13 +339,6 @@ struct FrameworkBuilder {
     // Create the framework directory in the filesystem for the thin archives to go.
     let fileManager = FileManager.default
     let frameworkName = FrameworkBuilder.frameworkBuildName(framework)
-    let frameworkDir = outputDir.appendingPathComponent("\(frameworkName).framework")
-    do {
-      try fileManager.createDirectory(at: frameworkDir, withIntermediateDirectories: true)
-    } catch {
-      fatalError("Could not create framework directory while building framework \(frameworkName). " +
-        "\(error)")
-    }
 
     guard let anyPlatform = targetPlatforms.first,
           let archivePath = slicedFrameworks[anyPlatform] else {
@@ -410,7 +392,6 @@ struct FrameworkBuilder {
     let moduleMapContents = moduleMapContentsTemplate.get(umbrellaHeader: umbrellaHeader)
     let frameworks = groupFrameworks(withName: frameworkName,
                                      isCarthage: setCarthage,
-                                     fromFolder: frameworkDir,
                                      slicedFrameworks: slicedFrameworks,
                                      moduleMapContents: moduleMapContents)
 
@@ -542,18 +523,13 @@ struct FrameworkBuilder {
   /// Groups slices for each platform into a minimal set of frameworks.
   /// - Parameter withName: The framework name.
   /// - Parameter isCarthage: Name the temp directory differently for Carthage.
-  /// - Parameter fromFolder: The almost complete framework folder. Includes Headers, Info.plist,
-  /// and Resources.
   /// - Parameter slicedFrameworks: All the frameworks sliced by platform.
   /// - Parameter moduleMapContents: Module map contents for all frameworks in this pod.
   private func groupFrameworks(withName framework: String,
                                isCarthage: Bool,
-                               fromFolder: URL,
                                slicedFrameworks: [TargetPlatform: URL],
                                moduleMapContents: String) -> ([URL]) {
     let fileManager = FileManager.default
-
-    // Create a `.framework` for each of the thinArchives using the `fromFolder` as the base.
     let platformFrameworksDir = fileManager.temporaryDirectory(
       withName: isCarthage ? "carthage_frameworks" : "platform_frameworks"
     )
@@ -651,7 +627,33 @@ struct FrameworkBuilder {
           platform == .catalyst || platform == .macOS ? "Resources" : ""
         )
         .resolvingSymlinksInPath()
-      processPrivacyManifests(fileManager, frameworkPath, resourceDir)
+
+      // Move resource bundles into the platform framework.
+      do {
+        try fileManager.contentsOfDirectory(
+          at: frameworkPath.deletingLastPathComponent(),
+          includingPropertiesForKeys: nil
+        )
+        .filter { $0.pathExtension == "bundle" }
+        // Bundles are moved rather than copied to prevent them from being
+        // packaged in a `Resources` directory at the root of the xcframework.
+        .forEach {
+          // Delete `gRPCCertificates-Cpp.bundle` since it is not needed (#9184).
+          guard $0.lastPathComponent != "gRPCCertificates-Cpp.bundle" else {
+            try fileManager.removeItem(at: $0)
+            return
+          }
+
+          try fileManager.moveItem(
+            at: $0,
+            to: resourceDir.appendingPathComponent($0.lastPathComponent)
+          )
+        }
+      } catch {
+        fatalError(
+          "Could not move resources for framework \(frameworkPath), platform \(platform). Error: \(error)"
+        )
+      }
 
       // Use the appropriate moduleMaps
       packageModuleMaps(inFrameworks: [frameworkPath],
@@ -663,39 +665,6 @@ struct FrameworkBuilder {
     }
   }
 
-  /// Process privacy manifests.
-  ///
-  /// Move any privacy manifest-containing resource bundles into the platform framework.
-  func processPrivacyManifests(_ fileManager: FileManager,
-                               _ frameworkPath: URL,
-                               _ platformFrameworkDir: URL) {
-    try? fileManager.contentsOfDirectory(
-      at: frameworkPath.deletingLastPathComponent(),
-      includingPropertiesForKeys: nil
-    )
-    .filter { $0.pathExtension == "bundle" }
-    // TODO(ncooke3): Once the zip is built with Xcode 15, the following
-    // `filter` can be removed. The following block exists to preserve
-    // how resources (e.g. like FIAM's) are packaged for use in Xcode 14.
-    .filter { bundleURL in
-      let dirEnum = fileManager.enumerator(atPath: bundleURL.path)
-      var containsPrivacyManifest = false
-      while let relativeFilePath = dirEnum?.nextObject() as? String {
-        if relativeFilePath.hasSuffix("PrivacyInfo.xcprivacy") {
-          containsPrivacyManifest = true
-          break
-        }
-      }
-      return containsPrivacyManifest
-    }
-    // Bundles are moved rather than copied to prevent them from being
-    // packaged in a `Resources` directory at the root of the xcframework.
-    .forEach { try! fileManager.moveItem(
-      at: $0,
-      to: platformFrameworkDir.appendingPathComponent($0.lastPathComponent)
-    ) }
-  }
-
   /// Package the built frameworks into an XCFramework.
   /// - Parameter withName: The framework name.
   /// - Parameter frameworks: The grouped frameworks.
@@ -709,10 +678,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]

+ 6 - 11
ReleaseTooling/Template/README.md

@@ -49,12 +49,7 @@ To integrate a Firebase SDK with your app:
    **Embed & Sign**. This step will enable privacy manifests to be picked up by
    Xcode's tooling.
 
-8. If the SDK has resources, go into the Resources folders, which will be in
-   the SDK folder. Drag all of those resources into the Project Navigator, just
-   like the frameworks, again making sure that the target you want to add these
-   resources to has a checkmark next to it, and that you've selected "Copy items
-   if needed".
-9. Add the `-ObjC` flag to **Other Linker Settings**:
+8. Add the `-ObjC` flag to **Other Linker Settings**:
 
    a. In your project settings, open the **Settings** panel for your target.
 
@@ -63,7 +58,7 @@ To integrate a Firebase SDK with your app:
 
    c. Double-click the setting, click the '+' button, and add `-ObjC`
 
-10. Add the `-lc++` flag to **Other Linker Settings**:
+9. Add the `-lc++` flag to **Other Linker Settings**:
 
    a. In your project settings, open the **Settings** panel for your target.
 
@@ -72,13 +67,13 @@ To integrate a Firebase SDK with your app:
 
    c. Double-click the setting, click the '+' button, and add `-lc++`
 
-11. Drag the `Firebase.h` header in this directory into your project. This will
+10. Drag the `Firebase.h` header in this directory into your project. This will
    allow you to `#import "Firebase.h"` and start using any Firebase SDK that you
    have.
-12. Drag `module.modulemap` into your project and update the
+11. Drag `module.modulemap` into your project and update the
    "User Header Search Paths" in your project's Build Settings to include the
    directory that contains the added module map.
-13. If your app does not include any Swift implementation, you may need to add
+12. If your app does not include any Swift implementation, you may need to add
    a dummy Swift file to the app to prevent Swift system library missing
    symbol linker errors. See
    https://forums.swift.org/t/using-binary-swift-sdks-from-non-swift-apps/55989.
@@ -86,7 +81,7 @@ To integrate a Firebase SDK with your app:
    > ⚠ If prompted with the option to create a corresponding bridging header
    > for the new Swift file, select **Don't create**.
 
-14. You're done! Build your target and start using Firebase.
+13. You're done! Build your target and start using Firebase.
 
 If you want to add another SDK, repeat the steps above with the xcframeworks for
 the new SDK. You only need to add each framework once, so if you've already