Created
October 13, 2015 08:38
-
-
Save RawToast/86a70a34c1b4fe693e6e to your computer and use it in GitHub Desktop.
Catch everything iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) { | |
int retVal = -1; | |
@autoreleasepool { | |
@try { | |
retVal = UIApplicationMain(argc, argv, nil, nil); | |
} | |
@catch (NSException* exception) { | |
NSLog(@"Uncaught exception: %@", exception.description); | |
NSLog(@"Stack trace: %@", [exception callStackSymbols]); | |
} | |
} | |
return retVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes this can be a useful starting point for when everything goes wrong and :)