Best way to handle crash reporting on device?

What are the recommended ways for handling crash reporting on a released app? Are there any 3rd party tools that make crash reporting easy to implement?

I’ve seen the documentation for crashes here: https://www.defold.com/ref/crash/ . But I don’t really understand how to use it, and there don’t seem to be any helpful examples.

I know how to view crash files when defold editor crashes, but I need a solution specifically when the app crashes on a phone after installing a .ipa file.

The crash.* functions are actually not that complex to work with. If a crash occurs the engine will write crash data to disk. What you typically do if you wish to track crashes is that you call crash.load_previous() when the app is started. If the function returns nil it means that the app didn’t crash on the previous run but if you get a crash handle back you can use it to read the data and send it to some service for parsing (don’t forget to release/delete the crash after it’s sent!).

My Google Analytics lib has built in crash reporting:

4 Likes

Awesome, thank you for the example!