应用崩溃[FIRApp appWasConfiguredTwice:usingOptions:]

时间:2020-08-19 07:53:56

标签: ios firebase crashlytics

iOS扩展-致命例外:com.firebase.core默认应用已配置。

enter image description here

1 个答案:

答案 0 :(得分:0)

从该消息很明显,您的应用两次调用了FIRApp's configure函数。它应该调用一次。最好的调用位置是在func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool中的AppDelegate中。

为了确定从哪里调用它,可以使用两种方法。

  1. CMD + Shift + F并搜索configure关键字并从结果中识别。
  2. 添加一个符号断点,当配置函数被调用时,应用将暂停。请参见下面的屏幕截图:

Screenshot 1 Screenshot 2