添加 Firebase iOS SDK(4.3.0 或更高版本)或 Unity 插件(6.15.0 或更高版本),然后构建,运行,然后让您的应用程序崩溃

Add the Firebase iOS SDK (4.3.0 or higher) or Unity Plugin (6.15.0 or higher), then build, run, and crash your app

我正在尝试与 Firebase Crashlytics 集成。

我按照 here 所述添加了 运行 脚本。然后安装 pods:

pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'

我配置了 Firebase API:

FirebaseApp.configure()

我运行 应用程序。控制台上的消息似乎没问题。

但是当我在 firebase 控制台中打开 Crashlytics 选项卡时。我只收到问题标题中的消息。

这是我的 Podfile.lock:

- Firebase (6.33.0):

在 Debug 模式下将 dSYM 添加到调试文件中。

dSYM (Debug Symbolification) is needed to reverse symbolication of the code in crash.

消息指出您需要让您的应用程序崩溃。在 事件上添加崩溃代码,而不是在应用启动时 :

fatalError()

注意: 未报告崩溃:

  1. If Xcode is connected to the app.
  2. It only get reported in the next app launch.

步骤:

  1. Run the app using Xcode.
  2. Disconnect it from Xcode by clicking stop.
  3. Re-launch the App manually.
  4. Crash your app.
  5. Re-launch it so the crash get reported.

信息。从 api 文档收集。