问题
We are in the process of evaluating a 3rd party solution or custom solution for our iOS app for crash reporting. We are looking at Crashlytics, BugSense, Testflight. They all seem to serve the purpose i.e. live crash reporting. Also, we have been looking at custom solution implementation along the lines of Xcode 4.2 debug doesn't symbolicate stack call
2 questions:
- Does a 3rd party solution (Crashlytics, BugSense etc) provide an advantage over a custom solution when the only purpose that we want to use it for is crash reporting?
- How much of a functionality can we add to the custom exception handler e.g. if I want to post the stacktrace to a server with HTTP post, can I do it in the exception handler or do I need to wait until my application launches the next time to send the logs? How soon should an exception handler exit?
Thanks, Hetal
回答1:
You shouldn't do your own crash reporting solution, but use an existing solution because writing a reliable and safe crash reporter is hard. Landon Fuller, developer of PLCrashReporter, explains why in this article: Reliable Crash Reporting
In general running any non async-safe code once the crash occurred, should be avoided at any cost! This means that any Objective-C code has to be avoided at all. This also means that you crash reports should only send to your server at the next launch. You should also not rely on a 3rd party framework using PLCrashReporter per default, as whatever the framework does in addition should be implemented done async-safe too.
Writing your own exception handler will hardly ever be as detailed, good and reliable as anything based on PLCrashReporter.
In addition to your mentioned 3rd party solutions, there is also the open source solution QuincyKit (based on PLCrashReporter with a companion PHP based basic server solution) and HockeyApp, which can also be used with the QuincyKit client. (Note: I am one of the developers of these two solutions)
来源:https://stackoverflow.com/questions/11832203/crash-analytics-and-reporting-for-ios