Crashlytics iOS - 日志捕获异常 [英] Crashlytics iOS - log caught exception

查看:387
本文介绍了Crashlytics iOS - 日志捕获异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一种方法来记录Crashlytics Android SDK中的自定义捕获异常,但是我找不到类似的iOS SDK。有没有办法在iOS上用Crashlytics记录捕获的异常?

I found a way to log custom caught exceptions in the Crashlytics Android SDK, but I can't find anything like that for the iOS SDK. Is there a way to log a caught exception with Crashlytics on iOS?

请参阅Android说明: http://support.crashlytics.com/knowledgebase/articles/202805-logging-caught-exceptions

See Android explanation: http://support.crashlytics.com/knowledgebase/articles/202805-logging-caught-exceptions

推荐答案

Mike来自Crashlytics和Fabric在这里。

Mike from Crashlytics and Fabric here.

您现在可以在iOS,tvOS或OS X应用程式中撷取已记录的NSErrors。您要使用:

You can now capture logged NSErrors in your iOS, tvOS, or OS X app. You want to use:

[CrashlyticsKit recordError:error];

Crashlytics.sharedInstance().recordError(error)

每个用户会话记录的NSErrors数。这些仅在应用重新启动时发送。记录的错误错误按错误域和代码分组。这意味着错误问题可能跨越许多不同的调用网站。

This will let you capture a fair number of logged NSErrors per user session. These are only sent on app relaunch. Logged errors errors are grouped by the error domain and code. This means error issues can span many different call sites.

请参阅文档

这篇关于Crashlytics iOS - 日志捕获异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆