停止跟踪iOS

时间:2017-06-12 07:04:06

标签: ios objective-c xcode crashlytics

我刚刚整合了Crashlytics with iOS,这是非常简单的整合步骤。我在didFinishLaunchingWithOptions开始使用代码[Fabric with:@[[Crashlytics class]]];开始跟踪崩溃问题,并开始跟踪。

在应用程序中的某个时刻我想停止跟踪Crashlytics所以我该怎么做?这有什么代码吗?有一种方法可以停止从Crashlytics中的在线仪表板进行跟踪,但我希望从Code。

开始

寻找建议和帮助。 感谢。

2 个答案:

答案 0 :(得分:1)

Xcode调试器不允许Crashlytics处理崩溃报告。

如果您的设备已连接到Mac,XCode的调试器也会介入。因此,请在测试前断开设备。

To make sure a crash is reported during your simulator testing:
Launch simulator
Press stop
Launch your app and force a crash
Relaunch the app from simulator
See the crash report in the web dashboard

Reference

答案 1 :(得分:1)

Mike from Fabric here. I believe you're looking to kill an active Fabric session once it's been started with the same launch/session of the app.

In that case, there is not a way to kill the SDK session. I'd recommend wrapping the Fabric init in a conditional call or boolean check to see if Fabric should be initialized or not.