Crashlytics iOS - log caught exception

Magnus picture Magnus · Apr 16, 2014 · Viewed 12.5k times · Source

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?

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

Answer

Mike Bonnell picture Mike Bonnell · Jan 12, 2016

Mike from Crashlytics and Fabric here.

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

[CrashlyticsKit recordError:error];

or

Crashlytics.sharedInstance().recordError(error)

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.

See Documentation