Crash firebase Swift

时间:2018-05-23 08:36:38

标签: ios swift firebase crash google-cloud-firestore

我正在使用Swift和Firestore制作应用程序,从昨天晚上开始执行时,我的应用程序崩溃了:

FirebaseApp.configure()

以下是错误消息:

  

2018-05-23 10:27:08.562176 + 0200 protoMeteoApp [51741:3501027] 4.9.0 - [Firebase / Analytics] [I-ACS023007] Firebase Analytics v.40009000已启动

     

2018-05-23 10:27:08.578312 + 0200 protoMeteoApp [51741:3501027] 4.9.0 - [Firebase / Analytics] [I-ACS023008]要启用调试日志记录,请设置以下应用程序参数:-FIRAnalyticsDebugEnabled(请参阅{ {3}})

     

2018-05-23 10:27:08.592866 + 0200 protoMeteoApp [51741:3500914] *由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'* - [__ NSPlaceholderDictionary initWithObjects:forKeys: count:]:尝试从对象[3]'

插入nil对象

首先抛出调用堆栈:

(
  0   CoreFoundation                      0x000000010925f1e6 
__exceptionPreprocess + 294

...... 

)
  

libc ++ abi.dylib:以NSException类型的未捕获异常终止

我尝试修复它创建一个新项目,再次下载“GoogleService-Info.plist”但它仍然崩溃。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

  • 可以将以下两个键添加到您的Info.plist文件中:

    1. FirebaseAppDelegateProxyEnabled设置为YES

    2. FirebaseScreenReportingEnabled设置为NO

  • 在使用Firebase之前,
  • 还将 Firebase应用配置到 didFinishLaunchingWithOptions 方法内的 AppDelegate.swift 文件中: FirebaseApp.configure()