Browse Source

Merge branch 'master' into wuandy/StagingConnection

# Conflicts:
#	.github/workflows/firestore.yml
Wu-Hui 4 years ago
parent
commit
7ad6f291be
100 changed files with 1083 additions and 957 deletions
  1. 1 1
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 1 1
      .github/actions/testing_report_generation/action.yml
  3. 10 10
      .github/workflows/combine.yml
  4. 50 96
      .github/workflows/firestore.yml
  5. 24 26
      .github/workflows/functions.yml
  6. 25 26
      .github/workflows/spectesting.yml
  7. 27 28
      .github/workflows/storage.yml
  8. 1 1
      .github/workflows/watchos-sample.yml
  9. 1 0
      .github/workflows/zip.yml
  10. 4 4
      .gitignore
  11. 6 2
      AddNewPod.md
  12. 1 1
      CONTRIBUTING.md
  13. 4 0
      Carthage.md
  14. 1 1
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile
  15. 3 3
      CoreOnly/Sources/Firebase.h
  16. 0 1
      CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift
  17. 1 1
      CoreOnly/Tests/FirebasePodTest/Podfile
  18. 17 15
      Crashlytics/Crashlytics/Public/FirebaseCrashlytics/FIRCrashlytics.h
  19. 1 1
      Dangerfile
  20. 5 5
      Example/FirestoreSample/FirestoreSample.xcodeproj/project.pbxproj
  21. 1 1
      Example/watchOSSample/Podfile
  22. 5 5
      Firebase.podspec
  23. 7 7
      FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h
  24. 1 1
      FirebaseAnalytics.podspec.json
  25. 1 1
      FirebaseAnalyticsSwift.podspec
  26. 4 0
      FirebaseAnalyticsSwift/CHANGELOG.md
  27. 1 1
      FirebaseAppCheck.podspec
  28. 4 0
      FirebaseAppCheck/CHANGELOG.md
  29. 4 1
      FirebaseAppDistribution.podspec
  30. 3 1
      FirebaseAppDistribution/CHANGELOG.md
  31. 2 2
      FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h
  32. 27 0
      FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift
  33. 3 0
      FirebaseAuth/CHANGELOG.md
  34. 2 2
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRAdditionalUserInfo.h
  35. 102 101
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h
  36. 4 4
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthDataResult.h
  37. 6 6
      FirebaseAuth/Sources/Public/FirebaseAuth/FIREmailAuthProvider.h
  38. 3 3
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRFacebookAuthProvider.h
  39. 2 2
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRGameCenterAuthProvider.h
  40. 2 2
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRGitHubAuthProvider.h
  41. 2 2
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRGoogleAuthProvider.h
  42. 1 1
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRMultiFactor.h
  43. 14 14
      FirebaseAuth/Sources/Public/FirebaseAuth/FIROAuthProvider.h
  44. 10 10
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRPhoneAuthProvider.h
  45. 1 1
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRPhoneMultiFactorInfo.h
  46. 2 2
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRTwitterAuthProvider.h
  47. 83 83
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h
  48. 2 2
      FirebaseAuth/Tests/Sample/Podfile
  49. 7 1
      FirebaseAuth/Tests/Sample/SwiftApiTests/SwiftAPI.swift
  50. 4 4
      FirebaseCombineSwift.podspec
  51. 1 1
      FirebaseCombineSwift/DECISIONS.md
  52. 1 1
      FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift
  53. 14 0
      FirebaseCore/CHANGELOG.md
  54. 0 1
      FirebaseCore/Sources/FIRApp.m
  55. 0 15
      FirebaseCore/Tests/Unit/FIRAppTest.m
  56. 30 29
      FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDataSnapshot.h
  57. 30 30
      FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDatabase.h
  58. 191 185
      FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDatabaseQuery.h
  59. 31 29
      FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRMutableData.h
  60. 10 10
      FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRTransactionResult.h
  61. 1 1
      FirebaseDatabaseSwift.podspec
  62. 4 0
      FirebaseDatabaseSwift/CHANGELOG.md
  63. 3 0
      FirebaseDynamicLinks/CHANGELOG.md
  64. 8 1
      FirebaseDynamicLinks/Sources/FIRDynamicLinks.m
  65. 1 1
      FirebaseFirestoreSwift.podspec
  66. 11 0
      FirebaseFunctions.podspec
  67. 6 0
      FirebaseFunctions/CHANGELOG.md
  68. 2 11
      FirebaseFunctions/Sources/FunctionsError.swift
  69. 2 3
      FirebaseFunctions/Tests/ObjCIntegration/FIRIntegrationTests.m
  70. 3 9
      FirebaseFunctions/Tests/ObjCIntegration/ObjCAPITests.m
  71. 78 0
      FirebaseFunctions/Tests/ObjCIntegration/ObjCPPAPITests.mm
  72. 7 1
      FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift
  73. 23 25
      FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging/FIRInAppMessaging.h
  74. 7 7
      FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h
  75. 33 33
      FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessaging.h
  76. 1 1
      FirebasePerformance/CHANGELOG.md
  77. 2 2
      FirebasePerformance/Sources/Public/FirebasePerformance/FIRHTTPMetric.h
  78. 16 16
      FirebasePerformance/Sources/Public/FirebasePerformance/FIRPerformance.h
  79. 34 38
      FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h
  80. 1 1
      FirebaseRemoteConfigSwift.podspec
  81. 4 0
      FirebaseRemoteConfigSwift/CHANGELOG.md
  82. 12 12
      FirebaseStorage.podspec
  83. 9 0
      FirebaseStorage/CHANGELOG.md
  84. 0 0
      FirebaseStorage/Sources/AsyncAwait.swift
  85. 0 0
      FirebaseStorage/Sources/Result.swift
  86. 1 1
      FirebaseStorage/Sources/Storage.swift
  87. 0 0
      FirebaseStorage/Sources/StorageComponent.swift
  88. 1 1
      FirebaseStorage/Sources/StorageConstants.swift
  89. 1 1
      FirebaseStorage/Sources/StorageDownloadTask.swift
  90. 4 1
      FirebaseStorage/Sources/StorageError.swift
  91. 1 1
      FirebaseStorage/Sources/StorageListResult.swift
  92. 1 1
      FirebaseStorage/Sources/StorageMetadata.swift
  93. 1 1
      FirebaseStorage/Sources/StorageObservableTask.swift
  94. 1 1
      FirebaseStorage/Sources/StorageReference.swift
  95. 1 1
      FirebaseStorage/Sources/StorageTask.swift
  96. 1 1
      FirebaseStorage/Sources/StorageTaskSnapshot.swift
  97. 1 1
      FirebaseStorage/Sources/StorageUploadTask.swift
  98. 0 0
      FirebaseStorage/Tests/Integration/Credentials.swift
  99. 0 0
      FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift
  100. 0 0
      FirebaseStorage/Tests/Integration/StorageIntegration.swift

+ 1 - 1
.github/ISSUE_TEMPLATE/bug_report.md

@@ -9,7 +9,7 @@ template_path=.github/ISSUE_TEMPLATE/bug_report.md
 ### Step 0: Are you in the right place?
 
   * For issues or feature requests related to __the code in this repository__
-    file a Github issue.
+    file a GitHub issue.
     * If this is a __feature request__ please use the Feature Request template.
   * For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
     with the `firebase` tag.

+ 1 - 1
.github/actions/testing_report_generation/action.yml

@@ -9,7 +9,7 @@ inputs:
     required: true
     default: 'nightly-testing'
   issue-title:
-    description: 'Title of a Github Issue'
+    description: 'Title of a GitHub Issue'
     required: true
     default: 'Nightly Testing Report'
   assignee:

+ 10 - 10
.github/workflows/combine.yml

@@ -29,13 +29,13 @@ on:
     # Rebuild on Ruby infrastructure changes.
     - 'Gemfile'
 
-    # Dependencies
-    - 'FirebaseCore/**'
-    - 'FirebaseAuth/**'
-    - 'FirebaseFunctions/**'
-    - 'Firestore/**'
-    - 'FirebaseStorage/**'
-    - 'FirebaseStorageSwift/**'
+    # Dependencies (Disabled to avoid building Firestore in presubmits)
+    # - 'FirebaseCore/**'
+    # - 'FirebaseAuth/**'
+    # - 'FirebaseFunctions/**'
+    # - 'Firestore/**'
+    # - 'FirebaseStorageInternal/**'
+    # - 'FirebaseStorage/**'
 
   schedule:
     # Run every day at 11pm (PST) - cron uses UTC times
@@ -82,13 +82,13 @@ jobs:
       run: scripts/setup_bundler.sh
     - name: Install Secret GoogleService-Info.plist
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
-          FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
+          FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
     - name: Install Credentials.h
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
-          FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
+          FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
     - name: Install Credentials.swift
       run: |
         scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
-          FirebaseStorageSwift/Tests/Integration/Credentials.swift "$plist_secret"
+          FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
     - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
       run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh StorageCombine all)

+ 50 - 96
.github/workflows/firestore.yml

@@ -201,102 +201,56 @@ jobs:
         CUSTOM_FIRESTORE_API_KEY: ${{ CUSTOM_FIRESTORE_API_KEY}}
       run:  scripts/third_party/travis/retry.sh scripts/build.sh Firestore macOS xcodebuild
 
-#  pod-lib-lint:
-#    # 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'
-#    runs-on: macos-11
-#    needs: check
-#    strategy:
-#      matrix:
-#        podspec: [
-#          'FirebaseFirestore.podspec',
-#          'FirebaseFirestoreSwift.podspec',
-#        ]
-#
-#    steps:
-#    - uses: actions/checkout@v2
-#
-#    - name: Setup Bundler
-#      run: ./scripts/setup_bundler.sh
-#
-#    - name: Pod lib lint
-#      # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
-#      run: |
-#        scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} \
-#            --platforms=ios \
-#            --allow-warnings \
-#            --no-analyze
-#
-#  # `pod lib lint` takes a long time so only run the other platforms and static frameworks build in the cron.
-#  pod-lib-lint-cron:
-#    if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
-#    runs-on: macos-11
-#    needs: check
-#    strategy:
-#      matrix:
-#        podspec: [
-#          'FirebaseFirestore.podspec',
-#          'FirebaseFirestoreSwift.podspec',
-#        ]
-#        platforms: [
-#          'macos',
-#          'tvos',
-#        ]
-#        flags: [
-#          '--use-static-frameworks',
-#          '',
-#        ]
-#
-#    steps:
-#    - uses: actions/checkout@v2
-#
-#    - name: Setup Bundler
-#      run: ./scripts/setup_bundler.sh
-#
-#    - name: Pod lib lint
-#      # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
-#      run: |
-#        scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\
-#            ${{ matrix.flags }} \
-#            --platforms=${{ matrix.platforms }} \
-#            --allow-warnings \
-#            --no-analyze
-#
-#  spm:
-#    # 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'
-#    runs-on: macos-11
-#    needs: check
-#    steps:
-#    - uses: actions/checkout@v2
-#    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
-#      with:
-#        cache_key: ${{ matrix.os }}
-#    - name: Initialize xcodebuild
-#      run: scripts/setup_spm_tests.sh
-#    - name: iOS Build Test
-#      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly
-#    - name: Swift Build
-#      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift-Beta iOS spmbuildonly
-#
-#  spm-cron:
-#    # Don't run on private repo.
-#    if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
-#    runs-on: macos-11
-#    strategy:
-#      matrix:
-#        target: [tvOS, macOS, catalyst]
-#    steps:
-#    - uses: actions/checkout@v2
-#    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
-#      with:
-#        cache_key: ${{ matrix.os }}
-#    - name: Initialize xcodebuild
-#      run: scripts/setup_spm_tests.sh
-#    - name: Build Test
-#      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
-#    - name: Swift Build
-#      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift-Beta ${{ matrix.target }} spmbuildonly
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: Setup Bundler
+      run: ./scripts/setup_bundler.sh
+
+    - name: Pod lib lint
+      # TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
+      run: |
+        scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }}\
+            ${{ matrix.flags }} \
+            --platforms=${{ matrix.platforms }} \
+            --allow-warnings \
+            --no-analyze
+
+  spm:
+    # 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'
+    runs-on: macos-11
+    needs: check
+    steps:
+    - uses: actions/checkout@v2
+    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
+      with:
+        cache_key: ${{ matrix.os }}
+    - name: Initialize xcodebuild
+      run: scripts/setup_spm_tests.sh
+    - name: iOS Build Test
+      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore iOS spmbuildonly
+    - name: Swift Build
+      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift iOS spmbuildonly
+
+  spm-cron:
+    # Don't run on private repo.
+    if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
+    runs-on: macos-11
+    strategy:
+      matrix:
+        target: [tvOS, macOS, catalyst]
+    steps:
+    - uses: actions/checkout@v2
+    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
+      with:
+        cache_key: ${{ matrix.os }}
+    - name: Initialize xcodebuild
+      run: scripts/setup_spm_tests.sh
+    - name: Build Test
+      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestore ${{ matrix.target }} spmbuildonly
+    - name: Swift Build
+      run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFirestoreSwift ${{ matrix.target }} spmbuildonly
 
   # Disable until FirebaseUI is updated to accept Firebase 9 and quickstart is updated to accept
   # Firebase UI 12

+ 24 - 26
.github/workflows/functions.yml

@@ -30,8 +30,7 @@ jobs:
     runs-on: macos-11
     strategy:
       matrix:
-        # TODO: The --skip-tests might be removable with Xcode 13.2+
-        target: [ios, tvos, macos --skip-tests, watchos]
+        target: [ios, tvos, macos, watchos]
     steps:
     - uses: actions/checkout@v2
     - name: Setup Bundler
@@ -83,31 +82,30 @@ jobs:
     - name: Unit Tests
       run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseFunctionsUnit ${{ matrix.target }} spm
 
-# TODO: Restore Quickstart when ported for Firebase 9.
-  # 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
-  #   runs-on: macos-11
+  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
+    runs-on: macos-11
 
-  #   steps:
-  #   - uses: actions/checkout@v2
-  #   - 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@v2
+    - 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)
 
   functions-cron-only:
     # Don't run on private repo.

+ 25 - 26
.github/workflows/spectesting.yml

@@ -41,29 +41,28 @@ jobs:
         echo "::set-output name=matrix::{\"include\":$( cat output.json )}"
         # `podspecs` is to help determine if specs_testing job should be run.
         echo "::set-output name=podspecs::$(cat output.json)"
-# TODO(v9): Re-enable once `v9` merges back to `master`.
-#   specs_testing:
-#     needs: specs_checking
-#     if: ${{ needs.specs_checking.outputs.podspecs != '[]' }}
-#     runs-on: macos-11
-#     strategy:
-#       fail-fast: false
-#       matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}}
-#     env:
-#       PODSPEC: ${{ matrix.podspec }}
-#     steps:
-#     - name: Checkout code
-#       uses: actions/checkout@v2
-#       with:
-#         fetch-depth: 0
-#     - name: Init podspecs and source
-#       run: |
-#         mkdir specTestingLogs
-#         cd ReleaseTooling
-#         swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs"
-#     - name: Upload Failed Testing Logs
-#       if: failure()
-#       uses: actions/upload-artifact@v2
-#       with:
-#         name: specTestingLogs
-#         path: specTestingLogs/*.txt
+  specs_testing:
+    needs: specs_checking
+    if: ${{ needs.specs_checking.outputs.podspecs != '[]' }}
+    runs-on: macos-11
+    strategy:
+      fail-fast: false
+      matrix: ${{fromJson(needs.specs_checking.outputs.matrix)}}
+    env:
+      PODSPEC: ${{ matrix.podspec }}
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+      with:
+        fetch-depth: 0
+    - name: Init podspecs and source
+      run: |
+        mkdir specTestingLogs
+        cd ReleaseTooling
+        swift run podspecs-tester --git-root "${GITHUB_WORKSPACE}" --podspec ${PODSPEC} --skip-tests --temp-log-dir "${GITHUB_WORKSPACE}/specTestingLogs"
+    - name: Upload Failed Testing Logs
+      if: failure()
+      uses: actions/upload-artifact@v2
+      with:
+        name: specTestingLogs
+        path: specTestingLogs/*.txt

+ 27 - 28
.github/workflows/storage.yml

@@ -33,14 +33,14 @@ jobs:
       run: scripts/setup_bundler.sh
     - name: Install Secret GoogleService-Info.plist
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/storage-db-plist.gpg \
-          FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
+          FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist "$plist_secret"
     - name: Install Credentials.h
       run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.h.gpg \
-          FirebaseStorage/Tests/Integration/Credentials.h "$plist_secret"
+          FirebaseStorageInternal/Tests/Integration/Credentials.h "$plist_secret"
     - name: Install Credentials.swift
       run: |
         scripts/decrypt_gha_secret.sh scripts/gha-encrypted/Storage/Credentials.swift.gpg \
-          FirebaseStorageSwift/Tests/Integration/Credentials.swift "$plist_secret"
+          FirebaseStorage/Tests/Integration/Credentials.swift "$plist_secret"
     - name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
       run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/build.sh Storage all)
 
@@ -89,28 +89,27 @@ jobs:
     - name: Setup Bundler
       run: scripts/setup_bundler.sh
     - name: Setup project and Build for Catalyst
-      run: scripts/test_catalyst.sh FirebaseStorageObjC test FirebaseStorageObjC-Unit-unit
+      run: scripts/test_catalyst.sh FirebaseStorageInternal test FirebaseStorageInternal-Unit-unit
 
-# TODO: Restore Quickstart when ported for Firebase 9.
-  # 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
-  #   runs-on: macos-11
-  #   steps:
-  #   - uses: actions/checkout@v2
-  #   - name: Setup quickstart
-  #     run: scripts/setup_quickstart.sh storage
-  #   - name: Install Secret GoogleService-Info.plist
-  #     run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
-  #         quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
-  #   - name: Test objc quickstart
-  #     run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
-  #   - name: Test swift quickstart
-  #     run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
+  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
+    runs-on: macos-11
+    steps:
+    - uses: actions/checkout@v2
+    - name: Setup quickstart
+      run: scripts/setup_quickstart.sh storage
+    - name: Install Secret GoogleService-Info.plist
+      run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-storage.plist.gpg \
+          quickstart-ios/storage/GoogleService-Info.plist "$plist_secret"
+    - name: Test objc quickstart
+      run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true)
+    - name: Test swift quickstart
+      run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Storage true swift)
 
   pod-lib-lint:
     # Don't run on private repo unless it is a PR.
@@ -119,14 +118,14 @@ jobs:
     strategy:
       matrix:
         target: [ios, tvos, macos, watchos]
-        podspec: [Storage, StorageObjC]
+        podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
     steps:
     - uses: actions/checkout@v2
     - name: Setup Bundler
       run: scripts/setup_bundler.sh
     - name: Build and test
       run: |
-       scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb Firebase${{ matrix.podspec }}.podspec --test-specs=unit --platforms=${{ matrix.target }}
+       scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --test-specs=unit --platforms=${{ matrix.target }}
 
   storage-cron-only:
     # Don't run on private repo.
@@ -135,11 +134,11 @@ jobs:
     strategy:
       matrix:
         target: [ios, tvos, macos, watchos]
-        podspec: [Storage, StorageObjC]
+        podspec: [FirebaseStorage.podspec, FirebaseStorageInternal.podspec]
     needs: pod-lib-lint
     steps:
     - uses: actions/checkout@v2
     - name: Setup Bundler
       run: scripts/setup_bundler.sh
     - name: PodLibLint Storage Cron
-      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb Firebase${{ matrix.podspec }}.podspec --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests
+      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb ${{ matrix.podspec }} --platforms=${{ matrix.target }} --use-static-frameworks --skip-tests

+ 1 - 1
.github/workflows/watchos-sample.yml

@@ -7,7 +7,7 @@ on:
     - 'FirebaseABTesting/**'
     - 'FirebaseDatabase/**'
     - 'FirebaseRemoteConfig/**'
-    - 'FirebaseStorage/**'
+    - 'FirebaseStorageInternal/**'
     # Sample
     - 'Example/watchOSSample/**'
     # Firebase Podspec

+ 1 - 0
.github/workflows/zip.yml

@@ -117,6 +117,7 @@ jobs:
       run: SAMPLE="$SDK" TARGET="${SDK}Example" scripts/setup_quickstart_framework.sh \
                                                "${HOME}"/ios_frameworks/Firebase/FirebaseRemoteConfig/* \
                                                "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCore.xcframework \
+                                               "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseCoreInternal.xcframework \
                                                "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/PromisesObjC.xcframework \
                                                "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/FirebaseInstallations.xcframework \
                                                "${HOME}"/ios_frameworks/Firebase/FirebaseAnalytics/GoogleUtilities.xcframework

+ 4 - 4
.gitignore

@@ -11,7 +11,7 @@ FirebaseDatabase/Tests/Resources/GoogleService-Info.plist
 FirebaseRemoteConfig/Tests/Sample/GoogleService-Info.plist
 
 # FirebaseStorage integration tests GoogleService-Info.plist
-FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist
+FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist
 
 # FirebaseInstallations integration tests GoogleService-Info.plist
 FirebaseInstallations/Source/Tests/Resources/GoogleService-Info.plist
@@ -24,9 +24,9 @@ FirebaseMessaging/Apps/AdvancedSample/SampleWatchWatchKitExtension/GoogleService
 FirebaseMessaging/Apps/AdvancedSample/AppClips/GoogleService-Info.plist
 
 # Credentials for Firebase Storage Integration Tests
-FirebaseStorage/Tests/Integration/Credentials.h
-FirebaseStorage/Tests/SwiftIntegration/Credentials.swift
-FirebaseStorageSwift/Tests/Integration/Credentials.swift
+FirebaseStorageInternal/Tests/Integration/Credentials.h
+FirebaseStorageInternal/Tests/SwiftIntegration/Credentials.swift
+FirebaseStorage/Tests/Integration/Credentials.swift
 
 # FirebaseMLModelDownloader integration tests GoogleService-Info.plist
 FirebaseMLModelDownloader/Tests/Integration/Resources/GoogleService-Info.plist

+ 6 - 2
AddNewPod.md

@@ -68,8 +68,12 @@ For top-level Firebase pods that map to documented products:
 * Make sure the public umbrella header is imported via [Firebase.h](CoreOnly/Sources/Firebase.h)
   wrapped in `__has_include`. Follow the existing examples for details.
 * Update [Firebase.podspec](Firebase.podspec).
-* Register library via registerInternalLibrary API like this
-  [Storage example](FirebaseStorage/Sources/FIRStorageComponent.m).
+* Register Objective C library via registerInternalLibrary API like this
+  [AppCheck example](FirebaseAppCheck/Sources/Core/FIRAppCheck.m).
+* Register Swift library by creating a component like
+  [Functions example](FirebaseFunctions/Sources/Internal/FunctionsComponent.swift) and
+  detecting it in `registerSwiftComponents` in
+  [FIRApp.m](FirebaseCore/Sources/FIRApp.m).
 * When ready to release with Firebase, add to the
   [Firebase manifest](ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift).
 * Add a [quickstart](https://github.com/firebase/quickstart-ios).

+ 1 - 1
CONTRIBUTING.md

@@ -271,7 +271,7 @@ Alternatively, the script can be work on branch names or filenames.
 ```
 
 ```console
-./scripts/style.sh FirebaseStorage/Sources/FIRStorage.m
+./scripts/style.sh FirebaseStorageInternal/Sources/FIRStorage.m
 ```
 
 <details>

+ 4 - 0
Carthage.md

@@ -53,6 +53,10 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.jso
 - Use Finder to open `Carthage/Build/iOS`.
 - Copy the contents into the top level of your Xcode project and make sure
     they're added to the right build target(s).
+    - To disable AdId support, do not copy
+   `GoogleAppMeasurementIdentitySupport.xcframework`.
+    - If the app does not use any Firebase Swift specific APIs, you do not need
+   to copy any xcframeworks whose name includes "Swift".
 - Add `$(OTHER_LDFLAGS) -ObjC` flag to "Other Linker Flags" in "Build Settings".
 - Make sure that the build target(s) includes your project's `GoogleService-Info.plist`
  ([how to download config file](https://support.google.com/firebase/answer/7015592))

+ 1 - 1
CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile

@@ -28,7 +28,7 @@ target 'CocoapodsIntegrationTest' do
   pod 'FirebaseMessagingInterop', :path => '../'
   pod 'FirebasePerformance', :path => '../'
   pod 'FirebaseStorage', :path => '../'
-  pod 'FirebaseStorageObjC', :path => '../'
+  pod 'FirebaseStorageInternal', :path => '../'
 end
 
 # Using the new speed-enhancing features available with CocoaPods 1.7+

+ 3 - 3
CoreOnly/Sources/Firebase.h

@@ -51,7 +51,7 @@
   #endif
 
   #if __has_include("FirebaseFunctions-umbrella.h")
-@import FirebaseFunctions;
+    #import <FirebaseFunctions/FirebaseFunctions-Swift.h>
   #endif
 
   #if __has_include(<FirebaseInAppMessaging/FirebaseInAppMessaging.h>)
@@ -74,8 +74,8 @@
     #import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
   #endif
 
-  #if __has_include(<FirebaseStorage/FirebaseStorage.h>)
-    #import <FirebaseStorage/FirebaseStorage.h>
+  #if __has_include("FirebaseStorage-umbrella.h")
+    #import <FirebaseStorage/FirebaseStorage-Swift.h>
   #endif
 
 #endif  // defined(__has_include)

+ 0 - 1
CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift

@@ -18,7 +18,6 @@ import Firebase
 import FirebaseAnalyticsSwift
 import FirebaseFirestoreSwift
 import FirebaseInAppMessagingSwift
-import FirebaseStorage
 
 class CoreExists: FirebaseApp {}
 class AnalyticsExists: Analytics {}

+ 1 - 1
CoreOnly/Tests/FirebasePodTest/Podfile

@@ -29,7 +29,7 @@ target 'FirebasePodTest' do
   pod 'FirebasePerformance', :path => '../../../'
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseStorage', :path => '../../../'
-  pod 'FirebaseStorageObjC', :path => '../../../'
+  pod 'FirebaseStorageInternal', :path => '../../../'
 
   # Get dependent pods from the repo also
   pod 'FirebaseAppCheckInterop', :path => '../../../'

+ 17 - 15
Crashlytics/Crashlytics/Public/FirebaseCrashlytics/FIRCrashlytics.h

@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
  * The Firebase Crashlytics API provides methods to annotate and manage fatal and
  * non-fatal reports captured and reported to Firebase Crashlytics.
  *
- * By default, Firebase Crashlytics is initialized with FirebaseApp.configure().
+ * By default, Firebase Crashlytics is initialized with `FirebaseApp.configure()`.
  *
  * Note: The Crashlytics class cannot be subclassed. If this makes testing difficult,
  * we suggest using a wrapper class or a protocol extension.
@@ -48,16 +48,16 @@ NS_SWIFT_NAME(Crashlytics)
 + (instancetype)crashlytics NS_SWIFT_NAME(crashlytics());
 
 /**
- * Adds logging that is sent with your crash data. The logging does not appear in the
- * system.log and is only visible in the Crashlytics dashboard.
+ * Adds logging that is sent with your crash data. The logging does not appear in app
+ * logs and is only visible in the Crashlytics dashboard.
  *
  * @param msg Message to log
  */
 - (void)log:(NSString *)msg;
 
 /**
- * Adds logging that is sent with your crash data. The logging does not appear in the
- * system.log and is only visible in the Crashlytics dashboard.
+ * Adds logging that is sent with your crash data. The logging does not appear in app
+ * logs and is only visible in the Crashlytics dashboard.
  *
  * @param format Format of string
  * @param ... A comma-separated list of arguments to substitute into format
@@ -65,8 +65,8 @@ NS_SWIFT_NAME(Crashlytics)
 - (void)logWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
 
 /**
- * Adds logging that is sent with your crash data. The logging does not appear in the
- * system.log and is only visible in the Crashlytics dashboard.
+ * Adds logging that is sent with your crash data. The logging does not appear in app
+ * logs and is only visible in the Crashlytics dashboard.
  *
  * @param format Format of string
  * @param args Arguments to substitute into format
@@ -170,9 +170,10 @@ NS_SWIFT_NAME(Crashlytics)
  * sendUnsentReports or deleteUnsentReports, depending on whether or not the user gives consent.
  *
  * Disable automatic collection by:
- *  - Adding the FirebaseCrashlyticsCollectionEnabled: NO key to your App's Info.plist
+ *  - Adding the `FirebaseCrashlyticsCollectionEnabled` key with the value set to NO to your app's
+ *    Info.plist
  *  - Calling `FirebaseCrashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)` in your app
- *  - Setting FirebaseApp's isDataCollectionDefaultEnabled to false
+ *  - Setting `FirebaseApp`'s `isDataCollectionDefaultEnabled` to false
  *
  * @param completion The callback that's executed once Crashlytics finishes checking for unsent
  * reports. The callback is set to true if there are unsent reports on disk.
@@ -191,14 +192,15 @@ NS_SWIFT_NAME(Crashlytics)
  * sendUnsentReports or deleteUnsentReports, depending on whether or not the user gives consent.
  *
  * Disable automatic collection by:
- *  - Adding the FirebaseCrashlyticsCollectionEnabled: NO key to your App's Info.plist
+ *  - Adding the `FirebaseCrashlyticsCollectionEnabled` key with the value set to NO to your app's
+ *    Info.plist
  *  - Calling `FirebaseCrashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)` in your app
- *  - Setting FirebaseApp's isDataCollectionDefaultEnabled to false
+ *  - Setting `FirebaseApp`'s `isDataCollectionDefaultEnabled` to false
  *
- * Not calling send/deleteUnsentReports will result in the report staying on disk, which means the
- * same CrashlyticsReport can show up in multiple runs of the app. If you want avoid duplicates,
- * ensure there was a crash on the last run of the app by checking the value of
- * didCrashDuringPreviousExecution.
+ * Not calling `sendUnsentReports()`/`deleteUnsentReports()` will result in the report staying on
+ * disk, which means the same CrashlyticsReport can show up in multiple runs of the app. If you
+ * want avoid duplicates, ensure there was a crash on the last run of the app by checking the value
+ * of `didCrashDuringPreviousExecution`.
  *
  * @param completion The callback that's executed once Crashlytics finishes checking for unsent
  * reports. The callback is called with the newest unsent Crashlytics Report, or nil if there are

+ 1 - 1
Dangerfile

@@ -104,7 +104,7 @@ has_license_changes = didModify(["LICENSE"])
 @has_remoteconfig_changes = hasChangesIn("FirebaseRemoteConfig")
 @has_remoteconfig_api_changes = hasChangesIn("FirebaseRemoteConfig/Sources/Public/")
 @has_storage_changes = hasChangesIn("FirebaseStorage")
-@has_storage_api_changes = hasChangesIn("FirebaseStorage/Sources/Public/")
+@has_storage_api_changes = hasChangesIn("FirebaseStorageInternal/Sources/Public/")
 
 @has_releasetooling_changes = hasChangesIn("ReleaseTooling/")
 

+ 5 - 5
Example/FirestoreSample/FirestoreSample.xcodeproj/project.pbxproj

@@ -9,7 +9,7 @@
 /* Begin PBXBuildFile section */
 		8817084426B9593E009E9281 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8817084326B9593E009E9281 /* GoogleService-Info.plist */; };
 		8817084726B95A63009E9281 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 8817084626B95A63009E9281 /* FirebaseFirestore */; };
-		8817084926B95A63009E9281 /* FirebaseFirestoreSwift-Beta in Frameworks */ = {isa = PBXBuildFile; productRef = 8817084826B95A63009E9281 /* FirebaseFirestoreSwift-Beta */; };
+		8817084926B95A63009E9281 /* FirebaseFirestoreSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 8817084826B95A63009E9281 /* FirebaseFirestoreSwift */; };
 		88327B8826D62908002AA6D9 /* FavouriteFruitsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88327B8726D62908002AA6D9 /* FavouriteFruitsView.swift */; };
 		8844BA6126E0DD3F000786F0 /* FavouriteFruitsMappingErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8844BA6026E0DD3F000786F0 /* FavouriteFruitsMappingErrorView.swift */; };
 		88D5E37826EBD2F200808AFF /* FavouriteFruitsMappingErrorView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88D5E37726EBD2F200808AFF /* FavouriteFruitsMappingErrorView2.swift */; };
@@ -38,7 +38,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				8817084726B95A63009E9281 /* FirebaseFirestore in Frameworks */,
-				8817084926B95A63009E9281 /* FirebaseFirestoreSwift-Beta in Frameworks */,
+				8817084926B95A63009E9281 /* FirebaseFirestoreSwift in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -135,7 +135,7 @@
 			name = FirestoreSample;
 			packageProductDependencies = (
 				8817084626B95A63009E9281 /* FirebaseFirestore */,
-				8817084826B95A63009E9281 /* FirebaseFirestoreSwift-Beta */,
+				8817084826B95A63009E9281 /* FirebaseFirestoreSwift */,
 			);
 			productName = FirestoreSample;
 			productReference = 88FBD98426B9485F00982BF2 /* FirestoreSample.app */;
@@ -407,9 +407,9 @@
 			isa = XCSwiftPackageProductDependency;
 			productName = FirebaseFirestore;
 		};
-		8817084826B95A63009E9281 /* FirebaseFirestoreSwift-Beta */ = {
+		8817084826B95A63009E9281 /* FirebaseFirestoreSwift */ = {
 			isa = XCSwiftPackageProductDependency;
-			productName = "FirebaseFirestoreSwift-Beta";
+			productName = "FirebaseFirestoreSwift";
 		};
 /* End XCSwiftPackageProductDependency section */
 	};

+ 1 - 1
Example/watchOSSample/Podfile

@@ -23,7 +23,7 @@ target 'SampleWatchAppWatchKitExtension' do
 
   pod 'Firebase/Messaging', :path => '../../'
   pod 'Firebase/Storage', :path => '../../'
-  pod 'FirebaseStorageObjC', :path => '../../'
+  pod 'FirebaseStorageInternal', :path => '../../'
   pod 'Firebase/RemoteConfig', :path => '../../'
   pod 'Firebase/ABTesting', :path => '../../'
   pod 'Firebase/Database', :path => '../../'

+ 5 - 5
Firebase.podspec

@@ -33,7 +33,7 @@ Simplify your app development, grow your user base, and monetize more effectivel
   s.default_subspec = 'Core'
 
   s.subspec 'Core' do |ss|
-    ss.ios.deployment_target = '9.0'
+    ss.ios.deployment_target = '10.0'
     ss.osx.deployment_target = '10.12'
     ss.tvos.deployment_target = '12.0'
     ss.ios.dependency 'FirebaseAnalytics', '~> 9.0.0'
@@ -62,21 +62,21 @@ Simplify your app development, grow your user base, and monetize more effectivel
   end
 
   s.subspec 'Analytics' do |ss|
-    ss.ios.deployment_target = '9.0'
+    ss.ios.deployment_target = '10.0'
     ss.osx.deployment_target = '10.12'
     ss.tvos.deployment_target = '12.0'
     ss.dependency 'Firebase/Core'
   end
 
   s.subspec 'AnalyticsWithAdIdSupport' do |ss|
-    ss.ios.deployment_target = '9.0'
+    ss.ios.deployment_target = '10.0'
     ss.osx.deployment_target = '10.12'
     ss.tvos.deployment_target = '12.0'
     ss.dependency 'Firebase/Core'
   end
 
   s.subspec 'AnalyticsWithoutAdIdSupport' do |ss|
-    ss.ios.deployment_target = '9.0'
+    ss.ios.deployment_target = '10.0'
     ss.osx.deployment_target = '10.12'
     ss.tvos.deployment_target = '12.0'
     ss.ios.dependency 'FirebaseAnalytics/WithoutAdIdSupport', '~> 9.0.0'
@@ -100,7 +100,7 @@ Simplify your app development, grow your user base, and monetize more effectivel
 
   s.subspec 'AppCheck' do |ss|
     ss.dependency 'Firebase/CoreOnly'
-    ss.dependency 'FirebaseAppCheck', '~> 9.0.0-beta'
+    ss.dependency 'FirebaseAppCheck', '~> 9.0.0'
     ss.ios.deployment_target = '9.0'
     ss.osx.deployment_target = '10.12'
     ss.tvos.deployment_target = '10.0'

+ 7 - 7
FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h

@@ -37,27 +37,27 @@ extern NSString *const FIRExpireExperimentEventName NS_SWIFT_NAME(DefaultExpireE
 NS_SWIFT_NAME(LifecycleEvents)
 @interface FIRLifecycleEvents : NSObject
 
-/// Event name for when an experiment is set. It is default to FIRSetExperimentEventName and can be
-/// overridden. If experiment payload has a valid string of this field, always use experiment
-/// payload.
+/// Event name for when an experiment is set. It defaults to `SetExperimentEventName` and can be
+/// overridden. If experiment payload has a valid string of this field, always use
+/// experiment payload.
 @property(nonatomic, copy) NSString *setExperimentEventName;
 
-/// Event name for when an experiment is activated. It is default to FIRActivateExperimentEventName
+/// Event name for when an experiment is activated. It defaults to `ActivateExperimentEventName`
 /// and can be overridden. If experiment payload has a valid string of this field, always use
 /// experiment payload.
 @property(nonatomic, copy) NSString *activateExperimentEventName;
 
-/// Event name for when an experiment is cleared. It is default to FIRClearExperimentEventName and
+/// Event name for when an experiment is cleared. It is default to `ClearExperimentEventName` and
 /// can be overridden. If experiment payload has a valid string of this field, always use experiment
 /// payload.
 @property(nonatomic, copy) NSString *clearExperimentEventName;
 /// Event name for when an experiment is timeout from being STANDBY. It is default to
-/// FIRTimeoutExperimentEventName and can be overridden. If experiment payload has a valid string
+/// `TimeoutExperimentEventName` and can be overridden. If experiment payload has a valid string
 /// of this field, always use experiment payload.
 @property(nonatomic, copy) NSString *timeoutExperimentEventName;
 
 /// Event name when an experiment is expired when it reaches the end of its TTL.
-/// It is default to FIRExpireExperimentEventName and can be overridden. If experiment payload has a
+/// It is default to `ExpireExperimentEventName` and can be overridden. If experiment payload has a
 /// valid string of this field, always use experiment payload.
 @property(nonatomic, copy) NSString *expireExperimentEventName;
 

+ 1 - 1
FirebaseAnalytics.podspec.json

@@ -27,7 +27,7 @@
     },
     "name": "FirebaseAnalytics",
     "platforms": {
-        "ios": "9.0",
+        "ios": "10.0",
         "osx": "10.12",
         "tvos": "12.0"
     },

+ 1 - 1
FirebaseAnalyticsSwift.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name                    = 'FirebaseAnalyticsSwift'
-  s.version                 = '9.0.0-beta'
+  s.version                 = '9.0.0'
   s.summary                 = 'Swift Extensions for Firebase Analytics'
 
   s.description      = <<-DESC

+ 4 - 0
FirebaseAnalyticsSwift/CHANGELOG.md

@@ -1,3 +1,7 @@
+# v9.0.0
+- [added] **Breaking change:** `FirebaseAnalyticsSwift` has exited beta and is
+  now generally available for use.
+
 # v7.9.0-beta
 - Initial public beta release. Introduces new SwiftUI friendly APIs for
   screen tracking. To use, add `pod 'FirebaseAnalyticsSwift', '~> 7.9-beta'` to the Podfile or

+ 1 - 1
FirebaseAppCheck.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name             = 'FirebaseAppCheck'
-  s.version          = '9.0.0-beta'
+  s.version          = '9.0.0'
   s.summary          = 'Firebase App Check SDK.'
 
   s.description      = <<-DESC

+ 4 - 0
FirebaseAppCheck/CHANGELOG.md

@@ -1,3 +1,7 @@
+# v9.0.0 -- M115
+- [added] **Breaking change:** `FirebaseAppCheck` has exited beta and is now
+  generally available for use.
+
 # v8.12.0 -- M111
 - [fixed] Build failures with Swift Package Manager for watchOS. (#9191)
 

+ 4 - 1
FirebaseAppDistribution.podspec

@@ -43,7 +43,10 @@ iOS SDK for App Distribution for Firebase.
 
   s.test_spec 'unit' do |unit_tests|
    unit_tests.scheme = { :code_coverage => true }
-   unit_tests.source_files = 'FirebaseAppDistribution/Tests/Unit*/*.[mh]'
+   unit_tests.source_files = [
+     'FirebaseAppDistribution/Tests/Unit*/*.[mh]',
+     'FirebaseAppDistribution/Tests/Unit/Swift*/*.swift',
+   ]
    unit_tests.resources = 'FirebaseAppDistribution/Tests/Unit/Resources/*'
    unit_tests.dependency 'OCMock'
   end

+ 3 - 1
FirebaseAppDistribution/CHANGELOG.md

@@ -1,5 +1,7 @@
 # v9.0.0-beta
-- [fixed] Marked `releaseNotes` as `nullable` as they don't always exist. (#8602)
+- [fixed] Marked `releaseNotes` as `nullable` as they don't always exist (#8602).
+- [fixed] **Breaking change:** Fixed an ObjC-to-Swift API conversion error where`checkForUpdate()`
+  returned a non-optional type. This change is breaking for Swift users only (#9604).
 
 # v8.3.0-beta
 - [changed] Sign out the Tester when the call to fetch releases fails with an unauthorized error (#8270).

+ 2 - 2
FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h

@@ -46,8 +46,8 @@ NS_SWIFT_NAME(AppDistribution)
 /**
  * Check to see whether a new distribution is available
  */
-- (void)checkForUpdateWithCompletion:
-    (void (^)(FIRAppDistributionRelease *_Nullable release, NSError *_Nullable error))completion
+- (void)checkForUpdateWithCompletion:(void (^)(FIRAppDistributionRelease *_Nullable_result release,
+                                               NSError *_Nullable error))completion
     NS_SWIFT_NAME(checkForUpdate(completion:));
 
 /**

+ 27 - 0
FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift

@@ -0,0 +1,27 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import XCTest
+@testable import FirebaseAppDistribution
+
+class AppDistributionAPITests: XCTestCase {
+  @available(iOS 13.0.0, *)
+  func asyncAPIs() async throws {
+    let distro = AppDistribution.appDistribution()
+
+    // Release should be optional if there are no new releases.
+    let _: AppDistributionRelease? = try await distro.checkForUpdate()
+    try await distro.signInTester()
+  }
+}

+ 3 - 0
FirebaseAuth/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v9.0.0
+- [fixed] **Breaking change:** Fixed an ObjC-to-Swift API conversion error where `getStoredUser(forAccessGroup:)` returned a non-optional type. This change is breaking for Swift users only (#8599).
+
 # v8.14.0
 - [added] Started to collect the Firebase user agent for Firebase Auth. (#9066)
 

+ 2 - 2
FirebaseAuth/Sources/Public/FirebaseAuth/FIRAdditionalUserInfo.h

@@ -27,8 +27,8 @@ NS_SWIFT_NAME(AdditionalUserInfo)
 @interface FIRAdditionalUserInfo : NSObject
 
 /** @fn init
-    @brief This class should not be initialized manually. `FIRAdditionalUserInfo` can be retrieved
-        from from an instance of `FIRAuthDataResult`.
+    @brief This class should not be initialized manually. `AdditionalUserInfo` can be retrieved
+        from from an instance of `AuthDataResult`.
  */
 - (instancetype)init NS_UNAVAILABLE;
 

+ 102 - 101
FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h

@@ -39,7 +39,7 @@ typedef void (^FIRUserUpdateCallback)(NSError *_Nullable error)
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 /** @typedef FIRAuthStateDidChangeListenerHandle
-    @brief The type of handle returned by `FIRAuth.addAuthStateDidChangeListener:`.
+    @brief The type of handle returned by `Auth.addAuthStateDidChangeListener(_:)`.
  */
 // clang-format off
 // clang-format12 merges the next two lines.
@@ -50,14 +50,14 @@ typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
 /** @typedef FIRAuthStateDidChangeListenerBlock
     @brief The type of block which can be registered as a listener for auth state did change events.
 
-    @param auth The FIRAuth object on which state changes occurred.
+    @param auth The Auth object on which state changes occurred.
     @param user Optionally; the current signed in user, if any.
  */
 typedef void (^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user)
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 /** @typedef FIRIDTokenDidChangeListenerHandle
-    @brief The type of handle returned by `FIRAuth.addIDTokenDidChangeListener:`.
+    @brief The type of handle returned by `Auth.addIDTokenDidChangeListener(_:)`.
  */
 // clang-format off
 // clang-format12 merges the next two lines.
@@ -68,7 +68,7 @@ typedef id<NSObject> FIRIDTokenDidChangeListenerHandle
 /** @typedef FIRIDTokenDidChangeListenerBlock
     @brief The type of block which can be registered as a listener for ID token did change events.
 
-    @param auth The FIRAuth object on which ID token changes occurred.
+    @param auth The Auth object on which ID token changes occurred.
     @param user Optionally; the current signed in user, if any.
  */
 typedef void (^FIRIDTokenDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user)
@@ -87,7 +87,7 @@ typedef void (^FIRAuthDataResultCallback)(FIRAuthDataResult *_Nullable authResul
 /**
     @brief The name of the `NSNotificationCenter` notification which is posted when the auth state
         changes (for example, a new token has been produced, a user signs in or signs out). The
-        object parameter of the notification is the sender `FIRAuth` instance.
+        object parameter of the notification is the sender `Auth` instance.
  */
 extern const NSNotificationName FIRAuthStateDidChangeNotification NS_SWIFT_NAME(AuthStateDidChange);
 
@@ -106,7 +106,7 @@ typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullabl
         requested.
 
     @param providers Optionally; a list of provider identifiers, if any.
-        @see FIRGoogleAuthProviderID etc.
+        @see GoogleAuthProviderID etc.
     @param error Optionally; if an error occurs, this is the NSError object that describes the
         problem. Set to nil otherwise.
  */
@@ -209,12 +209,12 @@ typedef NS_ENUM(NSInteger, FIRActionCodeOperation) {
 
 /** @property email
     @brief The email address to which the code was sent. The new email address in the case of
-        FIRActionCodeOperationRecoverEmail.
+        `ActionCodeOperationRecoverEmail`.
  */
 @property(nonatomic, nullable, readonly, copy) NSString *email;
 
 /** @property previousEmail
-    @brief The email that is being recovered in the case of FIRActionCodeOperationRecoverEmail.
+    @brief The email that is being recovered in the case of `ActionCodeOperationRecoverEmail`.
  */
 @property(nonatomic, nullable, readonly, copy) NSString *previousEmail;
 
@@ -237,8 +237,8 @@ NS_SWIFT_NAME(ActionCodeURL)
 @property(nonatomic, nullable, copy, readonly) NSString *APIKey;
 
 /** @property operation
-    @brief Returns the mode of oob action. The property will be of FIRActionCodeOperation type.
-        It will return FIRActionCodeOperationUnknown if no oob action is provided.
+    @brief Returns the mode of oob action. The property will be of `FIRActionCodeOperation` type.
+        It will return `FIRActionCodeOperationUnknown` if no oob action is provided.
  */
 @property(nonatomic, readonly) FIRActionCodeOperation operation;
 
@@ -258,15 +258,15 @@ NS_SWIFT_NAME(ActionCodeURL)
 @property(nonatomic, nullable, copy, readonly) NSString *languageCode;
 
 /** @fn actionCodeURLWithLink:
-    @brief Construct an FIRActionCodeURL from an out of band link (e.g. email link).
+    @brief Construct an `ActionCodeURL` from an out of band link (e.g. email link).
     @param link The oob link string used to construct the action code URL.
-    @return The FIRActionCodeURL object constructed based on the oob link provided.
+    @return The `ActionCodeURL` object constructed based on the oob link provided.
  */
 + (nullable instancetype)actionCodeURLWithLink:(NSString *)link;
 
 /** @fn init
-    @brief Please use actionCodeURLWithLink: for Objective-C or actionCodeURLWithLink(link:) for
-   Swift instead.
+    @brief Please use `init(link:)` in Swift or `actionCodeURLWithLink:` in Objective-C
+        instead.
  */
 - (instancetype)init NS_UNAVAILABLE;
 
@@ -298,15 +298,15 @@ NS_SWIFT_NAME(Auth)
 + (FIRAuth *)auth NS_SWIFT_NAME(auth());
 
 /** @fn authWithApp:
-    @brief Gets the auth object for a `FIRApp`.
+    @brief Gets the auth object for a `FirebaseApp`.
 
-    @param app The FIRApp for which to retrieve the associated FIRAuth instance.
-    @return The FIRAuth instance associated with the given FIRApp.
+    @param app The app for which to retrieve the associated `Auth` instance.
+    @return The `Auth` instance associated with the given app.
  */
 + (FIRAuth *)authWithApp:(FIRApp *)app NS_SWIFT_NAME(auth(app:));
 
 /** @property app
-    @brief Gets the `FIRApp` object that this auth object is connected to.
+    @brief Gets the `FirebaseApp` object that this auth object is connected to.
  */
 @property(nonatomic, weak, readonly, nullable) FIRApp *app;
 
@@ -317,7 +317,7 @@ NS_SWIFT_NAME(Auth)
 
 /** @property languageCode
     @brief The current user language code. This property can be set to the app's current language by
-        calling `useAppLanguage`.
+        calling `useAppLanguage()`.
 
     @remarks The string used to set this property must be a language code that follows BCP 47.
  */
@@ -348,20 +348,20 @@ NS_SWIFT_NAME(Auth)
 
 /** @property APNSToken
     @brief The APNs token used for phone number authentication. The type of the token (production
-        or sandbox) will be attempted to be automatcially detected.
+        or sandbox) will be automatically detected based on your provisioning profile.
         This property is available on iOS only.
     @remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work,
-        by either setting this property or by calling `setAPNSToken:type:`.
+        by either setting this property or by calling `setAPNSToken(_:type:)`.
  */
 @property(nonatomic, strong, nullable) NSData *APNSToken API_UNAVAILABLE(macos, tvos, watchos);
 
 /** @fn init
-    @brief Please access auth instances using `FIRAuth.auth` and `FIRAuth.authForApp:`.
+    @brief Please access auth instances using `Auth.auth()` and `Auth.auth(app:)`.
  */
 - (instancetype)init NS_UNAVAILABLE;
 
 /** @fn updateCurrentUser:completion:
-    @brief Sets the currentUser on the calling Auth instance to the provided user object.
+    @brief Sets the `currentUser` on the receiver to the provided user object.
     @param user The user object to be set as the current user of the calling Auth instance.
     @param completion Optionally; a block invoked after the user of the calling Auth instance has
         been updated or an error was encountered.
@@ -379,9 +379,9 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
 
-    @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+    @remarks See @c AuthErrors for a list of error codes that are common to all API methods.
  */
 
 - (void)fetchSignInMethodsForEmail:(NSString *)email
@@ -398,16 +398,16 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that email and password
             accounts are not enabled. Enable them in the Auth section of the
             Firebase console.
-        + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
-        + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted
+        + `AuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+        + `AuthErrorCodeWrongPassword` - Indicates the user attempted
             sign in with an incorrect password.
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
 
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)signInWithEmail:(NSString *)email
                password:(NSString *)password
@@ -424,14 +424,14 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and email sign-in link
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that email and email sign-in link
             accounts are not enabled. Enable them in the Auth section of the
             Firebase console.
-        + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is invalid.
+        + `AuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is invalid.
 
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 
 - (void)signInWithEmail:(NSString *)email
@@ -445,36 +445,36 @@ NS_SWIFT_NAME(Auth)
         This method is available on iOS, macOS Catalyst, and tvOS only.
 
     @param provider An instance of an auth provider used to initiate the sign-in flow.
-    @param UIDelegate Optionally an instance of a class conforming to the FIRAuthUIDelegate
-        protocol, this is used for presenting the web context. If nil, a default FIRAuthUIDelegate
+    @param UIDelegate Optionally an instance of a class conforming to the AuthUIDelegate
+        protocol, this is used for presenting the web context. If nil, a default AuthUIDelegate
         will be used.
     @param completion Optionally; a block which is invoked when the sign in flow finishes, or is
         canceled. Invoked asynchronously on the main thread in the future.
 
     @remarks Possible error codes:
     <ul>
-        <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password
+        <li>@c AuthErrorCodeOperationNotAllowed - Indicates that email and password
             accounts are not enabled. Enable them in the Auth section of the
             Firebase console.
         </li>
-        <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
+        <li>@c AuthErrorCodeUserDisabled - Indicates the user's account is disabled.
         </li>
-        <li>@c FIRAuthErrorCodeWebNetworkRequestFailed - Indicates that a network request within a
+        <li>@c AuthErrorCodeWebNetworkRequestFailed - Indicates that a network request within a
             SFSafariViewController or WKWebView failed.
         </li>
-        <li>@c FIRAuthErrorCodeWebInternalError - Indicates that an internal error occurred within a
+        <li>@c AuthErrorCodeWebInternalError - Indicates that an internal error occurred within a
             SFSafariViewController or WKWebView.
         </li>
-        <li>@c FIRAuthErrorCodeWebSignInUserInteractionFailure - Indicates a general failure during
+        <li>@c AuthErrorCodeWebSignInUserInteractionFailure - Indicates a general failure during
             a web sign-in flow.
         </li>
-        <li>@c FIRAuthErrorCodeWebContextAlreadyPresented - Indicates that an attempt was made to
+        <li>@c AuthErrorCodeWebContextAlreadyPresented - Indicates that an attempt was made to
             present a new web context while one was already being presented.
         </li>
-        <li>@c FIRAuthErrorCodeWebContextCancelled - Indicates that the URL presentation was
+        <li>@c AuthErrorCodeWebContextCancelled - Indicates that the URL presentation was
             cancelled prematurely by the user.
         </li>
-        <li>@c FIRAuthErrorCodeAccountExistsWithDifferentCredential - Indicates the email asserted
+        <li>@c AuthErrorCodeAccountExistsWithDifferentCredential - Indicates the email asserted
             by the credential (e.g. the email in a Facebook access token) is already in use by an
             existing account, that cannot be authenticated with this sign-in method. Call
             fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of
@@ -483,7 +483,7 @@ NS_SWIFT_NAME(Auth)
         </li>
     </ul>
 
-    @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+    @remarks See @c AuthErrors for a list of error codes that are common to all API methods.
  */
 - (void)signInWithProvider:(id<FIRFederatedAuthProvider>)provider
                 UIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
@@ -502,32 +502,32 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-    + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
+    + `AuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
         This could happen if it has expired or it is malformed.
-    + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts
+    + `AuthErrorCodeOperationNotAllowed` - Indicates that accounts
         with the identity provider represented by the credential are not enabled.
         Enable them in the Auth section of the Firebase console.
-    + `FIRAuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted
+    + `AuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted
         by the credential (e.g. the email in a Facebook access token) is already in use by an
         existing account, that cannot be authenticated with this sign-in method. Call
         fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of
         the sign-in providers returned. This error will only be thrown if the "One account per
         email address" setting is enabled in the Firebase console, under Auth settings.
-    + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
-    + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an
+    + `AuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+    + `AuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an
         incorrect password, if credential is of the type EmailPasswordAuthCredential.
-    + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
-    + `FIRAuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was
+    + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+    + `AuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was
         created with an empty verification ID.
-    + `FIRAuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential
+    + `AuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential
         was created with an empty verification code.
-    + `FIRAuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential
+    + `AuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential
         was created with an invalid verification Code.
-    + `FIRAuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was
+    + `AuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was
         created with an invalid verification ID.
-    + `FIRAuthErrorCodeSessionExpired` - Indicates that the SMS code has expired.
+    + `AuthErrorCodeSessionExpired` - Indicates that the SMS code has expired.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods
 */
 - (void)signInWithCredential:(FIRAuthCredential *)credential
                   completion:(nullable void (^)(FIRAuthDataResult *_Nullable authResult,
@@ -543,10 +543,10 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that anonymous accounts are
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that anonymous accounts are
             not enabled. Enable them in the Auth section of the Firebase console.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)signInAnonymouslyWithCompletion:(nullable void (^)(FIRAuthDataResult *_Nullable authResult,
                                                            NSError *_Nullable error))completion;
@@ -560,12 +560,12 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidCustomToken` - Indicates a validation error with
+        + `AuthErrorCodeInvalidCustomToken` - Indicates a validation error with
             the custom token.
-        + `FIRAuthErrorCodeCustomTokenMismatch` - Indicates the service account and the API key
+        + `AuthErrorCodeCustomTokenMismatch` - Indicates the service account and the API key
             belong to different projects.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)signInWithCustomToken:(NSString *)token
                    completion:(nullable void (^)(FIRAuthDataResult *_Nullable authResult,
@@ -581,17 +581,17 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
-        + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email used to attempt sign up
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+        + `AuthErrorCodeEmailAlreadyInUse` - Indicates the email used to attempt sign up
             already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user
             used, and prompt the user to sign in with one of those.
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password accounts
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that email and password accounts
             are not enabled. Enable them in the Auth section of the Firebase console.
-        + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
+        + `AuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
             considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
             dictionary object will contain more detailed explanation that can be shown to the user.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)createUserWithEmail:(NSString *)email
                    password:(NSString *)password
@@ -608,14 +608,14 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
+        + `AuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
             considered too weak.
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled sign
+        + `AuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled sign
             in with the specified identity provider.
-        + `FIRAuthErrorCodeExpiredActionCode` - Indicates the OOB code is expired.
-        + `FIRAuthErrorCodeInvalidActionCode` - Indicates the OOB code is invalid.
+        + `AuthErrorCodeExpiredActionCode` - Indicates the OOB code is expired.
+        + `AuthErrorCodeInvalidActionCode` - Indicates the OOB code is invalid.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)confirmPasswordResetWithCode:(NSString *)code
                          newPassword:(NSString *)newPassword
@@ -664,11 +664,11 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
+        + `AuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
             sent in the request.
-        + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
+        + `AuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
             the console for this action.
-        + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
+        + `AuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
             sending update email.
 
 
@@ -677,30 +677,30 @@ NS_SWIFT_NAME(Auth)
                         completion:(nullable void (^)(NSError *_Nullable error))completion;
 
 /** @fn sendPasswordResetWithEmail:actionCodeSetting:completion:
-    @brief Initiates a password reset for the given email address and @FIRActionCodeSettings object.
+    @brief Initiates a password reset for the given email address and `ActionCodeSettings` object.
 
     @param email The email address of the user.
-    @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
+    @param actionCodeSettings An `ActionCodeSettings` object containing settings related to
         handling action codes.
     @param completion Optionally; a block which is invoked when the request finishes. Invoked
         asynchronously on the main thread in the future.
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
+        + `AuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
             sent in the request.
-        + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
+        + `AuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
             the console for this action.
-        + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
+        + `AuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
             sending update email.
-        + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
-            `handleCodeInApp` is set to YES.
-        + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
+        + `AuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
+            `handleCodeInApp` is set to true.
+        + `AuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
             is missing when the `androidInstallApp` flag is set to true.
-        + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
+        + `AuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
             continue URL is not allowlisted in the Firebase console.
-        + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
-            continue URI is not valid.
+        + `AuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
+            continue URL is not valid.
 
 
  */
@@ -712,7 +712,7 @@ NS_SWIFT_NAME(Auth)
     @brief Sends a sign in with email link to provided email address.
 
     @param email The email address of the user.
-    @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
+    @param actionCodeSettings An `ActionCodeSettings` object containing settings related to
         handling action codes.
     @param completion Optionally; a block which is invoked when the request finishes. Invoked
         asynchronously on the main thread in the future.
@@ -731,8 +731,8 @@ NS_SWIFT_NAME(Auth)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeKeychainError` - Indicates an error occurred when accessing the
-            keychain. The `NSLocalizedFailureReasonErrorKey` field in the `NSError.userInfo`
+        + `AuthErrorCodeKeychainError` - Indicates an error occurred when accessing the
+            keychain. The `NSLocalizedFailureReasonErrorKey` field in the `userInfo`
             dictionary will contain more information about the error encountered.
 
  */
@@ -742,7 +742,7 @@ NS_SWIFT_NAME(Auth)
     @brief Checks if link is an email sign-in link.
 
     @param link The email sign-in link.
-    @return @YES when the link passed matches the expected format of an email sign-in link.
+    @return Returns true when the link passed matches the expected format of an email sign-in link.
  */
 - (BOOL)isSignInWithEmailLink:(NSString *)link API_UNAVAILABLE(watchos);
 
@@ -759,8 +759,8 @@ NS_SWIFT_NAME(Auth)
     @remarks The block is invoked immediately after adding it according to it's standard invocation
         semantics, asynchronously on the main thread. Users should pay special attention to
         making sure the block does not inadvertently retain objects which should not be retained by
-        the long-lived block. The block itself will be retained by `FIRAuth` until it is
-        unregistered or until the `FIRAuth` instance is otherwise deallocated.
+        the long-lived block. The block itself will be retained by `Auth` until it is
+        unregistered or until the `Auth` instance is otherwise deallocated.
 
     @return A handle useful for manually unregistering the block as a listener.
  */
@@ -789,8 +789,8 @@ NS_SWIFT_NAME(Auth)
     @remarks The block is invoked immediately after adding it according to it's standard invocation
         semantics, asynchronously on the main thread. Users should pay special attention to
         making sure the block does not inadvertently retain objects which should not be retained by
-        the long-lived block. The block itself will be retained by `FIRAuth` until it is
-        unregistered or until the `FIRAuth` instance is otherwise deallocated.
+        the long-lived block. The block itself will be retained by `Auth` until it is
+        unregistered or until the `Auth` instance is otherwise deallocated.
 
     @return A handle useful for manually unregistering the block as a listener.
  */
@@ -815,7 +815,7 @@ NS_SWIFT_NAME(Auth)
 - (void)useEmulatorWithHost:(NSString *)host port:(NSInteger)port;
 
 /** @fn canHandleURL:
-    @brief Whether the specific URL is handled by `FIRAuth` .
+    @brief Whether the specific URL is handled by `Auth` .
         This method is available on iOS only.
     @param URL The URL received by the application delegate from any of the openURL method.
     @return Whether or the URL is handled. YES means the URL is for Firebase Auth
@@ -837,14 +837,14 @@ NS_SWIFT_NAME(Auth)
                 type:(FIRAuthAPNSTokenType)type API_UNAVAILABLE(macos, tvos, watchos);
 
 /** @fn canHandleNotification:
-    @brief Whether the specific remote notification is handled by `FIRAuth` .
+    @brief Whether the specific remote notification is handled by `Auth` .
         This method is available on iOS only.
     @param userInfo A dictionary that contains information related to the
         notification in question.
-    @return Whether or the notification is handled. YES means the notification is for Firebase Auth
-        so the caller should ignore the notification from further processing, and NO means the
-        the notification is for the app (or another libaray) so the caller should continue handling
-        this notification as usual.
+    @return Whether or the notification is handled. A return value of true means the notification
+        is for Firebase Auth so the caller should ignore the notification from further processing,
+        and false means the the notification is for the app (or another libaray) so the caller
+   should continue handling this notification as usual.
     @remarks If swizzling is disabled, related remote notifications must be forwarded to this method
         for phone number auth to work.
  */
@@ -866,7 +866,8 @@ NS_SWIFT_NAME(Auth)
         Please refer to https://github.com/firebase/firebase-ios-sdk/issues/8878 for details.
  */
 - (nullable FIRUser *)getStoredUserForAccessGroup:(NSString *_Nullable)accessGroup
-                                            error:(NSError *_Nullable *_Nullable)outError;
+                                            error:(NSError *_Nullable *_Nullable)outError
+    __attribute__((swift_error(nonnull_error)));  // This method can return `nil` on success.
 
 @end
 

+ 4 - 4
FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthDataResult.h

@@ -24,14 +24,14 @@ NS_ASSUME_NONNULL_BEGIN
 
 /** @class FIRAuthDataResult
     @brief Helper object that contains the result of a successful sign-in, link and reauthenticate
-        action. It contains references to a FIRUser instance and a FIRAdditionalUserInfo instance.
+        action. It contains references to a `User` instance and a `AdditionalUserInfo` instance.
  */
 NS_SWIFT_NAME(AuthDataResult)
 @interface FIRAuthDataResult : NSObject
 
 /** @fn init
-    @brief This class should not be initialized manually. `FIRAuthDataResult` instance is
-        returned as part of `FIRAuthDataResultCallback`.
+    @brief This class should not be initialized manually. `AuthDataResult` instance is
+        returned as part of `AuthDataResultCallback`.
  */
 - (instancetype)init NS_UNAVAILABLE;
 
@@ -47,7 +47,7 @@ NS_SWIFT_NAME(AuthDataResult)
 
 /** @property credential
     @brief This property will be non-nil after a successful headful-lite sign-in via
-        signInWithProvider:UIDelegate:. May be used to obtain the accessToken and/or IDToken
+        `signIn(with:uiDelegate:completion:)`. May be used to obtain the accessToken and/or IDToken
         pertaining to a recently signed-in user.
  */
 @property(nonatomic, readonly, nullable) FIRAuthCredential *credential;

+ 6 - 6
FirebaseAuth/Sources/Public/FirebaseAuth/FIREmailAuthProvider.h

@@ -40,31 +40,31 @@ extern NSString *const FIREmailPasswordAuthSignInMethod
 // clang-format on
 
 /** @class FIREmailAuthProvider
-    @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In.
+    @brief A concrete implementation of `AuthProvider` for Email & Password Sign In.
  */
 NS_SWIFT_NAME(EmailAuthProvider)
 @interface FIREmailAuthProvider : NSObject
 
 /** @fn credentialWithEmail:password:
-    @brief Creates an `FIRAuthCredential` for an email & password sign in.
+    @brief Creates an `AuthCredential` for an email & password sign in.
 
     @param email The user's email address.
     @param password The user's password.
-    @return A FIRAuthCredential containing the email & password credential.
+    @return An `AuthCredential` containing the email & password credential.
  */
 + (FIRAuthCredential *)credentialWithEmail:(NSString *)email password:(NSString *)password;
 
 /** @fn credentialWithEmail:Link:
-    @brief Creates an `FIRAuthCredential` for an email & link sign in.
+    @brief Creates an `AuthCredential` for an email & link sign in.
 
     @param email The user's email address.
     @param link The email sign-in link.
-    @return A FIRAuthCredential containing the email & link credential.
+    @return An `AuthCredential` containing the email & link credential.
  */
 + (FIRAuthCredential *)credentialWithEmail:(NSString *)email link:(NSString *)link;
 
 /** @fn init
-    @brief This class is not meant to be initialized.
+    @brief This class is not meant to be initialized directly.
  */
 - (instancetype)init NS_UNAVAILABLE;
 

+ 3 - 3
FirebaseAuth/Sources/Public/FirebaseAuth/FIRFacebookAuthProvider.h

@@ -37,10 +37,10 @@ NS_SWIFT_NAME(FacebookAuthProvider)
 @interface FIRFacebookAuthProvider : NSObject
 
 /** @fn credentialWithAccessToken:
-    @brief Creates an `FIRAuthCredential` for a Facebook sign in.
+    @brief Creates an `AuthCredential` for a Facebook sign in.
 
-    @param accessToken The Access Token from Facebook.
-    @return A FIRAuthCredential containing the Facebook credentials.
+    @param accessToken The access token from Facebook.
+    @return An `AuthCredential` containing the Facebook credentials.
  */
 + (FIRAuthCredential *)credentialWithAccessToken:(NSString *)accessToken;
 

+ 2 - 2
FirebaseAuth/Sources/Public/FirebaseAuth/FIRGameCenterAuthProvider.h

@@ -41,7 +41,7 @@ typedef void (^FIRGameCenterCredentialCallback)(FIRAuthCredential *_Nullable cre
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 /** @class FIRGameCenterAuthProvider
-    @brief A concrete implementation of @c FIRAuthProvider for Game Center Sign In. Not available on
+    @brief A concrete implementation of `AuthProvider` for Game Center Sign In. Not available on
            watchOS.
  */
 API_UNAVAILABLE(watchos)
@@ -49,7 +49,7 @@ NS_SWIFT_NAME(GameCenterAuthProvider)
 @interface FIRGameCenterAuthProvider : NSObject
 
 /** @fn getCredentialWithCompletion:
-    @brief Creates a @c FIRAuthCredential for a Game Center sign in.
+    @brief Creates an `AuthCredential` for a Game Center sign in.
  */
 + (void)getCredentialWithCompletion:
     (void (^)(FIRAuthCredential *_Nullable credential, NSError *_Nullable error))completion

+ 2 - 2
FirebaseAuth/Sources/Public/FirebaseAuth/FIRGitHubAuthProvider.h

@@ -37,10 +37,10 @@ NS_SWIFT_NAME(GitHubAuthProvider)
 @interface FIRGitHubAuthProvider : NSObject
 
 /** @fn credentialWithToken:
-    @brief Creates an `FIRAuthCredential` for a GitHub sign in.
+    @brief Creates an `AuthCredential` for a GitHub sign in.
 
     @param token The GitHub OAuth access token.
-    @return A FIRAuthCredential containing the GitHub credential.
+    @return An AuthCredential containing the GitHub credential.
  */
 + (FIRAuthCredential *)credentialWithToken:(NSString *)token;
 

+ 2 - 2
FirebaseAuth/Sources/Public/FirebaseAuth/FIRGoogleAuthProvider.h

@@ -37,11 +37,11 @@ NS_SWIFT_NAME(GoogleAuthProvider)
 @interface FIRGoogleAuthProvider : NSObject
 
 /** @fn credentialWithIDToken:accessToken:
-    @brief Creates an `FIRAuthCredential` for a Google sign in.
+    @brief Creates an `AuthCredential` for a Google sign in.
 
     @param IDToken The ID Token from Google.
     @param accessToken The Access Token from Google.
-    @return A FIRAuthCredential containing the Google credentials.
+    @return An AuthCredential containing the Google credentials.
  */
 + (FIRAuthCredential *)credentialWithIDToken:(NSString *)IDToken
                                  accessToken:(NSString *)accessToken;

+ 1 - 1
FirebaseAuth/Sources/Public/FirebaseAuth/FIRMultiFactor.h

@@ -60,7 +60,7 @@ NS_SWIFT_NAME(MultiFactor) API_UNAVAILABLE(macos, tvos, watchos) @interface FIRM
                                                     NSError *_Nullable error))completion;
 
 /** @fn enrollWithAssertion:displayName:completion:
-    @brief Enrolls a second factor as identified by the `FIRMultiFactorAssertion` parameter for the
+    @brief Enrolls a second factor as identified by the `MultiFactorAssertion` parameter for the
         current user.
     @param displayName An optional display name associated with the multi factor to enroll.
     @param completion The block invoked when the request is complete, or fails.

+ 14 - 14
FirebaseAuth/Sources/Public/FirebaseAuth/FIROAuthProvider.h

@@ -24,7 +24,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** @class FIROAuthProvider
-    @brief A concrete implementation of `FIRAuthProvider` for generic OAuth Providers.
+    @brief A concrete implementation of `AuthProvider` for generic OAuth Providers.
  */
 NS_SWIFT_NAME(OAuthProvider)
 @interface FIROAuthProvider : NSObject <FIRFederatedAuthProvider>
@@ -48,53 +48,53 @@ NS_SWIFT_NAME(OAuthProvider)
 /** @fn providerWithProviderID:
     @param providerID The provider ID of the IDP for which this auth provider instance will be
         configured.
-    @return An instance of FIROAuthProvider corresponding to the specified provider ID.
+    @return An instance of `OAuthProvider` corresponding to the specified provider ID.
  */
 + (FIROAuthProvider *)providerWithProviderID:(NSString *)providerID;
 
 /** @fn providerWithProviderID:auth:
     @param providerID The provider ID of the IDP for which this auth provider instance will be
         configured.
-    @param auth The auth instance to be associated with the FIROAuthProvider instance.
-    @return An instance of FIROAuthProvider corresponding to the specified provider ID.
+    @param auth The auth instance to be associated with the `OAuthProvider` instance.
+    @return An instance of `OAuthProvider` corresponding to the specified provider ID.
  */
 + (FIROAuthProvider *)providerWithProviderID:(NSString *)providerID auth:(FIRAuth *)auth;
 
 /** @fn credentialWithProviderID:IDToken:accessToken:
-    @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID, ID
-        token and access token.
+    @brief Creates an `AuthCredential` for the OAuth 2 provider identified by provider ID, ID
+        token, and access token.
 
     @param providerID The provider ID associated with the Auth credential being created.
     @param IDToken The IDToken associated with the Auth credential being created.
     @param accessToken The access token associated with the Auth credential be created, if
         available.
-    @return A FIRAuthCredential for the specified provider ID, ID token and access token.
+    @return A `AuthCredential` for the specified provider ID, ID token and access token.
  */
 + (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
                                          IDToken:(NSString *)IDToken
                                      accessToken:(nullable NSString *)accessToken;
 
 /** @fn credentialWithProviderID:accessToken:
-    @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID using
+    @brief Creates an `AuthCredential` for the OAuth 2 provider identified by provider ID using
       an ID token.
 
     @param providerID The provider ID associated with the Auth credential being created.
     @param accessToken The access token associated with the Auth credential be created
-    @return A FIRAuthCredential.
+    @return An `AuthCredential`.
  */
 + (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
                                      accessToken:(NSString *)accessToken;
 
 /** @fn credentialWithProviderID:IDToken:rawNonce:accessToken:
-    @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID, ID
-        token, raw nonce and access token.
+    @brief Creates an `AuthCredential` for that OAuth 2 provider identified by provider ID, ID
+        token, raw nonce, and access token.
 
     @param providerID The provider ID associated with the Auth credential being created.
     @param IDToken The IDToken associated with the Auth credential being created.
     @param rawNonce The raw nonce associated with the Auth credential being created.
     @param accessToken The access token associated with the Auth credential be created, if
         available.
-    @return A FIRAuthCredential for the specified provider ID, ID token and access token.
+    @return A `AuthCredential` for the specified provider ID, ID token and access token.
  */
 + (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
                                          IDToken:(NSString *)IDToken
@@ -102,13 +102,13 @@ NS_SWIFT_NAME(OAuthProvider)
                                      accessToken:(nullable NSString *)accessToken;
 
 /** @fn credentialWithProviderID:IDToken:rawNonce:
-    @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID using
+    @brief Creates an `AuthCredential` for that OAuth 2 provider identified by providerID using
       an ID token and raw nonce.
 
     @param providerID The provider ID associated with the Auth credential being created.
     @param IDToken The IDToken associated with the Auth credential being created.
     @param rawNonce The raw nonce associated with the Auth credential being created.
-    @return A FIRAuthCredential.
+    @return A `AuthCredential`.
  */
 + (FIROAuthCredential *)credentialWithProviderID:(NSString *)providerID
                                          IDToken:(NSString *)IDToken

+ 10 - 10
FirebaseAuth/Sources/Public/FirebaseAuth/FIRPhoneAuthProvider.h

@@ -51,19 +51,19 @@ typedef void (^FIRVerificationResultCallback)(NSString *_Nullable verificationID
         API_UNAVAILABLE(macos, tvos, watchos);
 
 /** @class FIRPhoneAuthProvider
-    @brief A concrete implementation of `FIRAuthProvider` for phone auth providers.
+    @brief A concrete implementation of `AuthProvider` for phone auth providers.
         This class is available on iOS only.
  */
 NS_SWIFT_NAME(PhoneAuthProvider) API_UNAVAILABLE(macos, tvos, watchos)
     @interface FIRPhoneAuthProvider : NSObject
 
 /** @fn provider
-    @brief Returns an instance of `FIRPhoneAuthProvider` for the default `FIRAuth` object.
+    @brief Returns an instance of `PhoneAuthProvider` for the default `Auth` object.
  */
 + (instancetype)provider NS_SWIFT_NAME(provider());
 
 /** @fn providerWithAuth:
-    @brief Returns an instance of `FIRPhoneAuthProvider` for the provided `FIRAuth` object.
+    @brief Returns an instance of `PhoneAuthProvider` for the provided `Auth` object.
     @param auth The auth object to associate with the phone auth provider instance.
  */
 + (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:));
@@ -77,13 +77,13 @@ NS_SWIFT_NAME(PhoneAuthProvider) API_UNAVAILABLE(macos, tvos, watchos)
     @param completion The callback to be invoked when the verification flow is finished.
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeCaptchaCheckFailed` - Indicates that the reCAPTCHA token obtained by
+        + `AuthErrorCodeCaptchaCheckFailed` - Indicates that the reCAPTCHA token obtained by
             the Firebase Auth is invalid or has expired.
-        + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this
+        + `AuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this
             project has been exceeded.
-        + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is
+        + `AuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is
             invalid.
-        + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided.
+        + `AuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided.
  */
 - (void)verifyPhoneNumber:(NSString *)phoneNumber
                UIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
@@ -124,7 +124,7 @@ NS_SWIFT_NAME(PhoneAuthProvider) API_UNAVAILABLE(macos, tvos, watchos)
                                                          NSError *_Nullable error))completion;
 
 /** @fn credentialWithVerificationID:verificationCode:
-    @brief Creates an `FIRAuthCredential` for the phone number provider identified by the
+    @brief Creates an `AuthCredential` for the phone number provider identified by the
         verification ID and verification code.
 
     @param verificationID The verification ID obtained from invoking
@@ -137,8 +137,8 @@ NS_SWIFT_NAME(PhoneAuthProvider) API_UNAVAILABLE(macos, tvos, watchos)
                                         verificationCode:(NSString *)verificationCode;
 
 /** @fn init
-    @brief Please use the `provider` or `providerWithAuth:` methods to obtain an instance of
-        `FIRPhoneAuthProvider`.
+    @brief Please use the `provider()` or `provider(auth:)` methods to obtain an instance of
+        `PhoneAuthProvider`.
  */
 - (instancetype)init NS_UNAVAILABLE;
 

+ 1 - 1
FirebaseAuth/Sources/Public/FirebaseAuth/FIRPhoneMultiFactorInfo.h

@@ -21,7 +21,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** @class FIRPhoneMultiFactorInfo
-    @brief Extends the FIRMultiFactorInfo class for phone number second factors.
+    @brief Extends the MultiFactorInfo class for phone number second factors.
         The identifier of this second factor is "phone".
         This class is available on iOS only.
 */

+ 2 - 2
FirebaseAuth/Sources/Public/FirebaseAuth/FIRTwitterAuthProvider.h

@@ -36,11 +36,11 @@ NS_SWIFT_NAME(TwitterAuthProvider)
 @interface FIRTwitterAuthProvider : NSObject
 
 /** @fn credentialWithToken:secret:
-    @brief Creates an `FIRAuthCredential` for a Twitter sign in.
+    @brief Creates an `AuthCredential` for a Twitter sign in.
 
     @param token The Twitter OAuth token.
     @param secret The Twitter OAuth secret.
-    @return A FIRAuthCredential containing the Twitter credential.
+    @return An AuthCredential containing the Twitter credential.
  */
 + (FIRAuthCredential *)credentialWithToken:(NSString *)token secret:(NSString *)secret;
 

+ 83 - 83
FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h

@@ -31,27 +31,27 @@ NS_ASSUME_NONNULL_BEGIN
 
 /** @typedef FIRAuthTokenCallback
     @brief The type of block called when a token is ready for use.
-    @see FIRUser.getIDTokenWithCompletion:
-    @see FIRUser.getIDTokenForcingRefresh:withCompletion:
+    @see `User.getIDToken()`
+    @see `User.idTokenForcingRefresh(_:)`
 
     @param token Optionally; an access token if the request was successful.
     @param error Optionally; the error which occurred - or nil if the request was successful.
 
-    @remarks One of: `token` or `error` will always be non-nil.
+    @remarks One of `token` or `error` will always be non-nil.
  */
 typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error)
     NS_SWIFT_UNAVAILABLE("Use Swift's closure syntax instead.");
 
 /** @typedef FIRAuthTokenResultCallback
     @brief The type of block called when a token is ready for use.
-    @see FIRUser.getIDTokenResultWithCompletion:
-    @see FIRUser.getIDTokenResultForcingRefresh:withCompletion:
+    @see `User.getIDToken()`
+    @see `User.idTokenForcingRefresh(_:)`
 
     @param tokenResult Optionally; an object containing the raw access token string as well as other
         useful data pertaining to the token.
     @param error Optionally; the error which occurred - or nil if the request was successful.
 
-    @remarks One of: `token` or `error` will always be non-nil.
+    @remarks One of `token` or `error` will always be non-nil.
  */
 typedef void (^FIRAuthTokenResultCallback)(FIRAuthTokenResult *_Nullable tokenResult,
                                            NSError *_Nullable error)
@@ -125,8 +125,8 @@ NS_SWIFT_NAME(User)
 
 /** @fn init
     @brief This class should not be instantiated.
-    @remarks To retrieve the current user, use `FIRAuth.currentUser`. To sign a user
-        in or out, use the methods on `FIRAuth`.
+    @remarks To retrieve the current user, use `Auth.currentUser`. To sign a user
+        in or out, use the methods on `Auth`.
  */
 - (instancetype)init NS_UNAVAILABLE;
 
@@ -142,21 +142,21 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
+        + `AuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
             sent in the request.
-        + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
+        + `AuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
             the console for this action.
-        + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
+        + `AuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
             sending update email.
-        + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email is already in use by another
+        + `AuthErrorCodeEmailAlreadyInUse` - Indicates the email is already in use by another
             account.
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
-        + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s email is a security
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+        + `AuthErrorCodeRequiresRecentLogin` - Updating a user’s email is a security
             sensitive operation that requires a recent login from the user. This error indicates
             the user has not signed in recently enough. To resolve, reauthenticate the user by
-            invoking reauthenticateWithCredential:completion: on FIRUser.
+            calling `reauthenticate(with:)`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)updateEmail:(NSString *)email
          completion:(nullable void (^)(NSError *_Nullable error))completion
@@ -171,17 +171,17 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled
+        + `AuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled
             sign in with the specified identity provider.
-        + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s password is a security
+        + `AuthErrorCodeRequiresRecentLogin` - Updating a user’s password is a security
             sensitive operation that requires a recent login from the user. This error indicates
             the user has not signed in recently enough. To resolve, reauthenticate the user by
-            invoking reauthenticateWithCredential:completion: on FIRUser.
-        + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
-            considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
+            calling `reauthenticate(with:)`.
+        + `AuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
+            considered too weak. The `NSLocalizedFailureReasonErrorKey` field in the `userInfo`
             dictionary object will contain more detailed explanation that can be shown to the user.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)updatePassword:(NSString *)password
             completion:(nullable void (^)(NSError *_Nullable error))completion
@@ -200,12 +200,12 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s phone number is a security
+        + `AuthErrorCodeRequiresRecentLogin` - Updating a user’s phone number is a security
             sensitive operation that requires a recent login from the user. This error indicates
             the user has not signed in recently enough. To resolve, reauthenticate the user by
-            invoking reauthenticateWithCredential:completion: on FIRUser.
+            calling `reauthenticate(with:)`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)updatePhoneNumberCredential:(FIRPhoneAuthCredential *)phoneNumberCredential
                          completion:(nullable void (^)(NSError *_Nullable error))completion
@@ -215,7 +215,7 @@ NS_SWIFT_NAME(User)
     @brief Creates an object which may be used to change the user's profile data.
 
     @remarks Set the properties of the returned object, then call
-        `FIRUserProfileChangeRequest.commitChangesWithCallback:` to perform the updates atomically.
+        `UserProfileChangeRequest.commitChanges()` to perform the updates atomically.
 
     @return An object which may be used to change the user's profile data atomically.
  */
@@ -227,11 +227,11 @@ NS_SWIFT_NAME(User)
     @param completion Optionally; the block invoked when the reload has finished. Invoked
         asynchronously on the main thread in the future.
 
-    @remarks May fail with a `FIRAuthErrorCodeRequiresRecentLogin` error code. In this case
-        you should call `FIRUser.reauthenticateWithCredential:completion:` before re-invoking
-        `FIRUser.updateEmail:completion:`.
+    @remarks May fail with a `AuthErrorCodeRequiresRecentLogin` error code. In this case
+        you should call `reauthenticate(with:)` before re-invoking
+        `updateEmail(to:)`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)reloadWithCompletion:(nullable void (^)(NSError *_Nullable error))completion;
 
@@ -250,24 +250,24 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
+        + `AuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
             This could happen if it has expired or it is malformed.
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that accounts with the
             identity provider represented by the credential are not enabled. Enable them in the
             Auth section of the Firebase console.
-        + `FIRAuthErrorCodeEmailAlreadyInUse` -  Indicates the email asserted by the credential
+        + `AuthErrorCodeEmailAlreadyInUse` -  Indicates the email asserted by the credential
             (e.g. the email in a Facebook access token) is already in use by an existing account,
-            that cannot be authenticated with this method. Call fetchProvidersForEmail for
-            this user’s email and then prompt them to sign in with any of the sign-in providers
+            that cannot be authenticated with this method. Call `Auth.fetchSignInMethods(forEmail:)`
+            for this user’s email and then prompt them to sign in with any of the sign-in providers
             returned. This error will only be thrown if the "One account per email address"
             setting is enabled in the Firebase console, under Auth settings. Please note that the
             error code raised in this specific situation may not be the same on Web and Android.
-        + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
-        + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted reauthentication with
-            an incorrect password, if credential is of the type EmailPasswordAuthCredential.
-        + `FIRAuthErrorCodeUserMismatch` -  Indicates that an attempt was made to
+        + `AuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+        + `AuthErrorCodeWrongPassword` - Indicates the user attempted reauthentication with
+            an incorrect password, if credential is of the type `EmailPasswordAuthCredential`.
+        + `AuthErrorCodeUserMismatch` -  Indicates that an attempt was made to
             reauthenticate with a user which is not the current user.
-        + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+        + `AuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
 
     @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
  */
@@ -280,8 +280,8 @@ NS_SWIFT_NAME(User)
         This method is available on iOS, macOS Catalyst, and tvOS only.
 
     @param provider An instance of an auth provider used to initiate the reauthenticate flow.
-    @param UIDelegate Optionally an instance of a class conforming to the FIRAuthUIDelegate
-        protocol, this is used for presenting the web context. If nil, a default FIRAuthUIDelegate
+    @param UIDelegate Optionally an instance of a class conforming to the `AuthUIDelegate`
+        protocol, used for presenting the web context. If nil, a default `AuthUIDelegate`
         will be used.
     @param completion Optionally; a block which is invoked when the reauthenticate flow finishes, or
         is canceled. Invoked asynchronously on the main thread in the future.
@@ -298,7 +298,7 @@ NS_SWIFT_NAME(User)
     @param completion Optionally; the block invoked when the token is available. Invoked
         asynchronously on the main thread in the future.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)getIDTokenResultWithCompletion:(nullable void (^)(FIRAuthTokenResult *_Nullable tokenResult,
                                                           NSError *_Nullable error))completion
@@ -315,7 +315,7 @@ NS_SWIFT_NAME(User)
     @remarks The authentication token will be refreshed (by making a network request) if it has
         expired, or if `forceRefresh` is YES.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)getIDTokenResultForcingRefresh:(BOOL)forceRefresh
                             completion:(nullable void (^)(FIRAuthTokenResult *_Nullable tokenResult,
@@ -328,7 +328,7 @@ NS_SWIFT_NAME(User)
     @param completion Optionally; the block invoked when the token is available. Invoked
         asynchronously on the main thread in the future.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)getIDTokenWithCompletion:
     (nullable void (^)(NSString *_Nullable token, NSError *_Nullable error))completion
@@ -343,9 +343,9 @@ NS_SWIFT_NAME(User)
         asynchronously on the main thread in the future.
 
     @remarks The authentication token will be refreshed (by making a network request) if it has
-        expired, or if `forceRefresh` is YES.
+        expired, or if `forceRefresh` is true.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all API methods.
  */
 - (void)getIDTokenForcingRefresh:(BOOL)forceRefresh
                       completion:(nullable void (^)(NSString *_Nullable token,
@@ -361,18 +361,18 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeProviderAlreadyLinked` - Indicates an attempt to link a provider of a
+        + `AuthErrorCodeProviderAlreadyLinked` - Indicates an attempt to link a provider of a
             type already linked to this account.
-        + `FIRAuthErrorCodeCredentialAlreadyInUse` - Indicates an attempt to link with a
+        + `AuthErrorCodeCredentialAlreadyInUse` - Indicates an attempt to link with a
             credential that has already been linked with a different Firebase account.
-        + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the identity
+        + `AuthErrorCodeOperationNotAllowed` - Indicates that accounts with the identity
             provider represented by the credential are not enabled. Enable them in the Auth section
             of the Firebase console.
 
-    @remarks This method may also return error codes associated with updateEmail:completion: and
-        updatePassword:completion: on FIRUser.
+    @remarks This method may also return error codes associated with `updateEmail(to:)` and
+        `updatePassword(to:)` on `User`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)linkWithCredential:(FIRAuthCredential *)credential
                 completion:(nullable void (^)(FIRAuthDataResult *_Nullable authResult,
@@ -383,8 +383,8 @@ NS_SWIFT_NAME(User)
         This method is available on iOS, macOS Catalyst, and tvOS only.
 
     @param provider An instance of an auth provider used to initiate the link flow.
-    @param UIDelegate Optionally an instance of a class conforming to the FIRAuthUIDelegate
-        protocol, this is used for presenting the web context. If nil, a default FIRAuthUIDelegate
+    @param UIDelegate Optionally an instance of a class conforming to the `AuthUIDelegate`
+        protocol used for presenting the web context. If nil, a default `AuthUIDelegate`
         will be used.
     @param completion Optionally; a block which is invoked when the link flow finishes, or
         is canceled. Invoked asynchronously on the main thread in the future.
@@ -404,14 +404,14 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeNoSuchProvider` - Indicates an attempt to unlink a provider
+        + `AuthErrorCodeNoSuchProvider` - Indicates an attempt to unlink a provider
             that is not linked to the account.
-        + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
+        + `AuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
             operation that requires a recent login from the user. This error indicates the user
-            has not signed in recently enough. To resolve, reauthenticate the user by invoking
-            reauthenticateWithCredential:completion: on FIRUser.
+            has not signed in recently enough. To resolve, reauthenticate the user by calling
+            `reauthenticate(with:)`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)unlinkFromProvider:(NSString *)provider
                 completion:(nullable void (^)(FIRUser *_Nullable user,
@@ -425,41 +425,41 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
+        + `AuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
             sent in the request.
-        + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
+        + `AuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
             the console for this action.
-        + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
+        + `AuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
             sending update email.
-        + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
+        + `AuthErrorCodeUserNotFound` - Indicates the user account was not found.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
  */
 - (void)sendEmailVerificationWithCompletion:(nullable void (^)(NSError *_Nullable error))completion;
 
 /** @fn sendEmailVerificationWithActionCodeSettings:completion:
     @brief Initiates email verification for the user.
 
-    @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
+    @param actionCodeSettings An `ActionCodeSettings` object containing settings related to
         handling action codes.
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
+        + `AuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
             sent in the request.
-        + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
+        + `AuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
             the console for this action.
-        + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
+        + `AuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
             sending update email.
-        + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
-        + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
+        + `AuthErrorCodeUserNotFound` - Indicates the user account was not found.
+        + `AuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
             a iOS App Store ID is provided.
-        + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
+        + `AuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
             is missing when the `androidInstallApp` flag is set to true.
-        + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
+        + `AuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
             continue URL is not allowlisted in the Firebase console.
-        + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
-            continue URI is not valid.
+        + `AuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
+            continue URL is not valid.
  */
 - (void)sendEmailVerificationWithActionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings
                                          completion:(nullable void (^)(NSError *_Nullable error))
@@ -473,12 +473,12 @@ NS_SWIFT_NAME(User)
 
     @remarks Possible error codes:
 
-        + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
+        + `AuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
             operation that requires a recent login from the user. This error indicates the user
-            has not signed in recently enough. To resolve, reauthenticate the user by invoking
-            reauthenticateWithCredential:completion: on FIRUser.
+            has not signed in recently enough. To resolve, reauthenticate the user by calling
+            `reauthenticate(with:)`.
 
-    @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
+    @remarks See `AuthErrors` for a list of error codes that are common to all `User` methods.
 
  */
 - (void)deleteWithCompletion:(nullable void (^)(NSError *_Nullable error))completion;
@@ -496,7 +496,7 @@ NS_SWIFT_NAME(User)
 /** @fn sendEmailVerificationBeforeUpdatingEmail:completion:
     @brief Send an email to verify the ownership of the account then update to the new email.
     @param email The email to be updated to.
-    @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
+    @param actionCodeSettings An `ActionCodeSettings` object containing settings related to
         handling action codes.
     @param completion Optionally; the block invoked when the request to send the verification
         email is complete, or fails.
@@ -517,21 +517,21 @@ NS_SWIFT_NAME(UserProfileChangeRequest)
 @interface FIRUserProfileChangeRequest : NSObject
 
 /** @fn init
-    @brief Please use `FIRUser.profileChangeRequest`
+    @brief Please use `User.createProfileChangeRequest()` instead.
  */
 - (instancetype)init NS_UNAVAILABLE;
 
 /** @property displayName
     @brief The user's display name.
     @remarks It is an error to set this property after calling
-        `FIRUserProfileChangeRequest.commitChangesWithCallback:`
+        `commitChanges()`.
  */
 @property(nonatomic, copy, nullable) NSString *displayName;
 
 /** @property photoURL
     @brief The user's photo URL.
     @remarks It is an error to set this property after calling
-        `FIRUserProfileChangeRequest.commitChangesWithCallback:`
+        `commitChanges()`.
  */
 @property(nonatomic, copy, nullable) NSURL *photoURL;
 

+ 2 - 2
FirebaseAuth/Tests/Sample/Podfile

@@ -14,8 +14,6 @@ target 'AuthSample' do
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
   pod 'FirebaseAuth', :path => '../../../', :testspecs => ['unit']
-  # `HeartbeatLoggingTestUtils` is unpublished.
-  pod 'HeartbeatLoggingTestUtils', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../..'
   pod 'FBSDKLoginKit'
   pod 'GoogleSignIn', '~> 5'
@@ -23,6 +21,8 @@ target 'AuthSample' do
 
   target 'Auth_ApiTests' do
     inherit! :search_paths
+    # `HeartbeatLoggingTestUtils` is unpublished.
+    pod 'HeartbeatLoggingTestUtils', :path => '../../../'
   end
 
   target 'SwiftApiTests' do

+ 7 - 1
FirebaseAuth/Tests/Sample/SwiftApiTests/SwiftAPI.swift

@@ -87,7 +87,13 @@ class AuthAPI_hOnlyTests: XCTestCase {
     auth.setAPNSToken(Data(), type: AuthAPNSTokenType(rawValue: 2)!)
     auth.canHandleNotification([:])
     try auth.useUserAccessGroup("abc")
-    try auth.getStoredUser(forAccessGroup: "def")
+    let nilUser = try auth.getStoredUser(forAccessGroup: "def")
+    // If nilUser is not optional, this will raise a compiler error.
+    // This condition does not need to execute, and may not if prior
+    // functions throw.
+    if let value = nilUser {
+      XCTAssert(true)
+    }
   }
 
   #if compiler(>=5.5.2) && canImport(_Concurrency)

+ 4 - 4
FirebaseCombineSwift.podspec

@@ -93,13 +93,13 @@ for internal testing only. It should not be published.
     }
     int_tests.source_files = [
       'FirebaseCombineSwift/Tests/Integration/Storage/StorageIntegration.swift',
-      'FirebaseStorageSwift/Tests/Integration/Credentials.swift'
+      'FirebaseStorage/Tests/Integration/Credentials.swift'
     ]
     int_tests.requires_app_host = true
     # Resources are shared with FirebaseStorage's integration tests.
-    int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist',
-                          'FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers'
+    int_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist',
+                          'FirebaseStorageInternal/Tests/Integration/Resources/HomeImprovement.numbers'
     int_tests.dependency 'FirebaseAuth', '~> 9.0'
   end
 end

+ 1 - 1
FirebaseCombineSwift/DECISIONS.md

@@ -5,7 +5,7 @@ This file documents some of the decisions we made when developing Combine suppor
 # Module structure
 
 ## Discussion
-The general idea is to keep all Combine-related code in a separate module (`FirebaseCombineSwift`, to match the naming scheme used for `FirebaseFirestoreSwift` and `FirebaseStorageSwift`).
+The general idea is to keep all Combine-related code in a separate module (`FirebaseCombineSwift`, to match the naming scheme used for `FirebaseFirestoreSwift` and `FirebaseStorage`).
 
 By using the `#if canImport(moduleName)` directive, we can make sure to only enable the publishers for a module that developers have imported into a build target.
 

+ 1 - 1
FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift

@@ -16,7 +16,7 @@
 
   import Combine
   import FirebaseStorage
-  import FirebaseStorageObjC
+  import FirebaseStorageInternal
 
   @available(swift 5.0)
   @available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 6.0, *)

+ 14 - 0
FirebaseCore/CHANGELOG.md

@@ -1,6 +1,20 @@
 # Firebase 9.0.0
 - [changed] Firebase now requires at least Xcode 13.2.1.
 - [added] The zip and Carthage distibutions now include the Swift extension frameworks. (#7819)
+- [changed] **Breaking change**: Update the minimum supported versions for the zip and Carthage
+  distributions to iOS 11.0, tvOS 11.0 and macOS 10.13. (#9633)
+- [changed] **Breaking change**: CocoaPods Podfiles must include `use_frameworks!` or
+  `use_frameworks! :linkage => :static`.
+- [deprecated] Usage of the Firebase pod, the Firebase module (`import Firebase`), and `Firebase.h`
+  is deprecated. Use the specific Firebase product instead like: `pod 'FirebaseMessaging'` and
+  `import FirebaseMessaging`.
+- [changed] For Swift Package Manager installations, `import Firebase` will no longer implicitly
+  import Firebase Storage and Firebase Functions APIs. Use `import FirebaseStorage` and
+  `import FirebaseFunctions`.
+- [changed] C++/Objective C++ clients should use `#import <FirebaseFunctions/FirebaseFunctions-Swift.h>`
+  and `#import <FirebaseStorage/FirebaseStorage-Swift.h>` to access Functions and Storage APIs,
+  respectively. C++/Objective C++ clients using Swift Package Manager should find alternative
+  workarounds at https://forums.swift.org/t/importing-swift-libraries-from-objective-c/56730.
 
 # Firebase 8.10.0
 - [fixed] Fixed platform availability checks in Swift Package Manager that may prevent code

+ 0 - 1
FirebaseCore/Sources/FIRApp.m

@@ -375,7 +375,6 @@ static FIRApp *sDefaultApp;
     }
   }
 
-  [self.heartbeatLogger log];
   [self subscribeForAppDidBecomeActiveNotifications];
 
   return YES;

+ 0 - 15
FirebaseCore/Tests/Unit/FIRAppTest.m

@@ -133,12 +133,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
       [self expectNotificationNamed:kFIRAppReadyToConfigureSDKNotification
                              object:[FIRApp class]
                            userInfo:expectedUserInfo];
-
-  // Expect that calling `+[FIRApp configure]` attempts to log a heartbeat.
-  OCMExpect([self.mockHeartbeatLogger log]).andDo(nil);
   XCTAssertNoThrow([FIRApp configure]);
-  OCMVerifyAll(self.mockHeartbeatLogger);
-
   [self waitForExpectations:@[ notificationExpectation ] timeout:0.1];
 
   FIRApp *app = [FIRApp defaultApp];
@@ -179,12 +174,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID
                                                     GCMSenderID:kGCMSenderID];
   options.clientID = kClientID;
-
-  // Expect that calling `+[FIRApp configure]` attempts to log a heartbeat.
-  OCMExpect([self.mockHeartbeatLogger log]).andDo(nil);
   XCTAssertNoThrow([FIRApp configureWithOptions:options]);
-  OCMVerifyAll(self.mockHeartbeatLogger);
-
   [self waitForExpectations:@[ notificationExpectation ] timeout:0.1];
 
   // Verify the default app instance is created.
@@ -216,12 +206,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
       [self expectNotificationNamed:kFIRAppReadyToConfigureSDKNotification
                              object:[FIRApp class]
                            userInfo:expectedUserInfo];
-
-  // Expect that calling `+[FIRApp configure]` attempts to log a heartbeat.
-  OCMExpect([self.mockHeartbeatLogger log]).andDo(nil);
   XCTAssertNoThrow([FIRApp configureWithName:kFIRTestAppName1 options:options]);
-  OCMVerifyAll(self.mockHeartbeatLogger);
-
   [self waitForExpectations:@[ notificationExpectation ] timeout:0.1];
 
   XCTAssertTrue([FIRApp allApps].count == 1);

+ 30 - 29
FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDataSnapshot.h

@@ -21,14 +21,14 @@ NS_ASSUME_NONNULL_BEGIN
 @class FIRDatabaseReference;
 
 /**
- * A FIRDataSnapshot contains data from a Firebase Database location. Any time
- * you read Firebase data, you receive the data as a FIRDataSnapshot.
+ * A DataSnapshot contains data from a Firebase Database location. Any time
+ * you read Firebase data, you receive the data as a DataSnapshot.
  *
- * FIRDataSnapshots are passed to the blocks you attach with
- * observeEventType:withBlock: or observeSingleEvent:withBlock:. They are
+ * DataSnapshots are passed to the blocks you attach with
+ * `observe(_:with:)` or `observeSingleEvent(of:with:)`. They are
  * efficiently-generated immutable copies of the data at a Firebase Database
  * location. They can't be modified and will never change. To modify data at a
- * location, use a FIRDatabaseReference (e.g. with setValue:).
+ * location, use a DatabaseReference (e.g. with `setValue(_:)`).
  */
 NS_SWIFT_NAME(DataSnapshot)
 @interface FIRDataSnapshot : NSObject
@@ -36,35 +36,35 @@ NS_SWIFT_NAME(DataSnapshot)
 #pragma mark - Navigating and inspecting a snapshot
 
 /**
- * Gets a FIRDataSnapshot for the location at the specified relative path.
+ * Gets a DataSnapshot for the location at the specified relative path.
  * The relative path can either be a simple child key (e.g. 'fred')
  * or a deeper slash-separated path (e.g. 'fred/name/first'). If the child
- * location has no data, an empty FIRDataSnapshot is returned.
+ * location has no data, an empty DataSnapshot is returned.
  *
  * @param childPathString A relative path to the location of child data.
- * @return The FIRDataSnapshot for the child location.
+ * @return The DataSnapshot for the child location.
  */
 - (FIRDataSnapshot *)childSnapshotForPath:(NSString *)childPathString;
 
 /**
- * Return YES if the specified child exists.
+ * Return true if the specified child exists.
  *
  * @param childPathString A relative path to the location of a potential child.
- * @return YES if data exists at the specified childPathString, else NO.
+ * @return true if data exists at the specified childPathString, else false.
  */
 - (BOOL)hasChild:(NSString *)childPathString;
 
 /**
- * Return YES if the DataSnapshot has any children.
+ * Return true if the DataSnapshot has any children.
  *
- * @return YES if this snapshot has any children, else NO.
+ * @return true if this snapshot has any children, else false.
  */
 - (BOOL)hasChildren;
 
 /**
- * Return YES if the DataSnapshot contains a non-null value.
+ * Return true if the DataSnapshot contains a non-null value.
  *
- * @return YES if this snapshot contains a non-null value, else NO.
+ * @return true if this snapshot contains a non-null value, else false.
  */
 - (BOOL)exists;
 
@@ -78,7 +78,7 @@ NS_SWIFT_NAME(DataSnapshot)
  * instances of NSDictionary. For leaf locations with priorities, the value will
  * be under the ".value" key.
  */
-- (id __nullable)valueInExportFormat;
+- (id _Nullable)valueInExportFormat;
 
 #pragma mark - Properties
 
@@ -86,10 +86,10 @@ NS_SWIFT_NAME(DataSnapshot)
  * Returns the contents of this data snapshot as native types.
  *
  * Data types returned:
- * + NSDictionary
- * + NSArray
- * + NSNumber (also includes booleans)
- * + NSString
+ * + `Dictionary`
+ * + `Array`
+ * + `NSNumber`-bridgeable types, including `Bool`
+ * + `String`
  *
  * @return The data as a native object.
  */
@@ -103,27 +103,28 @@ NS_SWIFT_NAME(DataSnapshot)
 @property(readonly, nonatomic) NSUInteger childrenCount;
 
 /**
- * Gets a FIRDatabaseReference for the location that this data came from.
+ * Gets a DatabaseReference for the location that this data came from.
  *
- * @return A FIRDatabaseReference instance for the location of this data.
+ * @return A DatabaseReference instance for the location of this data.
  */
 @property(nonatomic, readonly, strong) FIRDatabaseReference *ref;
 
 /**
- * The key of the location that generated this FIRDataSnapshot.
+ * The key of the location that generated this DataSnapshot.
  *
- * @return An NSString containing the key for the location of this
- * FIRDataSnapshot.
+ * @return A `String` containing the key for the location of this
+ * DataSnapshot.
  */
 @property(strong, readonly, nonatomic) NSString *key;
 
 /**
  * An iterator for snapshots of the child nodes in this snapshot.
- * You can use the native for..in syntax:
  *
- * for (FIRDataSnapshot* child in snapshot.children) {
- *     ...
+ * ```
+ * for var child in snapshot.children {
+ *   // ...
  * }
+ * ```
  *
  * @return An NSEnumerator of the children.
  */
@@ -131,9 +132,9 @@ NS_SWIFT_NAME(DataSnapshot)
     NSEnumerator<FIRDataSnapshot *> *children;
 
 /**
- * The priority of the data in this FIRDataSnapshot.
+ * The priority of the data in this DataSnapshot.
  *
- * @return The priority as a string, or nil if no priority was set.
+ * @return The priority as a `String`, or `nil` if no priority was set.
  */
 @property(strong, readonly, nonatomic, nullable) id priority;
 

+ 30 - 30
FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDatabase.h

@@ -23,8 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**
  * The entry point for accessing a Firebase Database.  You can get an instance
- * by calling [FIRDatabase database]. To access a location in the database and
- * read or write data, use [FIRDatabase reference].
+ * by calling `Database.database()`. To access a location in the database and
+ * read or write data, use `FIRDatabase.reference()`.
  */
 NS_SWIFT_NAME(Database)
 @interface FIRDatabase : NSObject
@@ -37,27 +37,27 @@ NS_SWIFT_NAME(Database)
     __attribute__((unavailable("use the database method instead")));
 
 /**
- * Gets the instance of FIRDatabase for the default FIRApp.
+ * Gets the instance of `Database` for the default `FirebaseApp`.
  *
- * @return A FIRDatabase instance.
+ * @return A `Database` instance.
  */
 + (FIRDatabase *)database NS_SWIFT_NAME(database());
 
 /**
- * Gets a FirebaseDatabase instance for the specified URL.
+ * Gets a `Database` instance for the specified URL.
  *
  * @param url The URL to the Firebase Database instance you want to access.
- * @return A FIRDatabase instance.
+ * @return A `Database` instance.
  */
 + (FIRDatabase *)databaseWithURL:(NSString *)url NS_SWIFT_NAME(database(url:));
 
 /**
- * Gets a FirebaseDatabase instance for the specified URL, using the specified
- * FirebaseApp.
+ * Gets a `Database` instance for the specified URL, using the specified
+ * `FirebaseApp`.
  *
- * @param app The FIRApp to get a FIRDatabase for.
+ * @param app The app to get a `Database` for.
  * @param url The URL to the Firebase Database instance you want to access.
- * @return A FIRDatabase instance.
+ * @return A `Database` instance.
  */
 // clang-format off
 + (FIRDatabase *)databaseForApp:(FIRApp *)app
@@ -65,37 +65,37 @@ NS_SWIFT_NAME(Database)
 // clang-format on
 
 /**
- * Gets an instance of FIRDatabase for a specific FIRApp.
+ * Gets an instance of `Database` for a specific `FirebaseApp`.
  *
- * @param app The FIRApp to get a FIRDatabase for.
- * @return A FIRDatabase instance.
+ * @param app The app to get a `Database` for.
+ * @return A `Database` instance.
  */
 + (FIRDatabase *)databaseForApp:(FIRApp *)app NS_SWIFT_NAME(database(app:));
 
-/** The FIRApp instance to which this FIRDatabase belongs. */
+/** The app instance to which this `Database` belongs. */
 @property(weak, readonly, nonatomic) FIRApp *app;
 
 /**
- * Gets a FIRDatabaseReference for the root of your Firebase Database.
+ * Gets a `DatabaseReference` for the root of your Firebase Database.
  */
 - (FIRDatabaseReference *)reference;
 
 /**
- * Gets a FIRDatabaseReference for the provided path.
+ * Gets a `DatabaseReference` for the provided path.
  *
  * @param path Path to a location in your Firebase Database.
- * @return A FIRDatabaseReference pointing to the specified path.
+ * @return A `DatabaseReference` pointing to the specified path.
  */
 - (FIRDatabaseReference *)referenceWithPath:(NSString *)path;
 
 /**
- * Gets a FIRDatabaseReference for the provided URL.  The URL must be a URL to a
- * path within this Firebase Database.  To create a FIRDatabaseReference to a
- * different database, create a FIRApp with a FIROptions object configured with
- * the appropriate database URL.
+ * Gets a `DatabaseReference` for the provided URL.  The URL must be a URL to a
+ * path within this Firebase Database.  To create a `DatabaseReference` to a
+ * different database, create a `FirebaseApp` with an `Options` object
+ * configured with the appropriate database URL.
  *
  * @param databaseUrl A URL to a path within your database.
- * @return A FIRDatabaseReference for the provided URL.
+ * @return A `DatabaseReference` for the provided URL.
  */
 - (FIRDatabaseReference *)referenceFromURL:(NSString *)databaseUrl;
 
@@ -114,14 +114,14 @@ NS_SWIFT_NAME(Database)
 - (void)purgeOutstandingWrites;
 
 /**
- * Shuts down our connection to the Firebase Database backend until goOnline is
- * called.
+ * Shuts down the connection to the Firebase Database backend until `goOnline()`
+ * is called.
  */
 - (void)goOffline;
 
 /**
- * Resumes our connection to the Firebase Database backend after a previous
- * goOffline call.
+ * Resumes the connection to the Firebase Database backend after a previous
+ * goOffline() call.
  */
 - (void)goOnline;
 
@@ -133,10 +133,10 @@ NS_SWIFT_NAME(Database)
  *
  * However by default your write operations and cached data are only stored
  * in-memory and will be lost when your app restarts.  By setting this value to
- * `YES`, the data will be persisted to on-device (disk) storage and will thus
+ * `true`, the data will be persisted to on-device (disk) storage and will thus
  * be available again when the app is restarted (even when there is no network
  * connectivity at that time). Note that this property must be set before
- * creating your first Database reference and only needs to be called once per
+ * creating your first `DatabaseReference` and only needs to be called once per
  * application.
  *
  */
@@ -149,7 +149,7 @@ NS_SWIFT_NAME(Database)
  * removing data that hasn't been recently used. If you find that your
  * application caches too little or too much data, call this method to change
  * the cache size. This property must be set before creating your first
- * FIRDatabaseReference and only needs to be called once per application.
+ * `DatabaseReference` and only needs to be called once per application.
  *
  * Note that the specified cache size is only an approximation and the size on
  * disk may temporarily exceed it at times. Cache sizes smaller than 1 MB or
@@ -168,7 +168,7 @@ NS_SWIFT_NAME(Database)
 /**
  * Enables verbose diagnostic logging.
  *
- * @param enabled YES to enable logging, NO to disable.
+ * @param enabled true to enable logging, false to disable.
  */
 + (void)setLoggingEnabled:(BOOL)enabled;
 

+ 191 - 185
FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRDatabaseQuery.h

@@ -21,19 +21,19 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /**
- * A FIRDatabaseHandle is used to identify listeners of Firebase Database
- * events. These handles are returned by observeEventType: and can later be
- * passed to removeObserverWithHandle: to stop receiving updates.
+ * A `DatabaseHandle` is used to identify listeners of Firebase Database
+ * events. These handles are returned by `observe(_:with:)` and can later be
+ * passed to `removeObserver(withHandle:)` to stop receiving updates.
  */
 typedef NSUInteger FIRDatabaseHandle NS_SWIFT_NAME(DatabaseHandle);
 
 /**
- * A FIRDatabaseQuery instance represents a query over the data at a particular
+ * A `DatabaseQuery` instance represents a query over the data at a particular
  * location.
  *
- * You create one by calling one of the query methods (queryOrderedByChild:,
- * queryStartingAtValue:, etc.) on a FIRDatabaseReference. The query methods can
- * be chained to further specify the data you are interested in observing
+ * You create one by calling one of the query methods (`queryOrdered(byChild:)`,
+ * `queryStarting(atValue:)`, etc.) on a `DatabaseReference`. The query methods
+ * can be chained to further specify the data you are interested in observing.
  */
 NS_SWIFT_NAME(DatabaseQuery)
 @interface FIRDatabaseQuery : NSObject
@@ -41,38 +41,38 @@ NS_SWIFT_NAME(DatabaseQuery)
 #pragma mark - Attach observers to read data
 
 /**
- * observeEventType:withBlock: is used to listen for data changes at a
- * particular location. This is the primary way to read data from the Firebase
- * Database. Your block will be triggered for the initial data and again
- * whenever the data changes.
+ * This method is used to listen for data changes at a particular location.
+ * This is the primary way to read data from the Firebase Database. Your
+ * block will be triggered for the initial data and again whenever the
+ * data changes.
  *
  * Use removeObserverWithHandle: to stop receiving updates.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called with initial data and updates.
- * It is passed the data as a FIRDataSnapshot.
+ *     It is passed the data as a `DataSnapshot`.
  * @return A handle used to unregister this block later using
- * removeObserverWithHandle:
+ *     `removeObserver(withHandle:)`
  */
 - (FIRDatabaseHandle)observeEventType:(FIRDataEventType)eventType
                             withBlock:
                                 (void (^)(FIRDataSnapshot *snapshot))block;
 
 /**
- * observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data
- * changes at a particular location. This is the primary way to read data from
- * the Firebase Database. Your block will be triggered for the initial data and
- * again whenever the data changes. In addition, for FIRDataEventTypeChildAdded,
- * FIRDataEventTypeChildMoved, and FIRDataEventTypeChildChanged events, your
+ * This method is used to listen for data changes at a particular location.
+ * This is the primary way to read data from the Firebase Database. Your
+ * block will be triggered for the initial data and again whenever the data
+ * changes. In addition, for `DataEventTypeChildAdded`,
+ * `DataEventTypeChildMoved`, and `DataEventTypeChildChanged` events, your
  * block will be passed the key of the previous node by priority order.
  *
- * Use removeObserverWithHandle: to stop receiving updates.
+ * Use `removeObserver(withHandle:)` to stop receiving updates.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called with initial data and updates.
- * It is passed the data as a FIRDataSnapshot and the previous child's key.
+ * It is passed the data as a `DataSnapshot` and the previous child's key.
  * @return A handle used to unregister this block later using
- * removeObserverWithHandle:
+ * `removeObserver(withHandle:)`
  */
 - (FIRDatabaseHandle)observeEventType:(FIRDataEventType)eventType
        andPreviousSiblingKeyWithBlock:
@@ -80,23 +80,23 @@ NS_SWIFT_NAME(DatabaseQuery)
                      NSString *__nullable prevKey))block;
 
 /**
- * observeEventType:withBlock: is used to listen for data changes at a
- * particular location. This is the primary way to read data from the Firebase
- * Database. Your block will be triggered for the initial data and again
- * whenever the data changes.
+ * This method is used to listen for data changes at a particular location.
+ * This is the primary way to read data from the Firebase Database. Your
+ * block will be triggered for the initial data and again whenever the data
+ * changes.
  *
- * The cancelBlock will be called if you will no longer receive new events due
- * to no longer having permission.
+ * The `cancelBlock` will be called if you will no longer receive new events
+ * due to no longer having permission.
  *
- * Use removeObserverWithHandle: to stop receiving updates.
+ * Use `removeObserver(withHandle:)` to stop receiving updates.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called with initial data and updates.
- * It is passed the data as a FIRDataSnapshot.
+ *     It is passed the data as a `DataSnapshot`.
  * @param cancelBlock The block that should be called if this client no longer
- * has permission to receive these events
+ *     has permission to receive these events
  * @return A handle used to unregister this block later using
- * removeObserverWithHandle:
+ *     `removeObserver(withHandle:)`
  */
 - (FIRDatabaseHandle)observeEventType:(FIRDataEventType)eventType
                             withBlock:(void (^)(FIRDataSnapshot *snapshot))block
@@ -104,25 +104,25 @@ NS_SWIFT_NAME(DatabaseQuery)
                           (nullable void (^)(NSError *error))cancelBlock;
 
 /**
- * observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data
- * changes at a particular location. This is the primary way to read data from
- * the Firebase Database. Your block will be triggered for the initial data and
- * again whenever the data changes. In addition, for FIRDataEventTypeChildAdded,
- * FIRDataEventTypeChildMoved, and FIRDataEventTypeChildChanged events, your
- * block will be passed the key of the previous node by priority order.
- *
- * The cancelBlock will be called if you will no longer receive new events due
+ * This method is used to listen for data changes at a particular location.
+ * This is the primary way to read data from the Firebase Database. Your block
+ * will be triggered for the initial data and again whenever the data changes.
+ * In addition, for `FIRDataEventTypeChildAdded`, `FIRDataEventTypeChildMoved`,
+ * and FIRDataEventTypeChildChanged events, your block will be passed the key
+ * of the previous node by priority order.
+ *
+ * The `cancelBlock` will be called if you will no longer receive new events due
  * to no longer having permission.
  *
- * Use removeObserverWithHandle: to stop receiving updates.
+ * Use `removeObserver(withHandle:)` to stop receiving updates.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called with initial data and updates.
- * It is passed the data as a FIRDataSnapshot and the previous child's key.
+ *     It is passed the data as a `DataSnapshot` and the previous child's key.
  * @param cancelBlock The block that should be called if this client no longer
- * has permission to receive these events
+ *     has permission to receive these events
  * @return A handle used to unregister this block later using
- * removeObserverWithHandle:
+ *     `removeObserver(withHandle:)`
  */
 - (FIRDatabaseHandle)observeEventType:(FIRDataEventType)eventType
        andPreviousSiblingKeyWithBlock:
@@ -132,12 +132,12 @@ NS_SWIFT_NAME(DatabaseQuery)
                           (nullable void (^)(NSError *error))cancelBlock;
 
 /**
- * getDataWithCompletionBlock: is used to get the most up-to-date value for
- * this query. This method updates the cache and raises events if successful. If
- * not connected, falls back to a locally-cached value.
+ * This method is used to get the most up-to-date value for this query. This
+ * method updates the cache and raises events if successful. If
+ * not connected, it returns a locally-cached value.
  *
  * @param block The block that should be called with the most up-to-date value
- * of this query, or an error if no such value could be retrieved.
+ *     of this query, or an error if no such value could be retrieved.
  */
 - (void)getDataWithCompletionBlock:
     (void (^_Nonnull)(NSError *__nullable error,
@@ -145,26 +145,26 @@ NS_SWIFT_NAME(DatabaseQuery)
     NS_SWIFT_NAME(getData(completion:));
 
 /**
- * This is equivalent to observeEventType:withBlock:, except the block is
+ * This is equivalent to `observe(_:with:)`, except the block is
  * immediately canceled after the initial data is returned.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called.  It is passed the data as a
- * FIRDataSnapshot.
+ *     `DataSnapshot`.
  */
 - (void)observeSingleEventOfType:(FIRDataEventType)eventType
                        withBlock:(void (^)(FIRDataSnapshot *snapshot))block;
 
 /**
- * This is equivalent to observeEventType:withBlock:, except the block is
+ * This is equivalent to `observe(_:with:)`, except the block is
  * immediately canceled after the initial data is returned. In addition, for
- * FIRDataEventTypeChildAdded, FIRDataEventTypeChildMoved, and
- * FIRDataEventTypeChildChanged events, your block will be passed the key of the
+ * `DataEventTypeChildAdded`, `DataEventTypeChildMoved`, and
+ * `DataEventTypeChildChanged` events, your block will be passed the key of the
  * previous node by priority order.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called.  It is passed the data as a
- * FIRDataSnapshot and the previous child's key.
+ *     `DataSnapshot` and the previous child's key.
  */
 - (void)observeSingleEventOfType:(FIRDataEventType)eventType
     andPreviousSiblingKeyWithBlock:
@@ -172,37 +172,37 @@ NS_SWIFT_NAME(DatabaseQuery)
                   NSString *__nullable prevKey))block;
 
 /**
- * This is equivalent to observeEventType:withBlock:, except the block is
+ * This is equivalent to `observe(_:with:)`, except the block is
  * immediately canceled after the initial data is returned.
  *
- * The cancelBlock will be called if you do not have permission to read data at
- * this location.
+ * The `cancelBlock` will be called if you do not have permission to read data
+ * at this location.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called.  It is passed the data as a
- * FIRDataSnapshot.
+ *     `DataSnapshot`.
  * @param cancelBlock The block that will be called if you don't have permission
- * to access this data
+ *     to access this data
  */
 - (void)observeSingleEventOfType:(FIRDataEventType)eventType
                        withBlock:(void (^)(FIRDataSnapshot *snapshot))block
                  withCancelBlock:(nullable void (^)(NSError *error))cancelBlock;
 
 /**
- * This is equivalent to observeEventType:withBlock:, except the block is
+ * This is equivalent to `observe(_:with:)`, except the block is
  * immediately canceled after the initial data is returned. In addition, for
- * FIRDataEventTypeChildAdded, FIRDataEventTypeChildMoved, and
- * FIRDataEventTypeChildChanged events, your block will be passed the key of the
+ * `DataEventTypeChildAdded`, `DataEventTypeChildMoved`, and
+ * `DataEventTypeChildChanged` events, your block will be passed the key of the
  * previous node by priority order.
  *
- * The cancelBlock will be called if you do not have permission to read data at
- * this location.
+ * The `cancelBlock` will be called if you do not have permission to read data
+ * at this location.
  *
  * @param eventType The type of event to listen for.
  * @param block The block that should be called.  It is passed the data as a
- * FIRDataSnapshot and the previous child's key.
+ *     `DataSnapshot` and the previous child's key.
  * @param cancelBlock The block that will be called if you don't have permission
- * to access this data
+ *     to access this data
  */
 - (void)observeSingleEventOfType:(FIRDataEventType)eventType
     andPreviousSiblingKeyWithBlock:(void (^)(FIRDataSnapshot *snapshot,
@@ -213,242 +213,248 @@ NS_SWIFT_NAME(DatabaseQuery)
 #pragma mark - Detaching observers
 
 /**
- * Detach a block previously attached with observeEventType:withBlock:.
+ * Detach a block previously attached with `observe(_:with:)`, or another query
+ * observation method. After this method is called, the associated block
+ * registered to receive snapshot updates will no longer be invoked.
  *
- * @param handle The handle returned by the call to observeEventType:withBlock:
- * which we are trying to remove.
+ * @param handle The handle returned by the call to `observe(_:with:)`
+ *     which we are trying to remove.
  */
 - (void)removeObserverWithHandle:(FIRDatabaseHandle)handle;
 
 /**
  * Detach all blocks previously attached to this Firebase Database location with
- * observeEventType:withBlock:
+ * `observe(_:with:)` and other query observation methods.
  */
 - (void)removeAllObservers;
 
 /**
- * By calling `keepSynced:YES` on a location, the data for that location will
+ * By calling `keepSynced(true)` on a location, the data for that location will
  * automatically be downloaded and kept in sync, even when no listeners are
  * attached for that location. Additionally, while a location is kept synced, it
  * will not be evicted from the persistent disk cache.
  *
- * @param keepSynced Pass YES to keep this location synchronized, pass NO to
- * stop synchronization.
+ * @param keepSynced Pass true to keep this location synchronized, or false to
+ *     stop synchronization.
  */
 - (void)keepSynced:(BOOL)keepSynced;
 
 #pragma mark - Querying and limiting
 
 /**
- * queryLimitedToFirst: is used to generate a reference to a limited view of the
- * data at this location. The FIRDatabaseQuery instance returned by
- * queryLimitedToFirst: will respond to at most the first limit child nodes.
+ * This method is used to generate a reference to a limited view of the
+ * data at this location. The `DatabaseQuery` instance returned by
+ * `queryLimited(toFirst:)` will respond to at most the first limit child nodes.
  *
  * @param limit The upper bound, inclusive, for the number of child nodes to
- * receive events for
- * @return A FIRDatabaseQuery instance, limited to at most limit child nodes.
+ *     receive events for
+ * @return A `DatabaseQuery` instance, limited to at most limit child nodes.
  */
 - (FIRDatabaseQuery *)queryLimitedToFirst:(NSUInteger)limit;
 
 /**
- * queryLimitedToLast: is used to generate a reference to a limited view of the
- * data at this location. The FIRDatabaseQuery instance returned by
- * queryLimitedToLast: will respond to at most the last limit child nodes.
+ * `queryLimited(toLast:)` is used to generate a reference to a limited view of
+ * the data at this location. The `DatabaseQuery` instance returned by
+ * this method will respond to at most the last limit child nodes.
  *
  * @param limit The upper bound, inclusive, for the number of child nodes to
- * receive events for
- * @return A FIRDatabaseQuery instance, limited to at most limit child nodes.
+ *     receive events for
+ * @return A `DatabaseQuery` instance, limited to at most limit child nodes.
  */
 - (FIRDatabaseQuery *)queryLimitedToLast:(NSUInteger)limit;
 
 /**
- * queryOrderBy: is used to generate a reference to a view of the data that's
+ * This method is used to generate a reference to a view of the data that's
  * been sorted by the values of a particular child key. This method is intended
- * to be used in combination with queryStartingAtValue:, queryEndingAtValue:, or
- * queryEqualToValue:.
+ * to be used in combination with `queryStarting(atValue:)`,
+ * `queryEnding(atValue:)`, or `queryEqual(toValue:)`.
  *
  * @param key The child key to use in ordering data visible to the returned
- * FIRDatabaseQuery
- * @return A FIRDatabaseQuery instance, ordered by the values of the specified
+ *     `DatabaseQuery`
+ * @return A `DatabaseQuery` instance, ordered by the values of the specified
  * child key.
  */
 - (FIRDatabaseQuery *)queryOrderedByChild:(NSString *)key;
 
 /**
- * queryOrderedByKey: is used to generate a reference to a view of the data
+ * `queryOrdered(byKey:) is used to generate a reference to a view of the data
  * that's been sorted by child key. This method is intended to be used in
- * combination with queryStartingAtValue:, queryEndingAtValue:, or
- * queryEqualToValue:.
+ * combination with `queryStarting(atValue:)`, `queryEnding(atValue:)`, or
+ * `queryEqual(toValue:)`.
  *
- * @return A FIRDatabaseQuery instance, ordered by child keys.
+ * @return A `DatabaseQuery` instance, ordered by child keys.
  */
 - (FIRDatabaseQuery *)queryOrderedByKey;
 
 /**
- * queryOrderedByValue: is used to generate a reference to a view of the data
- * that's been sorted by child value. This method is intended to be used in
- * combination with queryStartingAtValue:, queryEndingAtValue:, or
- * queryEqualToValue:.
+ * `queryOrdered(byValue:)` is used to generate a reference to a view of the
+ * data that's been sorted by child value. This method is intended to be used in
+ * combination with `queryStarting(atValue:)`, `queryEnding(atValue:)`, or
+ * `queryEqual(toValue:)`.
  *
- * @return A FIRDatabaseQuery instance, ordered by child value.
+ * @return A `DatabaseQuery` instance, ordered by child value.
  */
 - (FIRDatabaseQuery *)queryOrderedByValue;
 
 /**
- * queryOrderedByPriority: is used to generate a reference to a view of the data
- * that's been sorted by child priority. This method is intended to be used in
- * combination with queryStartingAtValue:, queryEndingAtValue:, or
- * queryEqualToValue:.
+ * `queryOrdered(byPriority:) is used to generate a reference to a view of the
+ * data that's been sorted by child priority. This method is intended to be used
+ * in combination with `queryStarting(atValue:)`, `queryEnding(atValue:)`, or
+ * `queryEqual(toValue:)`.
  *
- * @return A FIRDatabaseQuery instance, ordered by child priorities.
+ * @return A `DatabaseQuery` instance, ordered by child priorities.
  */
 - (FIRDatabaseQuery *)queryOrderedByPriority;
 
 /**
- * queryStartingAtValue: is used to generate a reference to a limited view of
- * the data at this location. The FIRDatabaseQuery instance returned by
- * queryStartingAtValue: will respond to events at nodes with a value greater
- * than or equal to startValue.
+ * `queryStarting(atValue:)` is used to generate a reference to a limited view
+ * of the data at this location. The `DatabaseQuery` instance returned by
+ * `queryStarting(atValue:)` will respond to events at nodes with a value
+ * greater than or equal to `startValue`.
  *
  * @param startValue The lower bound, inclusive, for the value of data visible
- * to the returned FIRDatabaseQuery
- * @return A FIRDatabaseQuery instance, limited to data with value greater than
- * or equal to startValue
+ *     to the returned `DatabaseQuery`
+ * @return A `DatabaseQuery` instance, limited to data with value greater than
+ *     or equal to `startValue`
  */
 - (FIRDatabaseQuery *)queryStartingAtValue:(nullable id)startValue;
 
 /**
- * queryStartingAtValue:childKey: is used to generate a reference to a limited
- * view of the data at this location. The FIRDatabaseQuery instance returned by
- * queryStartingAtValue:childKey will respond to events at nodes with a value
- * greater than startValue, or equal to startValue and with a key greater than
- * or equal to childKey. This is most useful when implementing pagination in a
- * case where multiple nodes can match the startValue.
+ * `queryStarting(atValue:childKey:)` is used to generate a reference to a
+ * limited view of the data at this location. The `DatabaseQuery` instance
+ * returned by `queryStarting(atValue:childKey:)` will respond to events at
+ * nodes with a value greater than `startValue`, or equal to `startValue` and
+ * with a key greater than or equal to `childKey`. This is most useful when
+ * implementing pagination in a case where multiple nodes can match the
+ * `startValue`.
  *
  * @param startValue The lower bound, inclusive, for the value of data visible
- * to the returned FIRDatabaseQuery
+ *     to the returned `DatabaseQuery`
  * @param childKey The lower bound, inclusive, for the key of nodes with value
- * equal to startValue
- * @return A FIRDatabaseQuery instance, limited to data with value greater than
- * or equal to startValue
+ *     equal to `startValue`
+ * @return A `DatabaseQuery` instance, limited to data with value greater than
+ *     or equal to `startValue`
  */
 - (FIRDatabaseQuery *)queryStartingAtValue:(nullable id)startValue
                                   childKey:(nullable NSString *)childKey;
 
 /**
- * queryStartingAfterValue: is used to generate a reference to a
- * limited view of the data at this location. The FIRDatabaseQuery instance
- * returned by queryStartingAfterValue: will respond to events at nodes
+ * `queryStarting(afterValue:)` is used to generate a reference to a
+ * limited view of the data at this location. The `DatabaseQuery` instance
+ * returned by `queryStarting(afterValue:)` will respond to events at nodes
  * with a value greater than startAfterValue.
  *
  * @param startAfterValue The lower bound, exclusive, for the value of data
- * visible to the returned FIRDatabaseQuery
- * @return A FIRDatabaseQuery instance, limited to data with value greater
- * startAfterValue
+ *     visible to the returned `DatabaseQuery`
+ * @return A `DatabaseQuery` instance, limited to data with value greater
+ *     `startAfterValue`
  */
 - (FIRDatabaseQuery *)queryStartingAfterValue:(nullable id)startAfterValue;
 
 /**
- * queryStartingAfterValue:childKey: is used to generate a reference to a
- * limited view of the data at this location. The FIRDatabaseQuery instance
- * returned by queryStartingAfterValue:childKey will respond to events at nodes
- * with a value greater than startAfterValue, or equal to startAfterValue and
- * with a key greater than childKey. This is most useful when implementing
- * pagination in a case where multiple nodes can match the startAfterValue.
+ * `queryStarting(afterValue:childKey:)` is used to generate a reference to a
+ * limited view of the data at this location. The `DatabaseQuery` instance
+ * returned by `queryStarting(afterValue:childKey:)` will respond to events at
+ * nodes with a value greater than `startAfterValue`, or equal to
+ * `startAfterValue` and with a key greater than `childKey`. This is most useful
+ * when implementing pagination in a case where multiple nodes can match the
+ * `startAfterValue`.
  *
  * @param startAfterValue The lower bound, inclusive, for the value of data
- * visible to the returned FIRDatabaseQuery
+ *     visible to the returned `DatabaseQuery`
  * @param childKey The lower bound, exclusive, for the key of nodes with value
- * equal to startAfterValue
- * @return A FIRDatabaseQuery instance, limited to data with value greater than
- * startAfterValue, or equal to startAfterValue with a key greater than childKey
+ *     equal to `startAfterValue`
+ * @return A `DatabaseQuery` instance, limited to data with value greater than
+ *     `startAfterValue`, or equal to `startAfterValue` with a key greater than
+ *     `childKey`
  */
 - (FIRDatabaseQuery *)queryStartingAfterValue:(nullable id)startAfterValue
                                      childKey:(nullable NSString *)childKey;
 /**
- * queryEndingAtValue: is used to generate a reference to a limited view of the
- * data at this location. The FIRDatabaseQuery instance returned by
- * queryEndingAtValue: will respond to events at nodes with a value less than or
- * equal to endValue.
+ * `queryEnding(atValue:)` is used to generate a reference to a limited view of
+ * the data at this location. The DatabaseQuery instance returned by
+ * `queryEnding(atValue:)` will respond to events at nodes with a value less
+ * than or equal to `endValue`.
  *
  * @param endValue The upper bound, inclusive, for the value of data visible to
- * the returned FIRDatabaseQuery
- * @return A FIRDatabaseQuery instance, limited to data with value less than or
- * equal to endValue
+ *     the returned `DatabaseQuery`
+ * @return A `DatabaseQuery` instance, limited to data with value less than or
+ *     equal to `endValue`
  */
 - (FIRDatabaseQuery *)queryEndingAtValue:(nullable id)endValue;
 
 /**
- * queryEndingAtValue:childKey: is used to generate a reference to a limited
- * view of the data at this location. The FIRDatabaseQuery instance returned by
- * queryEndingAtValue:childKey will respond to events at nodes with a value less
- * than endValue, or equal to endValue and with a key less than or equal to
- * childKey. This is most useful when implementing pagination in a case where
- * multiple nodes can match the endValue.
+ * `queryEnding(atValue:childKey:)` is used to generate a reference to a limited
+ * view of the data at this location. The `DatabaseQuery` instance returned by
+ * `queryEnding(atValue:childKey:)` will respond to events at nodes with a value
+ * less than `endValue`, or equal to `endValue` and with a key less than or
+ * equal to `childKey`. This is most useful when implementing pagination in a
+ * case where multiple nodes can match the `endValue`.
  *
  * @param endValue The upper bound, inclusive, for the value of data visible to
- * the returned FIRDatabaseQuery
+ *     the returned `DatabaseQuery`
  * @param childKey The upper bound, inclusive, for the key of nodes with value
- * equal to endValue
- * @return A FIRDatabaseQuery instance, limited to data with value less than or
- * equal to endValue
+ *     equal to `endValue`
+ * @return A `DatabaseQuery` instance, limited to data with value less than or
+ *     equal to `endValue`
  */
 - (FIRDatabaseQuery *)queryEndingAtValue:(nullable id)endValue
                                 childKey:(nullable NSString *)childKey;
 
 /**
- * queryEndingBeforeValue: is used to generate a reference to a limited view of
- * the data at this location. The FIRDatabaseQuery instance returned by
- * queryEndingBeforeValue: will respond to events at nodes with a value less
- * than endValue.
+ * `queryEnding(beforeValue:) is used to generate a reference to a limited view
+ * of the data at this location. The `DatabaseQuery` instance returned by
+ * `queryEnding(beforeValue:)` will respond to events at nodes with a value less
+ * than `endValue`.
  *
  * @param endValue The upper bound, exclusive, for the value of data visible to
- * the returned FIRDatabaseQuery
- * @return A FIRDatabaseQuery instance, limited to data with value less than
- * endValue
+ *     the returned `DatabaseQuery`
+ * @return A `DatabaseQuery` instance, limited to data with value less than
+ *     `endValue`
  */
 - (FIRDatabaseQuery *)queryEndingBeforeValue:(nullable id)endValue;
 
 /**
- * queryEndingBeforeValue:childKey: is used to generate a reference to a limited
- * view of the data at this location. The FIRDatabaseQuery instance returned by
- * queryEndingBeforeValue:childKey will respond to events at nodes with a value
- * less than endValue, or equal to endValue and with a key less than childKey.
+ * `queryEnding(beforeValue:childKey:)` is used to generate a reference to a
+ * limited view of the data at this location. The `DatabaseQuery` instance
+ * returned by `queryEnding(beforeValue:childKey:)` will respond to events at
+ * nodes with a value less than `endValue`, or equal to `endValue` and with a
+ * key less than childKey.
  *
  * @param endValue The upper bound, inclusive, for the value of data visible to
- * the returned FIRDatabaseQuery
+ *     the returned `DatabaseQuery`
  * @param childKey The upper bound, exclusive, for the key of nodes with value
- * equal to endValue
- * @return A FIRDatabaseQuery instance, limited to data with value less than or
- * equal to endValue
+ *     equal to endValue
+ * @return A `DatabaseQuery` instance, limited to data with value less than or
+ *     equal to endValue
  */
 - (FIRDatabaseQuery *)queryEndingBeforeValue:(nullable id)endValue
                                     childKey:(nullable NSString *)childKey;
 
 /**
- * queryEqualToValue: is used to generate a reference to a limited view of the
- * data at this location. The FIRDatabaseQuery instance returned by
- * queryEqualToValue: will respond to events at nodes with a value equal to the
- * supplied argument.
+ * `queryEqual(toValue:)` is used to generate a reference to a limited view of
+ * the data at this location. The `DatabaseQuery` instance returned by
+ * `queryEqual(toValue:)` will respond to events at nodes with a value equal to
+ * the supplied argument.
  *
- * @param value The value that the data returned by this FIRDatabaseQuery will
- * have
- * @return A FIRDatabaseQuery instance, limited to data with the supplied value.
+ * @param value The value that the data returned by this `DatabaseQuery` will
+ *     have
+ * @return A `DatabaseQuery` instance, limited to data with the supplied value.
  */
 - (FIRDatabaseQuery *)queryEqualToValue:(nullable id)value;
 
 /**
- * queryEqualToValue:childKey: is used to generate a reference to a limited view
- * of the data at this location. The FIRDatabaseQuery instance returned by
- * queryEqualToValue:childKey will respond to events at nodes with a value equal
- * to the supplied argument and with their key equal to childKey. There will be
- * at most one node that matches because child keys are unique.
- *
- * @param value The value that the data returned by this FIRDatabaseQuery will
- * have
+ * `queryEqual(toValue:childKey:)` is used to generate a reference to a limited
+ * view of the data at this location. The `DatabaseQuery` instance returned by
+ * `queryEqual(toValue:childKey:)` will respond to events at nodes with a value
+ * equal to the supplied argument and with their key equal to `childKey`. There
+ * will be at most one node that matches because child keys are unique.
+ *
+ * @param value The value that the data returned by this `DatabaseQuery` will
+ *     have
  * @param childKey The name of nodes with the right value
- * @return A FIRDatabaseQuery instance, limited to data with the supplied value
- * and the key.
+ * @return A `DatabaseQuery` instance, limited to data with the supplied value
+ *     and the key.
  */
 - (FIRDatabaseQuery *)queryEqualToValue:(nullable id)value
                                childKey:(nullable NSString *)childKey;
@@ -456,9 +462,9 @@ NS_SWIFT_NAME(DatabaseQuery)
 #pragma mark - Properties
 
 /**
- * Gets a FIRDatabaseReference for the location of this query.
+ * Gets a `DatabaseReference` for the location of this query.
  *
- * @return A FIRDatabaseReference for the location of this query.
+ * @return A `DatabaseReference` for the location of this query.
  */
 @property(nonatomic, readonly, strong) FIRDatabaseReference *ref;
 

+ 31 - 29
FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRMutableData.h

@@ -19,22 +19,23 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /**
- * A FIRMutableData instance is populated with data from a Firebase Database
- * location. When you are using runTransactionBlock:, you will be given an
+ * A `MutableData` instance is populated with data from a Firebase Database
+ * location. When you are using `runTransactionBlock(_:)`, you will be given an
  * instance containing the current data at that location. Your block will be
  * responsible for updating that instance to the data you wish to save at that
- * location, and then returning using [FIRTransactionResult successWithValue:].
+ * location, and then returning using `TransactionResult.success(withValue:)`.
  *
- * To modify the data, set its value property to any of the native types support
- * by Firebase Database:
+ * To modify the data, set its value property to any of the Objective-C types
+ * supported by Firebase Database, or any equivalent natively bridgeable Swift
+ * type:
  *
- * + NSNumber (includes BOOL)
- * + NSDictionary
- * + NSArray
- * + NSString
- * + nil / NSNull to remove the data
+ * + `NSNumber` (includes booleans)
+ * + `NSDictionary`
+ * + `NSArray`
+ * + `NSString`
+ * + `nil` / `NSNull` to remove the data
  *
- * Note that changes made to a child FIRMutableData instance will be visible to
+ * Note that changes made to a child `MutableData` instance will be visible to
  * the parent.
  */
 NS_SWIFT_NAME(MutableData)
@@ -59,27 +60,28 @@ NS_SWIFT_NAME(MutableData)
 - (BOOL)hasChildAtPath:(NSString *)path;
 
 /**
- * Used to obtain a FIRMutableData instance that encapsulates the data at the
+ * Used to obtain a `MutableData` instance that encapsulates the data at the
  * given relative path. Note that changes made to the child will be visible to
  * the parent.
  *
  * @param path A path string, consisting either of a single segment, like
  * 'child', or multiple segments, 'a/deeper/child'
- * @return A FIRMutableData instance containing the data at the given path
+ * @return A `MutableData` instance containing the data at the given path
  */
 - (FIRMutableData *)childDataByAppendingPath:(NSString *)path;
 
 #pragma mark - Properties
 
 /**
- * To modify the data contained by this instance of FIRMutableData, set this to
- * any of the native types supported by Firebase Database:
+ * To modify the data contained by this instance of `MutableData`, set this to
+ * any of the Objective-C types supported by Firebase Database, or any
+ * equivalent natively bridgeable Swift type:
  *
- * + NSNumber (includes BOOL)
- * + NSDictionary
- * + NSArray
- * + NSString
- * + nil / NSNull to remove the data
+ * + `NSNumber` (includes booleans)
+ * + `NSDictionary`
+ * + `NSArray`
+ * + `NSString`
+ * + `nil` / `NSNull` to remove the data
  *
  * Note that setting this value will override the priority at this location.
  *
@@ -89,11 +91,12 @@ NS_SWIFT_NAME(MutableData)
 
 /**
  * Set this property to update the priority of the data at this location. Can be
- * set to the following types:
+ * set to any of the following Objective-C types supported by Firebase Database,
+ * or any equivalent natively bridgeable Swift type:
  *
- * + NSNumber
- * + NSString
- * + nil / NSNull to remove the priority
+ * + `NSNumber` (includes booleans)
+ * + `NSString`
+ * + `nil` / `NSNull` to remove the data
  *
  * @return The priority of the data at this location
  */
@@ -105,11 +108,10 @@ NS_SWIFT_NAME(MutableData)
 @property(readonly, nonatomic) NSUInteger childrenCount;
 
 /**
- * Used to iterate over the children at this location. You can use the native
- * for .. in syntax:
+ * An enumeration of the children at this location.
  *
- * for (FIRMutableData* child in data.children) {
- *     ...
+ * for var child in data.children {
+ *   // ...
  * }
  *
  * Note that this enumerator operates on an immutable copy of the child list.
@@ -119,7 +121,7 @@ NS_SWIFT_NAME(MutableData)
 @property(readonly, nonatomic, strong) NSEnumerator<FIRMutableData *> *children;
 
 /**
- * @return The key name of this node, or nil if it is the top-most location
+ * @return The key name of this node, or `nil` if it is the top-most location
  */
 @property(readonly, nonatomic, strong, nullable) NSString *key;
 

+ 10 - 10
FirebaseDatabase/Sources/Public/FirebaseDatabase/FIRTransactionResult.h

@@ -20,28 +20,28 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /**
- * Used for runTransactionBlock:. An FIRTransactionResult instance is a
+ * Used for `runTransactionBlock(_:)`. A `TransactionResult` instance is a
  * container for the results of the transaction.
  */
 NS_SWIFT_NAME(TransactionResult)
 @interface FIRTransactionResult : NSObject
 
 /**
- * Used for runTransactionBlock:. Indicates that the new value should be saved
- * at this location
+ * Used for `runTransactionBlock(_:)`. Indicates that the new value should be
+ * saved at this location.
  *
- * @param value A FIRMutableData instance containing the new value to be set
- * @return An FIRTransactionResult instance that can be used as a return value
- * from the block given to runTransactionBlock:
+ * @param value A `MutableData` instance containing the new value to be set
+ * @return A `TransactionResult` instance that can be used as a return value
+ *     from the block given to `runTransactionBlock(_:)`.
  */
 + (FIRTransactionResult *)successWithValue:(FIRMutableData *)value;
 
 /**
- * Used for runTransactionBlock:. Indicates that the current transaction should
- * no longer proceed.
+ * Used for `runTransactionBlock(_:)`. Indicates that the current transaction
+ * should no longer proceed.
  *
- * @return An FIRTransactionResult instance that can be used as a return value
- * from the block given to runTransactionBlock:
+ * @return A `TransactionResult` instance that can be used as a return value
+ * from the block given to `runTransactionBlock(_:)`
  */
 + (FIRTransactionResult *)abort;
 

+ 1 - 1
FirebaseDatabaseSwift.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name                    = 'FirebaseDatabaseSwift'
-  s.version                 = '9.0.0-beta'
+  s.version                 = '9.0.0'
   s.summary                 = 'Swift Extensions for Firebase Realtime Database'
 
   s.description      = <<-DESC

+ 4 - 0
FirebaseDatabaseSwift/CHANGELOG.md

@@ -1,3 +1,7 @@
+# 9.0.0
+- [added] **Breaking change:** `FirebaseDatabaseSwift` has exited beta and is
+  now generally available for use.
+
 # 8.11.0-beta
 - Refactored Codable implementation to share common source with Firebase Functions. This should be
   generally transparent with the exception of custom decoder use cases which may need to be updated. (#8854)

+ 3 - 0
FirebaseDynamicLinks/CHANGELOG.md

@@ -1,3 +1,6 @@
+# v9.0.0
+- [fixed] Fixed async/await crash when retrieving a dynamic link from a universal link fails. (#9612)
+
 # v8.15.0
 - [fixed] Fixed Custom domain long url validation logic. (#6978)
 

+ 8 - 1
FirebaseDynamicLinks/Sources/FIRDynamicLinks.m

@@ -440,7 +440,14 @@ static const NSInteger FIRErrorCodeDurableDeepLinkFailed = -119;
       }
     }
   }
-  mainQueueCompletion(nil, nil);
+
+  mainQueueCompletion(
+      nil, [[NSError alloc] initWithDomain:@"com.firebase.dynamicLinks"
+                                      code:1
+                                  userInfo:@{
+                                    NSLocalizedFailureReasonErrorKey :
+                                        @"Universal link URL could not be parsed by Dynamic Links."
+                                  }]);
   return nil;
 }
 

+ 1 - 1
FirebaseFirestoreSwift.podspec

@@ -5,7 +5,7 @@
 
 Pod::Spec.new do |s|
   s.name                    = 'FirebaseFirestoreSwift'
-  s.version                 = '9.0.0-beta'
+  s.version                 = '9.0.0'
   s.summary                 = 'Swift Extensions for Google Cloud Firestore'
 
   s.description      = <<-DESC

+ 11 - 0
FirebaseFunctions.podspec

@@ -45,6 +45,17 @@ Cloud Functions for Firebase.
   s.dependency 'FirebaseSharedSwift', '~> 9.0'
   s.dependency 'GTMSessionFetcher/Core', '~> 1.5'
 
+  s.test_spec 'objc' do |objc_tests|
+    objc_tests.platforms = {
+      :ios => ios_deployment_target,
+      :osx => '10.15',
+      :tvos => tvos_deployment_target
+    }
+    objc_tests.source_files = [
+      'FirebaseFunctions/Tests/ObjCIntegration/ObjC*'
+    ]
+  end
+
   s.test_spec 'integration' do |int_tests|
     int_tests.platforms = {
       :ios => ios_deployment_target,

+ 6 - 0
FirebaseFunctions/CHANGELOG.md

@@ -1,5 +1,11 @@
 # v9.0.0
+- [changed] The FirebaseFunctionsSwift library has been removed. All of its APIs are now included
+  in the FirebaseFunctions library. Please remove references to FirebaseFunctionsSwift from Podfiles
+  and Swift Package Manager configurations. `import FirebaseFunctionsSwift` should be replaced with
+  `import FirebaseFunctions`.
 - [changed] Backported Callable async/await APIs to iOS 13, etc. (#9483).
+- [changed] The global variables `FunctionsErrorDomain` and `FunctionsErrorDetailsKey` are
+  restored for Swift only.
 
 # v8.15.0
 - [deprecated] The global variables `FIRFunctionsErrorDomain` and `FIRFunctionsErrorDetailsKey` are

+ 2 - 11
FirebaseFunctions/Sources/FunctionsError.swift

@@ -14,21 +14,12 @@
 
 import Foundation
 
-// The error domain for codes in the FIRFunctionsErrorCode enum.
+/// The error domain for codes in the `FunctionsErrorCode` enum.
 public let FunctionsErrorDomain: String = "com.firebase.functions"
 
-// The key for finding error details in the NSError userInfo.
+/// The key for finding error details in the `NSError` userInfo.
 public let FunctionsErrorDetailsKey: String = "details"
 
-// Swift globals are not visible from Objective C. Use these instead.
-@objc(FIRFunctionsErrorKeys) open class __FunctionsErrorKeys: NSObject {
-  // The error domain for codes in the FIRFunctionsErrorCode enum.
-  @objc public static let domain: String = "com.firebase.functions"
-
-  // The key for finding error details in the NSError userInfo.
-  @objc public static let errorDetailsKey: String = "details"
-}
-
 /**
  * The set of error status codes that can be returned from a Callable HTTPS tigger. These are the
  * canonical error codes for Google APIs, as documented here:

+ 2 - 3
FirebaseFunctions/Tests/ObjCIntegration/FIRIntegrationTests.m

@@ -242,8 +242,7 @@ static NSString *const kDefaultProjectID = @"functions-integration-test";
             XCTAssertEqual(FIRFunctionsErrorCodeOutOfRange, error.code);
             XCTAssertEqualObjects(@"explicit nope", error.userInfo[NSLocalizedDescriptionKey]);
             NSDictionary *expectedDetails = @{@"start" : @10, @"end" : @20, @"long" : @30L};
-            XCTAssertEqualObjects(expectedDetails,
-                                  error.userInfo[FIRFunctionsErrorKeys.errorDetailsKey]);
+            XCTAssertEqualObjects(expectedDetails, error.userInfo[@"details"]);
             [expectation fulfill];
           }];
   [self waitForExpectations:@[ expectation ] timeout:10];
@@ -270,7 +269,7 @@ static NSString *const kDefaultProjectID = @"functions-integration-test";
         XCTAssertNotNil(error);
         XCTAssertEqual(FIRFunctionsErrorCodeDeadlineExceeded, error.code);
         XCTAssertEqualObjects(@"DEADLINE EXCEEDED", error.userInfo[NSLocalizedDescriptionKey]);
-        XCTAssertNil(error.userInfo[FIRFunctionsErrorKeys.errorDetailsKey]);
+        XCTAssertNil(error.userInfo[@"details"]);
         [expectation fulfill];
       }];
   [self waitForExpectations:@[ expectation ] timeout:10];

+ 3 - 9
FirebaseFunctions/Tests/ObjCIntegration/ObjCAPITests.m

@@ -35,7 +35,7 @@
 
   FIRHTTPSCallable *callable = [func HTTPSCallableWithName:@"name"];
 
-  [func useEmulatorWithHost:@"host" port:@"port"];
+  [func useEmulatorWithHost:@"host" port:123];
 
 #pragma mark - HTTPSCallable and HTTPSCallableResult
   [callable
@@ -48,16 +48,9 @@
                 }];
   callable.timeoutInterval = 60;
   [callable timeoutInterval];
+}
 
 #pragma mark - FunctionsError
-  // Deleted in Firebase 9
-  //__unused NSString *str = FIRFunctionsErrorDomain;
-  //__unused NSString *str2 = FIRFunctionsErrorDetailsKey;
-
-  // Replaced in Firebase 9
-  __unused NSString *str = FIRFunctionsErrorKeys.domain;
-  __unused NSString *str2 = FIRFunctionsErrorKeys.errorDetailsKey;
-}
 
 - (FIRFunctionsErrorCode)errorCodes:(NSError *)error {
   switch (error.code) {
@@ -80,5 +73,6 @@
     case FIRFunctionsErrorCodeUnauthenticated:
       return error.code;
   }
+  return error.code;
 }
 @end

+ 78 - 0
FirebaseFunctions/Tests/ObjCIntegration/ObjCPPAPITests.mm

@@ -0,0 +1,78 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#import <XCTest/XCTest.h>
+
+#import <FirebaseFunctions/FirebaseFunctions-Swift.h>
+#import "FirebaseCore/FirebaseCore.h"
+
+@interface ObjCPPAPICoverage : XCTestCase
+@end
+
+@implementation ObjCPPAPICoverage
+
+- (void)apis {
+#pragma mark - Functions
+
+  FIRApp *app = [FIRApp defaultApp];
+  FIRFunctions *func = [FIRFunctions functions];
+  func = [FIRFunctions functionsForApp:app];
+  func = [FIRFunctions functionsForRegion:@"my-region"];
+  func = [FIRFunctions functionsForCustomDomain:@"my-domain"];
+  func = [FIRFunctions functionsForApp:app region:@"my-region"];
+  func = [FIRFunctions functionsForApp:app customDomain:@"my-domain"];
+
+  FIRHTTPSCallable *callable = [func HTTPSCallableWithName:@"name"];
+
+  [func useEmulatorWithHost:@"host" port:123];
+
+#pragma mark - HTTPSCallable and HTTPSCallableResult
+  [callable
+      callWithCompletion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) {
+        __unused id data = result.data;
+      }];
+  [callable callWithObject:nil
+                completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) {
+                  [result data];
+                }];
+  callable.timeoutInterval = 60;
+  [callable timeoutInterval];
+}
+
+#pragma mark - FunctionsError
+
+- (FIRFunctionsErrorCode)errorCodes:(NSError *)error {
+  switch (error.code) {
+    case FIRFunctionsErrorCodeOK:
+    case FIRFunctionsErrorCodeCancelled:
+    case FIRFunctionsErrorCodeUnknown:
+    case FIRFunctionsErrorCodeInvalidArgument:
+    case FIRFunctionsErrorCodeDeadlineExceeded:
+    case FIRFunctionsErrorCodeNotFound:
+    case FIRFunctionsErrorCodeAlreadyExists:
+    case FIRFunctionsErrorCodePermissionDenied:
+    case FIRFunctionsErrorCodeResourceExhausted:
+    case FIRFunctionsErrorCodeFailedPrecondition:
+    case FIRFunctionsErrorCodeAborted:
+    case FIRFunctionsErrorCodeOutOfRange:
+    case FIRFunctionsErrorCodeUnimplemented:
+    case FIRFunctionsErrorCodeInternal:
+    case FIRFunctionsErrorCodeUnavailable:
+    case FIRFunctionsErrorCodeDataLoss:
+    case FIRFunctionsErrorCodeUnauthenticated:
+      return (FIRFunctionsErrorCode)error.code;
+  }
+  return (FIRFunctionsErrorCode)error.code;
+}
+@end

+ 7 - 1
FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift

@@ -15,11 +15,12 @@
 // MARK: This file is used to evaluate the experience of using Firebase APIs in Swift.
 
 import Foundation
+import XCTest
 
 import FirebaseCore
 import FirebaseFunctions
 
-final class FunctionsAPITests {
+final class FunctionsAPITests: XCTestCase {
   func usage() {
     // MARK: - Functions
 
@@ -139,4 +140,9 @@ final class FunctionsAPITests {
       }
     }
   }
+
+  func testErrorGlobals() {
+    XCTAssertEqual(FunctionsErrorDetailsKey, "details")
+    XCTAssertEqual(FunctionsErrorDomain, "com.firebase.functions")
+  }
 }

+ 23 - 25
FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging/FIRInAppMessaging.h

@@ -24,20 +24,20 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * The root object for in-app messaging iOS SDK.
  *
- * Note: Firebase InApp Messaging depends on using a Firebase Instance ID & token pair to be able
- * to retrieve FIAM messages defined for the current app instance. By default, Firebase in-app
- * messaging SDK would obtain the ID & token pair on app/SDK startup. As a result of using
- * ID & token pair, some device client data (linked to the instance ID) would be collected and sent
- * over to Firebase backend periodically.
+ * Note: Firebase In-App Messaging depends on using a Firebase Installation ID and token pair to be
+ * able to retrieve messages defined for the current app instance. By default, the Firebase In-App
+ * Messaging SDK will obtain the ID and token pair on app/SDK startup. In its default configuration
+ * the in-app messaging SDK will send some device and client data (linked to the installation ID)
+ * to the Firebase backend periodically.
  *
  * The app can tune the default data collection behavior via certain controls. They are listed in
  * descending order below. If a higher-priority setting exists, lower level settings are ignored.
  *
- *   1. Dynamically turn on/off data collection behavior by setting the
- *     `automaticDataCollectionEnabled` property on the `FIRInAppMessaging` instance to true/false
- *      Swift or YES/NO (objective-c).
- *   2. Set `FirebaseInAppMessagingAutomaticDataCollectionEnabled` to false in the app's plist file.
- *   3. Global Firebase data collection setting.
+ *   1. Dynamically turning on or off data collection behavior by setting the
+ *     `automaticDataCollectionEnabled` property on the `InAppMessaging` instance to true or false.
+ *   2. Setting `FirebaseInAppMessagingAutomaticDataCollectionEnabled` to false in the app's plist
+ *      file.
+ *   3. Disabling data collection via the global Firebase data collection setting.
  *
  * This class is unavailable on macOS, macOS Catalyst, and watchOS.
  **/
@@ -47,7 +47,7 @@ API_UNAVAILABLE(macos, watchos)
 NS_SWIFT_NAME(InAppMessaging)
 @interface FIRInAppMessaging : NSObject
 /** @fn inAppMessaging
-    @brief Gets the singleton FIRInAppMessaging object constructed from default Firebase App
+    @brief Gets the singleton InAppMessaging object constructed from the default Firebase app
     settings.
 */
 + (FIRInAppMessaging *)inAppMessaging NS_SWIFT_NAME(inAppMessaging());
@@ -58,27 +58,25 @@ NS_SWIFT_NAME(InAppMessaging)
 - (instancetype)init __attribute__((unavailable("Use +inAppMessaging instead.")));
 
 /**
- * A boolean flag that can be used to suppress messaging display at runtime. It's
- * initialized to false at app startup. Once set to true, fiam SDK would stop rendering any
- * new messages until it's set back to false.
+ * A boolean flag that can be used to suppress messaging display at runtime,
+ * initialized to false at app startup. Once set to true, the in-app messaging SDK will stop
+ * rendering any new messages until this flag is set back to false.
  */
 @property(nonatomic) BOOL messageDisplaySuppressed;
 
 /**
- * A boolean flag that can be set at runtime to allow/disallow fiam SDK automatically
- * collect user data on app startup. Settings made via this property is persisted across app
- * restarts and has higher priority over FirebaseInAppMessagingAutomaticDataCollectionEnabled
- * flag (if present) in plist file.
+ * A boolean flag that can be set at runtime to allow or disallow
+ * collecting user data on app startup. This property is persisted across app
+ * restarts and has higher priority over the `FirebaseInAppMessagingAutomaticDataCollectionEnabled`
+ * flag (if present) in your app's `Info.plist` file.
  */
 @property(nonatomic) BOOL automaticDataCollectionEnabled;
 
 /**
- * This is the display component that will be used by FirebaseInAppMessaging to render messages.
- * If it's nil (the default case when FirebaseIAppMessaging SDK starts), FirebaseInAppMessaging
- * would only perform other non-rendering flows (fetching messages for example). SDK
- * FirebaseInAppMessagingDisplay would set itself as the display component if it's included by
- * the app. Any other custom implementation of FIRInAppMessagingDisplay would need to set this
- * property so that it can be used for rendering fiam message UIs.
+ * This is the display component that will be used by InAppMessaging to render messages.
+ * If it's `nil`, InAppMessaging will only perform other non-rendering flows (fetching messages for
+ * example). Any custom implementations of `InAppMessagingDisplay` require setting this property in
+ * order to take effect.
  */
 @property(nonatomic) id<FIRInAppMessagingDisplay> messageDisplayComponent;
 
@@ -88,7 +86,7 @@ NS_SWIFT_NAME(InAppMessaging)
 - (void)triggerEvent:(NSString *)eventName;
 
 /**
- * This delegate should be set on the app side to receive message lifecycle events in app runtime.
+ * This delegate should be set on the app side to receive message lifecycle events.
  */
 @property(nonatomic, weak) id<FIRInAppMessagingDisplayDelegate> delegate;
 

+ 7 - 7
FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h

@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
 // clang-format12 merges the next two lines.
 FOUNDATION_EXPORT const NSNotificationName FIRInstallationIDDidChangeNotification
     NS_SWIFT_NAME(InstallationIDDidChange);
-/** `userInfo` key for the `FirebaseApp.name` in `FIRInstallationIDDidChangeNotification`. */
+/** `userInfo` key for the `FirebaseApp.name` in `InstallationIDDidChangeNotification`. */
 FOUNDATION_EXPORT NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey
     NS_SWIFT_NAME(InstallationIDDidChangeAppNameKey);
 // clang-format on
@@ -90,8 +90,8 @@ NS_SWIFT_NAME(Installations)
 /**
  * Retrieves (locally if it exists or from the server) a valid installation auth token. An existing
  * token may be invalidated or expired, so it is recommended to fetch the installation auth token
- * before each server request. The method does the same as `Installations.authTokenForcingRefresh(:,
- * completion:)` with forcing refresh `NO`.
+ * before each server request. The method does the same as
+ * `Installations.authToken(forcingRefresh:completion:)` with forcing refresh `false`.
  * @param completion A completion handler which is invoked when the operation completes.
  */
 - (void)authTokenWithCompletion:(void (^)(FIRInstallationsAuthTokenResult *__nullable tokenResult,
@@ -101,11 +101,11 @@ NS_SWIFT_NAME(Installations)
  * Retrieves (locally or from the server depending on `forceRefresh` value) a valid installation
  * auth token. An existing token may be invalidated or expire, so it is recommended to fetch the
  * installation auth token before each server request. This method should be used with `forceRefresh
- * == YES` when e.g. a request with the previously fetched installation auth token failed with "Not
+ * == true` when e.g. a request with the previously fetched installation auth token failed with "Not
  * Authorized" error.
- * @param forceRefresh If `YES` then the locally cached installation auth token will be ignored and
- * a new one will be requested from the server. If `NO`, then the locally cached installation auth
- * token will be returned if exists and has not expired yet.
+ * @param forceRefresh If `true` then the locally cached installation auth token will be ignored and
+ * a new one will be requested from the server. If `false`, then the locally cached installation
+ * auth token will be returned if exists and has not expired yet.
  * @param completion  A completion handler which is invoked when the operation completes. See
  * `InstallationsTokenHandler` for additional details.
  */

+ 33 - 33
FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessaging.h

@@ -165,8 +165,9 @@ NS_SWIFT_NAME(MessagingDelegate)
  *  registration token. This token authorizes an
  *  app server to send messages to an app instance.
  *
- *  In order to receive FIRMessaging messages, declare
- *  `application:didReceiveRemoteNotification::fetchCompletionHandler:`.
+ *  In order to handle incoming Messaging messages, set the
+ *  `UNUserNotificationCenter`'s `delegate` property
+ *  and implement the appropriate methods.
  */
 NS_SWIFT_NAME(Messaging)
 @interface FIRMessaging : NSObject
@@ -179,18 +180,17 @@ NS_SWIFT_NAME(Messaging)
 /**
  *  FIRMessaging
  *
- *  @return An instance of FIRMessaging.
+ *  @return An instance of Messaging.
  */
 + (instancetype)messaging NS_SWIFT_NAME(messaging());
 
 /**
- * FIRMessagingExtensionHelper
+ * Use the MessagingExtensionHelper to populate rich UI content for your notifications.
+ * For example, if an image URL is set in your notification payload or on the console,
+ * you can use the MessagingExtensionHelper instance returned from this method to render
+ * the image in your notification.
  *
- * Use FIRMessagingExtensionHelper to populate rich UI contents for your notifications.
- * e.g. If an image URL is set in your notification payload or on the console, call
- * FIRMessagingExtensionHelper API to render it on your notification.
- *
- * @return An instance of FIRMessagingExtensionHelper that handles the extensions API.
+ * @return An instance of MessagingExtensionHelper that handles the extensions API.
  */
 + (FIRMessagingExtensionHelper *)extensionHelper NS_SWIFT_NAME(serviceExtension())
     NS_AVAILABLE(10.14, 10.0);
@@ -205,27 +205,27 @@ NS_SWIFT_NAME(Messaging)
 /**
  *  This property is used to set the APNs Token received by the application delegate.
  *
- *  FIRMessaging uses method swizzling to ensure that the APNs token is set
+ *  Messaging uses method swizzling to ensure that the APNs token is set
  *  automatically. However, if you have disabled swizzling by setting
  *  `FirebaseAppDelegateProxyEnabled` to `NO` in your app's
  *  Info.plist, you should manually set the APNs token in your application
- *  delegate's `-application:didRegisterForRemoteNotificationsWithDeviceToken:`
+ *  delegate's `application(_:didRegisterForRemoteNotificationsWithDeviceToken:)`
  *  method.
  *
  *  If you would like to set the type of the APNs token, rather than relying on
- *  automatic detection, see: `-setAPNSToken:type:`.
+ *  automatic detection, see `setAPNSToken(_:type:)`.
  */
 @property(nonatomic, copy, nullable) NSData *APNSToken NS_SWIFT_NAME(apnsToken);
 
 /**
- *  Set APNs token for the application. This APNs token will be used to register
- *  with Firebase Messaging using `FCMToken` or
- *  `tokenWithAuthorizedEntity:scope:options:handler`.
+ *  Set the APNs token for the application. This token will be used to register
+ *  with Firebase Messaging, and will be associated with the app's installation ID
+ *  in the form of an FCM token.
  *
  *  @param apnsToken The APNs token for the application.
- *  @param type  The type of APNs token. Debug builds should use
- *  FIRMessagingAPNSTokenTypeSandbox. Alternatively, you can supply
- *  FIRMessagingAPNSTokenTypeUnknown to have the type automatically
+ *  @param type The type of APNs token. Debug builds should use
+ *  `MessagingAPNSTokenTypeSandbox`. Alternatively, you can supply
+ *  `MessagingAPNSTokenTypeUnknown` to have the type automatically
  *  detected based on your provisioning profile.
  */
 - (void)setAPNSToken:(NSData *)apnsToken type:(FIRMessagingAPNSTokenType)type;
@@ -233,20 +233,20 @@ NS_SWIFT_NAME(Messaging)
 #pragma mark - FCM Tokens
 
 /**
- * Is Firebase Messaging token auto generation enabled?  If this flag is disabled, Firebase
- * Messaging will not generate token automatically for message delivery.
+ * Is Firebase Messaging token auto generation enabled? If this flag is disabled, Firebase
+ * Messaging will not generate an FCM token automatically for message delivery.
  *
  * If this flag is disabled, Firebase Messaging does not generate new tokens automatically for
  * message delivery. If this flag is enabled, FCM generates a registration token on application
  * start when there is no existing valid token and periodically refreshes the token and sends
- * data to Firebase backend.
+ * data to the Firebase backend.
  *
- * This setting is persisted, and is applied on future invocations of your application.  Once
+ * This setting is persisted, and is applied on future invocations of your application. Once
  * explicitly set, it overrides any settings in your Info.plist.
  *
  * By default, FCM automatic initialization is enabled.  If you need to change the
- * default (for example, because you want to prompt the user before getting token)
- * set FirebaseMessagingAutoInitEnabled to false in your application's Info.plist.
+ * default (for example, because you want to prompt the user before getting a token),
+ * set `FirebaseMessagingAutoInitEnabled` to NO in your application's Info.plist.
  */
 @property(nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled;
 
@@ -255,13 +255,13 @@ NS_SWIFT_NAME(Messaging)
  * it. It is associated with your APNs token when the APNs token is supplied, so messages sent to
  * the FCM token will be delivered over APNs.
  *
- * The FCM registration token is sometimes refreshed automatically. In your FIRMessaging delegate,
- * the delegate method `messaging:didReceiveRegistrationToken:` will be called once a token is
+ * The FCM registration token is sometimes refreshed automatically. In your Messaging delegate,
+ * the delegate method `messaging(_:didReceiveRegistrationToken:)` will be called once a token is
  * available, or has been refreshed. Typically it should be called once per app start, but
  * may be called more often if the token is invalidated or updated.
  *
- * Once you have an FCM registration token, you should send it to your application server, so it can
- * use the FCM token to send notifications to your device.
+ * Once you have an FCM registration token, you should send it to your application server, where
+ * it can be used to send notifications to your device.
  */
 @property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken);
 
@@ -276,8 +276,8 @@ NS_SWIFT_NAME(Messaging)
  * @param completion The completion handler to handle the token request.
  */
 
-- (void)tokenWithCompletion:(void (^)(NSString *__nullable token,
-                                      NSError *__nullable error))completion;
+- (void)tokenWithCompletion:(void (^)(NSString *_Nullable token,
+                                      NSError *_Nullable error))completion;
 
 /**
  * Asynchronously deletes the default FCM registration token.
@@ -288,7 +288,7 @@ NS_SWIFT_NAME(Messaging)
  * @param completion The completion handler to handle the token deletion.
  */
 
-- (void)deleteTokenWithCompletion:(void (^)(NSError *__nullable error))completion;
+- (void)deleteTokenWithCompletion:(void (^)(NSError *_Nullable error))completion;
 
 /**
  *  Retrieves an FCM registration token for a particular Sender ID. This can be used to allow
@@ -345,8 +345,8 @@ NS_SWIFT_NAME(Messaging)
  *
  * @param topic       The topic name to subscribe to, for example, @"sports".
  * @param completion  The completion that is invoked once the subscribe call ends.
- *                     In case of success, nil error is returned. Otherwise, an
- *                     appropriate error object is returned.
+ *                    On success, the error parameter is always `nil`. Otherwise, an
+ *                    appropriate error object is returned.
  */
 - (void)subscribeToTopic:(nonnull NSString *)topic
               completion:(void (^_Nullable)(NSError *_Nullable error))completion;

+ 1 - 1
FirebasePerformance/CHANGELOG.md

@@ -1,4 +1,4 @@
-# Pending
+# Version 8.15.0
 * Remove the unused code for pre-warm detection.
 
 # Version 8.14.0

+ 2 - 2
FirebasePerformance/Sources/Public/FirebasePerformance/FIRHTTPMetric.h

@@ -42,7 +42,7 @@ typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
 // clang-format on
 
 /**
- * FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request.
+ * Instances of `HTTPMetric` can be used to record HTTP network request information.
  */
 NS_SWIFT_NAME(HTTPMetric)
 NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions.")
@@ -57,7 +57,7 @@ NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions."
                           HTTPMethod:(FIRHTTPMethod)httpMethod NS_SWIFT_NAME(init(url:httpMethod:));
 
 /**
- * Use `initWithURL:HTTPMethod:` for Objective-C and `init(url:httpMethod:)` for Swift.
+ * Use `init(url:httpMethod:)` for Swift and `initWithURL:HTTPMethod:` for Objective-C.
  */
 - (nonnull instancetype)init NS_UNAVAILABLE;
 

+ 16 - 16
FirebasePerformance/Sources/Public/FirebasePerformance/FIRPerformance.h

@@ -21,9 +21,9 @@
  * interfaces to create timers and enable or disable automatic metrics capture.
  *
  * This SDK uses a Firebase Installations ID to identify the app instance and periodically sends
- * data to the Firebase backend. (see `[FIRInstallations installationIDWithCompletion:]`).
- * To stop the periodic sync, call `[FIRInstallations deleteWithCompletion:]` and
- * either disable this SDK or set FIRPerformance.dataCollectionEnabled to NO.
+ * data to the Firebase backend (see `Installations.installationID(completion:)`).
+ * To stop this periodic sync, call `Installations.delete(completion:)` and
+ * either disable this SDK or set Performance.dataCollectionEnabled to false.
  */
 NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.")
 NS_SWIFT_NAME(Performance)
@@ -31,7 +31,7 @@ NS_SWIFT_NAME(Performance)
 
 /**
  * Controls the capture of performance data. When this value is set to NO, none of the performance
- * data will sent to the server. Default is YES.
+ * data will sent to the server. Default is true.
  *
  * This setting is persisted, and is applied on future invocations of your application. Once
  * explicitly set, it overrides any settings in your Info.plist.
@@ -39,15 +39,15 @@ NS_SWIFT_NAME(Performance)
 @property(nonatomic, assign, getter=isDataCollectionEnabled) BOOL dataCollectionEnabled;
 
 /**
- * Controls the instrumentation of the app to capture performance data. Setting this value to NO has
- * immediate effect only if it is done so before calling [FIRApp configure]. Otherwise it takes
- * effect after the app starts again the next time.
+ * Controls the instrumentation of the app to capture performance data. Setting this value to false
+ * has immediate effect only if it is done so before calling FirebaseApp.configure(). Otherwise it
+ * takes effect on the next app start.
  *
- * If set to NO, the app will not be instrumented to collect performance
- * data (in scenarios like app_start, networking monitoring). Default is YES.
+ * If set to false, the app will not be instrumented to collect performance
+ * data (in scenarios like `app_start`, networking monitoring). Default is true.
  *
  * This setting is persisted, and is applied on future invocations of your application. Once
- * explicitly set, it overrides any settings in your Info.plist.
+ * explicitly set, it overrides any settings in your `Info.plist`.
  */
 @property(nonatomic, assign, getter=isInstrumentationEnabled) BOOL instrumentationEnabled;
 
@@ -55,18 +55,18 @@ NS_SWIFT_NAME(Performance)
 + (nonnull instancetype)sharedInstance NS_SWIFT_NAME(sharedInstance());
 
 /**
- * Creates an instance of FIRTrace after creating the shared instance of FIRPerformance. The trace
- * will automatically be started on a successful creation of the instance. The |name| of the trace
+ * Creates an instance of Trace after creating the shared instance of Performance. The trace
+ * will automatically be started on a successful creation of the instance. The `name` of the trace
  * cannot be an empty string.
  *
- * @param name The name of the Trace.
- * @return The FIRTrace object.
+ * @param name The name of the trace.
+ * @return The Trace object.
  */
 + (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name NS_SWIFT_NAME(startTrace(name:));
 
 /**
- * Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the
- * -start API on the returned |FIRTrace| object. The |name| cannot be an empty string.
+ * Creates an instance of Trace. This API does not start the trace. To start the trace, use the
+ * `start()` method on the returned Trace object. The `name` cannot be an empty string.
  *
  * @param name The name of the Trace.
  * @return The FIRTrace object.

+ 34 - 38
FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FIRRemoteConfig.h

@@ -129,46 +129,44 @@ NS_SWIFT_NAME(RemoteConfigSettings)
 /// before a fetch request can again be made to the Remote Config backend. After a fetch request to
 /// the backend has succeeded, no additional fetch requests to the backend will be allowed until the
 /// minimum fetch interval expires. Note that you can override this default on a per-fetch request
-/// basis using -[FIRRemoteConfig fetchWithExpirationDuration:completionHandler]. For E.g. setting
-/// the expiration duration to 0 in the fetch request will override the minimumFetchInterval and
-/// allow the request to the backend.
+/// basis using `RemoteConfig.fetch(withExpirationDuration:)`. For example, setting
+/// the expiration duration to 0 in the fetch request will override the `minimumFetchInterval` and
+/// allow the request to proceed.
 @property(nonatomic, assign) NSTimeInterval minimumFetchInterval;
 /// Indicates the default value in seconds to abandon a pending fetch request made to the backend.
-/// This value is set for outgoing requests as the timeoutIntervalForRequest as well as the
-/// timeoutIntervalForResource on the NSURLSession's configuration.
+/// This value is set for outgoing requests as the `timeoutIntervalForRequest` as well as the
+/// `timeoutIntervalForResource` on the `NSURLSession`'s configuration.
 @property(nonatomic, assign) NSTimeInterval fetchTimeout;
 @end
 
 #pragma mark - FIRRemoteConfig
-/// Firebase Remote Config class. The shared instance method +remoteConfig can be created and used
-/// to fetch, activate and read config results and set default config results.
+/// Firebase Remote Config class. The class method `remoteConfig()` can be used
+/// to fetch, activate and read config results and set default config results on the default
+/// Remote Config instance.
 NS_SWIFT_NAME(RemoteConfig)
 @interface FIRRemoteConfig : NSObject <NSFastEnumeration>
 /// Last successful fetch completion time.
 @property(nonatomic, readonly, strong, nullable) NSDate *lastFetchTime;
-/// Last fetch status. The status can be any enumerated value from FIRRemoteConfigFetchStatus.
+/// Last fetch status. The status can be any enumerated value from `RemoteConfigFetchStatus`.
 @property(nonatomic, readonly, assign) FIRRemoteConfigFetchStatus lastFetchStatus;
 /// Config settings are custom settings.
 @property(nonatomic, readwrite, strong, nonnull) FIRRemoteConfigSettings *configSettings;
 
-/// Returns the FIRRemoteConfig instance configured for the default Firebase app. This singleton
+/// Returns the `RemoteConfig` instance configured for the default Firebase app. This singleton
 /// object contains the complete set of Remote Config parameter values available to the app,
 /// including the Active Config and Default Config. This object also caches values fetched from the
-/// Remote Config Server until they are copied to the Active Config by calling
-/// `activateWithCompletion:`. When you fetch values from the Remote Config Server using the default
-/// Firebase namespace service, you should use this class method to create a shared instance of the
-/// FIRRemoteConfig object to ensure that your app will function properly with the Remote Config
-/// Server and the Firebase service.
+/// Remote Config server until they are copied to the Active Config by calling `activate()`. When
+/// you fetch values from the Remote Config server using the default Firebase app, you should use
+/// this class method to create and reuse a shared instance of `RemoteConfig`.
 + (nonnull FIRRemoteConfig *)remoteConfig NS_SWIFT_NAME(remoteConfig());
 
-/// Returns the FIRRemoteConfig instance for your (non-default) Firebase appID. Note that Firebase
+/// Returns the `RemoteConfig` instance for your (non-default) Firebase appID. Note that Firebase
 /// analytics does not work for non-default app instances. This singleton object contains the
 /// complete set of Remote Config parameter values available to the app, including the Active Config
 /// and Default Config. This object also caches values fetched from the Remote Config Server until
-/// they are copied to the Active Config by calling `activateWithCompletion:`. When you fetch values
-/// from the Remote Config Server using the default Firebase namespace service, you should use this
-/// class method to create a shared instance of the FIRRemoteConfig object to ensure that your app
-/// will function properly with the Remote Config Server and the Firebase service.
+/// they are copied to the Active Config by calling `activate())`. When you fetch values
+/// from the Remote Config Server using the non-default Firebase app, you should use this
+/// class method to create and reuse shared instance of `RemoteConfig`.
 + (nonnull FIRRemoteConfig *)remoteConfigWithApp:(nonnull FIRApp *)app
     NS_SWIFT_NAME(remoteConfig(app:));
 
@@ -180,13 +178,13 @@ NS_SWIFT_NAME(RemoteConfig)
 - (void)ensureInitializedWithCompletionHandler:
     (void (^_Nonnull)(NSError *_Nullable initializationError))completionHandler;
 #pragma mark - Fetch
-/// Fetches Remote Config data with a callback. Call `activateWithCompletion:` to make fetched data
+/// Fetches Remote Config data with a callback. Call `activate()` to make fetched data
 /// available to your app.
 ///
 /// Note: This method uses a Firebase Installations token to identify the app instance, and once
 /// it's called, it periodically sends data to the Firebase backend. (see
-/// `[FIRInstallations authTokenWithCompletion:]`).
-/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
+/// `Installations.authToken(completion:)`).
+/// To stop the periodic sync, call `Installations.delete(completion:)`
 /// and avoid calling this method again.
 ///
 /// @param completionHandler Fetch operation callback with status and error parameters.
@@ -198,13 +196,13 @@ NS_SWIFT_NAME(RemoteConfig)
 ///
 /// Note: This method uses a Firebase Installations token to identify the app instance, and once
 /// it's called, it periodically sends data to the Firebase backend. (see
-/// `[FIRInstallations authTokenWithCompletion:]`).
-/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
+/// `Installations.authToken(completion:)`).
+/// To stop the periodic sync, call `Installations.delete(completion:)`
 /// and avoid calling this method again.
 ///
-/// @param expirationDuration  Override the (default or optionally set minimumFetchInterval property
-/// in FIRRemoteConfigSettings) minimumFetchInterval for only the current request, in seconds.
-/// Setting a value of 0 seconds will force a fetch to the backend.
+/// @param expirationDuration  Override the (default or optionally set `minimumFetchInterval`
+/// property in RemoteConfigSettings) `minimumFetchInterval` for only the current request, in
+/// seconds. Setting a value of 0 seconds will force a fetch to the backend.
 /// @param completionHandler   Fetch operation callback with status and error parameters.
 - (void)fetchWithExpirationDuration:(NSTimeInterval)expirationDuration
                   completionHandler:(void (^_Nullable)(FIRRemoteConfigFetchStatus status,
@@ -215,8 +213,8 @@ NS_SWIFT_NAME(RemoteConfig)
 ///
 /// Note: This method uses a Firebase Installations token to identify the app instance, and once
 /// it's called, it periodically sends data to the Firebase backend. (see
-/// `[FIRInstallations authTokenWithCompletion:]`).
-/// To stop the periodic sync, developers need to call `[FIRInstallations deleteWithCompletion:]`
+/// `Installations.authToken(completion:)`).
+/// To stop the periodic sync, call `Installations.delete(completion:)`
 /// and avoid calling this method again.
 ///
 /// @param completionHandler Fetch operation callback with status and error parameters.
@@ -234,13 +232,11 @@ NS_SWIFT_NAME(RemoteConfig)
 
 #pragma mark - Get Config
 /// Enables access to configuration values by using object subscripting syntax.
-/// <pre>
-/// // Example:
-/// FIRRemoteConfig *config = [FIRRemoteConfig remoteConfig];
-/// FIRRemoteConfigValue *value = config[@"yourKey"];
-/// BOOL b = value.boolValue;
-/// NSNumber *number = config[@"yourKey"].numberValue;
-/// </pre>
+/// For example:
+///     let config = RemoteConfig.remoteConfig()
+///     let value = config["yourKey"]
+///     let boolValue = value.boolValue
+///     let number = config["yourKey"].numberValue
 - (nonnull FIRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key;
 
 /// Gets the config value.
@@ -275,8 +271,8 @@ NS_SWIFT_NAME(RemoteConfig)
 /// Sets default configs from plist for default namespace.
 ///
 /// @param fileName The plist file name, with no file name extension. For example, if the plist file
-///                 is defaultSamples.plist, call:
-///                 [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"];
+///                 is named `defaultSamples.plist`:
+///                 `RemoteConfig.remoteConfig().setDefaults(fromPlist: "defaultSamples")`
 - (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName
     NS_SWIFT_NAME(setDefaults(fromPlist:));
 

+ 1 - 1
FirebaseRemoteConfigSwift.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name                    = 'FirebaseRemoteConfigSwift'
-  s.version                 = '9.0.0-beta'
+  s.version                 = '9.0.0'
   s.summary                 = 'Swift Extensions for Firebase Remote Config'
 
   s.description      = <<-DESC

+ 4 - 0
FirebaseRemoteConfigSwift/CHANGELOG.md

@@ -1,3 +1,7 @@
+# 9.0.0
+- [added] **Breaking change:** `FirebaseRemoteConfigSwift` has exited beta and
+  is now generally available for use.
+
 # 8.12.0-beta
 - Initial public beta release with Codable support. See example usage in
   https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/Codable.swift

+ 12 - 12
FirebaseStorage.podspec

@@ -33,13 +33,13 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
   s.prefix_header_file = false
 
   s.source_files = [
-    'FirebaseStorageSwift/Sources/*.swift',
-    'FirebaseStorageSwift/Typedefs/*.h',
+    'FirebaseStorage/Sources/*.swift',
+    'FirebaseStorage/Typedefs/*.h',
     'FirebaseAppCheck/Interop/*.h',
     'FirebaseAuth/Interop/*.h',
   ]
 
-  s.dependency 'FirebaseStorageObjC', '~> 9.0'
+  s.dependency 'FirebaseStorageInternal', '~> 9.0'
   s.dependency 'FirebaseAppCheckInterop', '~> 9.0'
   s.dependency 'FirebaseAuthInterop', '~> 9.0'
   s.dependency 'FirebaseCore', '~> 9.0'
@@ -53,12 +53,12 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
       :tvos => tvos_deployment_target
     }
     objc_tests.source_files = [
-      'FirebaseStorage/Tests/Integration/*.[mh]',
-      'FirebaseStorageSwift/Tests/ObjCIntegration/*.m',
+      'FirebaseStorageInternal/Tests/Integration/*.[mh]',
+      'FirebaseStorage/Tests/ObjCIntegration/*.{m,mm}',
     ]
     objc_tests.requires_app_host = true
-    objc_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist'
+    objc_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist'
     objc_tests.dependency 'FirebaseAuth', '~> 9.0'
     objc_tests.pod_target_xcconfig = {
       'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
@@ -72,7 +72,7 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
       :osx => osx_deployment_target,
       :tvos => tvos_deployment_target
     }
-    unit_tests.source_files = 'FirebaseStorageSwift/Tests/Unit/StorageAPITests.swift'
+    unit_tests.source_files = 'FirebaseStorage/Tests/Unit/StorageAPITests.swift'
   end
 
   s.test_spec 'integration' do |int_tests|
@@ -82,11 +82,11 @@ Firebase Storage provides robust, secure file uploads and downloads from Firebas
       :osx => osx_deployment_target,
       :tvos => tvos_deployment_target
     }
-    int_tests.source_files = 'FirebaseStorageSwift/Tests/Integration/*.swift'
+    int_tests.source_files = 'FirebaseStorage/Tests/Integration/*.swift'
     int_tests.requires_app_host = true
-    int_tests.resources = 'FirebaseStorage/Tests/Integration/Resources/1mb.dat',
-                          'FirebaseStorage/Tests/Integration/Resources/GoogleService-Info.plist',
-                          'FirebaseStorage/Tests/Integration/Resources/HomeImprovement.numbers'
+    int_tests.resources = 'FirebaseStorageInternal/Tests/Integration/Resources/1mb.dat',
+                          'FirebaseStorageInternal/Tests/Integration/Resources/GoogleService-Info.plist',
+                          'FirebaseStorageInternal/Tests/Integration/Resources/HomeImprovement.numbers'
     int_tests.dependency 'FirebaseAuth', '~> 9.0'
   end
 end

+ 9 - 0
FirebaseStorage/CHANGELOG.md

@@ -1,5 +1,10 @@
 # 9.0.0
+- [changed] The FirebaseStorageSwift library has been removed. All of its APIs are now included
+  in the FirebaseStorage library. Please remove references to FirebaseStorageSwift from Podfiles and
+  Swift Package Manager configurations. `import FirebaseStorageSwift` should be replaced with
+  `import FirebaseStorage`.
 - [changed] Backported `StorageReference` async/await APIs to iOS 13, etc. (#9483).
+- [changed] The global variable `StorageErrorDomain` is restored for Swift only.
 
 # 8.15.0
 - [deprecated] The global variable `FIRStorageErrorDomain` is deprecated and will
@@ -8,6 +13,10 @@
 # 8.5.0
 - [fixed] Fixed an issue where Storage could not connect to local emulators using
   http (#8389).
+- [added] Added four APIs to augment automatically generated `async/await` APIs. See
+  details via Xcode completion and at the
+  [source](https://github.com/firebase/firebase-ios-sdk/blob/96d60a6d472b6fed1651d5e7a0e7495230c220ec/FirebaseStorageSwift/Sources/AsyncAwait.swift).
+  Feedback appreciated about Firebase and `async/await`. (#8289)
 
 # 8.3.0
 - [changed] Removed usage of a deprecated GTMSessionFetcher method (#8294).

+ 0 - 0
FirebaseStorageSwift/Sources/AsyncAwait.swift → FirebaseStorage/Sources/AsyncAwait.swift


+ 0 - 0
FirebaseStorageSwift/Sources/Result.swift → FirebaseStorage/Sources/Result.swift


+ 1 - 1
FirebaseStorageSwift/Sources/Storage.swift → FirebaseStorage/Sources/Storage.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 import FirebaseCore
 import FirebaseCoreExtension
 import FirebaseAppCheckInterop

+ 0 - 0
FirebaseStorageSwift/Sources/StorageComponent.swift → FirebaseStorage/Sources/StorageComponent.swift


+ 1 - 1
FirebaseStorageSwift/Sources/StorageConstants.swift → FirebaseStorage/Sources/StorageConstants.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 @objc(FIRStorageTaskStatus) public enum StorageTaskStatus: Int {
   case unknown

+ 1 - 1
FirebaseStorageSwift/Sources/StorageDownloadTask.swift → FirebaseStorage/Sources/StorageDownloadTask.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * StorageDownloadTask implements resumable downloads from an object in Firebase Storage.

+ 4 - 1
FirebaseStorageSwift/Sources/StorageError.swift → FirebaseStorage/Sources/StorageError.swift

@@ -13,7 +13,10 @@
 // limitations under the License.
 
 import Foundation
-import FirebaseStorageObjC
+import FirebaseStorageInternal
+
+// The error domain for codes in the StorageErrorCode enum.
+public let StorageErrorDomain: String = "FIRStorageErrorDomain"
 
 public enum StorageError: Error {
   case unknown

+ 1 - 1
FirebaseStorageSwift/Sources/StorageListResult.swift → FirebaseStorage/Sources/StorageListResult.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /** Contains the prefixes and items returned by a `StorageReference.list()` call. */
 @objc(FIRStorageListResult) open class StorageListResult: NSObject {

+ 1 - 1
FirebaseStorageSwift/Sources/StorageMetadata.swift → FirebaseStorage/Sources/StorageMetadata.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * Class which represents the metadata on an object in Firebase Storage. This metadata is

+ 1 - 1
FirebaseStorageSwift/Sources/StorageObservableTask.swift → FirebaseStorage/Sources/StorageObservableTask.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * Extends FIRStorageTask to provide observable semantics such as adding and removing observers.

+ 1 - 1
FirebaseStorageSwift/Sources/StorageReference.swift → FirebaseStorage/Sources/StorageReference.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * StorageReference represents a reference to a Google Cloud Storage object. Developers can

+ 1 - 1
FirebaseStorageSwift/Sources/StorageTask.swift → FirebaseStorage/Sources/StorageTask.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * A superclass to all Storage*Tasks, including StorageUploadTask

+ 1 - 1
FirebaseStorageSwift/Sources/StorageTaskSnapshot.swift → FirebaseStorage/Sources/StorageTaskSnapshot.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * StorageTaskSnapshot represents an immutable view of a task.

+ 1 - 1
FirebaseStorageSwift/Sources/StorageUploadTask.swift → FirebaseStorage/Sources/StorageUploadTask.swift

@@ -14,7 +14,7 @@
 
 import Foundation
 
-import FirebaseStorageObjC
+import FirebaseStorageInternal
 
 /**
  * StorageUploadTask implements resumable uploads to a file in Firebase Storage.

+ 0 - 0
FirebaseStorageSwift/Tests/Integration/Credentials.swift → FirebaseStorage/Tests/Integration/Credentials.swift


+ 0 - 0
FirebaseStorageSwift/Tests/Integration/StorageAsyncAwait.swift → FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift


+ 0 - 0
FirebaseStorageSwift/Tests/Integration/StorageIntegration.swift → FirebaseStorage/Tests/Integration/StorageIntegration.swift


Some files were not shown because too many files changed in this diff