After the project is online, if the online app crashes and the leader lets you deal with the problem, what do you do with it? The previous article mentions how to get crash files and parse crash files, and you can also integrate third-party crach frameworks such as friends, BUGHD, and Flurry in your project. The principle is to extract or encapsulate the crash log generated by the system, and then upload the encapsulated crash file to the corresponding service side for parsing and processing. The following is an in-app crash collection of your own implementation
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchOptions { Custom exception Handling Nssetuncaughtexceptionhandler (&uncaughtexceptionhandler); return YES;} void Uncaughtexceptionhandler (NSException *exception) { Nsarray *symbols = [Exception callstacksymbols];// Current Call stack information nsstring *reason = [Exception reason];//exception reason nsstring *name = [exception name];//exception name //Send Method 1. Store Local Next start send 2. Mail send (not line) NSLog (@ ">>1%@", symbols); NSLog (@ "-------------------"); NSLog (@ ">>2%@", reason); NSLog (@ "-------------------"); NSLog (@ ">>3%@", name);}
iOS Manual exception handling