【问题标题】:Flutter ios cloud_firestore giving errorsFlutter ios cloud_firestore给出错误
【发布时间】:2019-08-28 06:04:36
【问题描述】:

我的 cloud_firestore 插件有问题,我之前用这个插件创建了一个应用程序,它运行良好,我下载了 GoogleService-info 并在 xcode 中我把这个文档放在 runner 文件夹中,在 info.plist 旁边,但是当我尝试处理一个新项目会抛出 7 个异常,然后应用程序中的屏幕变黑并退出。

launching lib/main.dart on iPhone Xʀ in debug mode...

Xcode build done. 17.8s

Configuring the default Firebase app...

*** First throw call stack:

0 CoreFoundation 0x0000000114d498db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x00000001142ecac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000114d49735 +[NSException raise:format:] + 197
3 Runner 0x000000010f4ccbfa +[FIRApp configure] + 138
4 Runner 0x000000010f99ebd6 -[FLTCloudFirestorePlugin init] + 214

5 Runner 0x000000010c96176c +[FLTCloudFirestorePlugin registerWithRegistrar:] + 300

6 Runner 0x000000010c343fb0 +[GeneratedPluginRegistrant registerWithRegistry:] + 112

7 Runner <…>

Error connecting to the service protocol: HttpException: , uri =

Exited (sigterm)

【问题讨论】:

    标签: ios flutter


    【解决方案1】:

    您可能在没有 Xcode 的情况下添加文件:

    1. 在Xcode中打开ios项目
    2. 在Runner/Runner中拖放GoogleService-info
    3. 文件ios/Runner.xcodeproj/project.pbxproj需要Xcode自动修改。

    【讨论】:

    • 感谢您的回答 :)。我一直这样做,但只有一个项目运行良好,在所有其他项目中,都给我抛出错误
    • 如此简单!为此非常感谢。此答案应标记为正确答案
    猜你喜欢
    • 2019-05-29
    • 2021-01-29
    • 1970-01-01
    • 1970-01-01
    • 2021-12-22
    • 2021-09-26
    • 2022-11-03
    • 2020-04-01
    • 1970-01-01
    相关资源
    最近更新 更多