[英]How to programmatically disable CrashReporting in current Crashlytics (3.14.*) / Firebase (1.10.*) on iOS
I'd like to enable and disable Crash Reporting in my current iOS app programmatically.我想以编程方式在我当前的 iOS 应用程序中启用和禁用崩溃报告。 I'm using
我在用着
The official Firebase documentation at https://firebase.google.com/docs/crash/disable-sdk?hl=en tells me to use the following code: https://firebase.google.com/docs/crash/disable-sdk?hl=en的官方 Firebase 文档告诉我使用以下代码:
Crash.sharedInstance().crashCollectionEnabled = false
But this doesn't work / seems to be outdated as但这不起作用/似乎已经过时了
crashCollectionEnabled
propertycrashCollectionEnabled
属性I know I could write a custom exception handler and forward received exceptions on demand to Crashlytics, but I don't want to implement such a dirty solution.我知道我可以编写一个自定义异常处理程序并按需将收到的异常转发给 Crashlytics,但我不想实现这样一个肮脏的解决方案。
Does anybody know a clean way of enabling / disabling Crashlytics in a running iOS app?有人知道在运行的 iOS 应用程序中启用/禁用 Crashlytics 的干净方法吗?
for Fabric/Crashlytics: don't call this:对于 Fabric/Crashlytics:不要这样称呼:
Fabric.with([Crashlytics.self])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.