From efe6442e5d3d856e95f4a30b718628cfe8639773 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Thu, 3 Oct 2013 00:08:08 +0200 Subject: [PATCH] Added more documentation to BITCrashManager - added information about which protocol allows it to add custom username/email/userid to crash reports - added information on how to handle crashes that happen during startup --- Classes/BITCrashManager.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Classes/BITCrashManager.h b/Classes/BITCrashManager.h index 93e933d1da..acae8c57a8 100644 --- a/Classes/BITCrashManager.h +++ b/Classes/BITCrashManager.h @@ -65,9 +65,10 @@ typedef NS_ENUM(NSUInteger, BITCrashManagerStatus) { detect new crashes, queues them if networking is not available, present a user interface to approve sending the reports to the HockeyApp servers and more. - It also provides options to add additional meta information to each crash report, like `userName`, `userEmail`, - additional textual log information via `BITCrashManagerDelegate` protocol and a way to detect startup crashes so - you can adjust your startup process to get these crash reports too and delay your app initialization. + It also provides options to add additional meta information to each crash report, like `userName`, `userEmail` + via `BITHockeyManagerDelegate` protocol, and additional textual log information via `BITCrashManagerDelegate` + protocol and a way to detect startup crashes so you can adjust your startup process to get these crash reports + too and delay your app initialization. Crashes are send the next time the app starts. If `crashManagerStatus` is set to `BITCrashManagerStatusAutoSend`, crashes will be send without any user interaction, otherwise an alert will appear allowing the users to decide @@ -81,6 +82,14 @@ typedef NS_ENUM(NSUInteger, BITCrashManagerStatus) { and the app could not react to any user input when network conditions are bad or connectivity might be very slow. + It is possible to check upon startup if the app crashed before using `didCrashInLastSession` and also how much + time passed between the app launch and the crash using `timeintervalCrashInLastSessionOccured`. This allows you + to add additional code to your app delaying the app start until the crash has been successfully send if the crash + occured within a critical startup timeframe, e.g. after 10 seconds. The `BITCrashManagerDelegate` protocol provides + various delegates to inform the app about it's current status so you can continue the remaining app startup setup + after sending has been completed. The documentation contains a guide + [How to handle Crashes on startup](HowTo-Handle-Crashes-On-Startup) with an example on how to do that. + More background information on this topic can be found in the following blog post by Landon Fuller, the developer of [PLCrashReporter](https://www.plcrashreporter.org), about writing reliable and safe crash reporting: [Reliable Crash Reporting](http://goo.gl/WvTBR)