iOS 上的 Firebase 应用检查在构建时崩溃

Firebase app check on iOS get crash on build

在我添加包 firebase_app_check: ^0.0.3

之前,每个想法都运行良好

该应用程序在 iOS 的 运行 建筑项目中崩溃,在 Android 上运行良好。

Andoird 应用程序可以连接到 firebase,但是,iOS 不能这样做,因为请求没有经过身份验证。

颤振:2.5.2

详细

CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Finding Podfile changes
      A firebase_app_check
      - Flutter
      - cloud_firestore
      - cloud_functions


 Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
    cloud_firestore: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
    -> Fetching podspec for `cloud_functions` from `.symlinks/plugins/cloud_functions/ios`


 Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.9.1/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.9.0/Firebase.podspec.json


[!] CocoaPods could not find compatible versions for pod "Firebase/AppCheck":
      In Podfile:
        firebase_app_check (from `.symlinks/plugins/firebase_app_check/ios`) was resolved to 0.0.3, which depends on
          Firebase/AppCheck (= 8.9.0)

    Specs satisfying the `Firebase/AppCheck (= 8.9.0)` dependency were found, but they required a higher minimum deployment target.




.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

我想,您的 CocoaPods 设置要崩溃了。因为 firebaseAppcheck 版本问题。您将不得不手动删除 Specs 存储库的任何本地副本并重新克隆 Specs 存储库的新版本。您可以使用以下命令执行此操作:

在终端执行以下命令即可解决

1. Go to /ios folder inside your Project.
2. Delete Podfile.lock (YourPoject/ios/Podfile.lock)
3. Delete Project.Workspace file.
3. Run pod install --repo-update (Make sure your cd into the iOS directory of the flutter app)
4. Run flutter clean
5. Once complete, rebuild your Flutter application: flutter run

如果上述步骤不适用于您的项目。你也可以试试这个:

 1. change the higher minimum deployment target (at least 11). 
 2. Just Follow the above steps.

platform :ios, '11.0' 添加到 Podfile。

AppCheck requires iOS 11.