Hello i am developing one ios application where i want to implement crashing reporting without using of any third party sdk or class i want to compose mail when my app will crash.
I have implemented NSSetUncaughtExceptionHandler(exceptionHandlerPtr)
into didFinishLaunchingWithOptions
and added Objective-C Code for its handler Here Code of my CrashReporting
.h file
volatile void exceptionHandler(NSException *exception);
extern NSUncaughtExceptionHandler *exceptionHandlerPtr;
and CrashReporting.m Code:
volatile void exceptionHandler(NSException *exception) {
// Do stuff
NSLog(@"App IS cCrAsSHsED %@",exception.description);
NSLog(@"App IS cCrAsSHsED %@",exception.callStackSymbols);
// Here i will Compose mail with error description and callStackSymbols.
}
NSUncaughtExceptionHandler *exceptionHandlerPtr = &exceptionHandler;
Its works fine but its not able to handle all type errors. how can i do same for Fatal Errors
and Signal Errors
into swift i have searched on Google but nothing found helpful for swift. Help will be Appreciate. Sorry for my bad english. Thanks.
This is not necessary. It sounds to me that you just want to see the crash reports. Apple has already built the Crash Report Service which will usually (if users did not deactivate it) deliver you the crash reports so you can analyze them.
Therefore it is not necessary to reinvent the wheel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With