I'm using the following code to get crash reports from my iOS application:
void *frames[128];
int i,len = backtrace(frames, 128);
char **symbols = backtrace_symbols(frames,len);
NSMutableString *buffer = [[NSMutableString alloc] initWithCapacity:4096];
NSBundle *bundle = [NSBundle mainBundle];
[buffer appendFormat:@"PComp version %@ build %@\n\n",
[bundle objectForInfoDictionaryKey:@"CFBundleVersion"],
[bundle objectForInfoDictionaryKey:@"CIMBuildNumber"]];
[buffer appendString:@"Uncaught C++ Exception\n"];
[buffer appendString:@"Stack trace:\n\n"];
for (i = 0; i < len; ++i) {
[buffer appendFormat:@"%4d - %s\n",i,symbols[i]];
}
This will only give information about the current thread? How could I get this stack trace for all threads?
Locate Crash Reports and Memory Logs on the DeviceOpen the Analytics & Improvements section of Settings on the device. See Share analytics, diagnostics, and usage information with Apple. Tap Analytics Data. Locate the log for your app.
Connect your iOS to your computer with a USB or Lightning cable. Go to Window > Devices and select your device from the list. Click the "up" triangle at the bottom left of the right hand panel. All logs from all apps on the device will be displayed here.
CrashReporter Key : An anonymized per-device identifier. Two reports from the same device contain identical values. This identifier is reset upon erasing the device. Beta Identifier : A unique identifier for the combination of the device and vendor of the crashed application.
Take a look at this question.
How To Loop Through All Active Thread in iPad app
The most voted response actually explains what you need to do.
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