You need to add UncaughtExceptionHandler and remove caches.
void myHandler(NSException *exception)
{
.....
exit(0);
}
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSSetUncaughtExceptionHandler(&myHandler);
....
}
so myHandler is called when an unhandled NSException is thrown
source
share