Flutter iOS Cloud_FireStore提供错误

时间:2019-08-28 06:04:36

标签: ios flutter

cloud_firestore插件有问题,我在使用此插件之前创建了一个应用程序,并且运行良好,我下载了GoogleService-info,并在xcode中将此文档放在了info.plist旁边的Runner文件夹中,但是当我尝试时与一个新项目一起工作会抛出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)

1 个答案:

答案 0 :(得分:0)

您可能添加了不带Xcode的文件:

  1. 在Xcode中打开ios项目
  2. GoogleService-info拖放到Runner / Runner中 enter image description here
  3. 文件ios/Runner.xcodeproj/project.pbxproj需要由Xcode自动更改。