I try to find any solution to send non fatal exception on iOS with crashlytics service. Is that possible? How to achieve this?
In addition to automatically reporting your app's crashes, Crashlytics lets you record non-fatal exceptions and sends them to you the next time your app launches. Note: Crashlytics only stores the most recent eight exceptions in a given app session.
A non-fatal error is a failure in your application that didn't result in a crash for the user. In other words: the loss is recoverable, and the application can continue.
Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them.
Here's a couple of ways to disable Crashlytics while you are doing your debug builds! Use a different android:versionString for debug and release builds and then disable crash reporting from the Crashlytics web dashboard for the debug version. Wrap the call to Crashlytics.
https://docs.fabric.io/apple/crashlytics/logged-errors.html
Using the API You can record an NSError using this API:
[CrashlyticsKit recordError:error];
Crashlytics.sharedInstance().recordError(error)
Crashlytics introduced this functionality in Jan 2016 and published this blog post: https://www.crashlytics.com/blog/introducing-the-ability-to-log-nserrors
Implementation Details:
https://docs.fabric.io/ios/crashlytics/logged-errors.html
Very similar to what Crashlytics provides for Android where you have to use try/catch: http://support.crashlytics.com/knowledgebase/articles/202805-logging-caught-exceptions
Crashlytics also talks about why they do not support NSException, but NSError instead.
Answering an old question in case someone stumbles upon it as I did! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With