在程序中常常会遇到崩溃,我们可以通过以下两种途径来捕获崩溃信息发送到我们的服务器;这两种途径会捕获不同的崩溃信号;
途径一:
void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler *);
Discussion
Sets the top-level error-handling function where you can perform last-minute logging before the program terminates.
途径二:
void (*signal(int, void (*)(int)))(int);
具体使用参考DEMO;
原文:http://blog.csdn.net/junjun150013652/article/details/44650457