iOS Crash Logs

iOS device logs are not being generated when application crashes.

Checked under Window option of Xcode -> Window -> Devices and Simulators -> View Device Logs,
but didn't find any crash logs.

But when I use any predefined methods like below then it's generating crash logs
strcpy(0, "bla");
@throw NSInternalInconsistencyException;

Please suggest a way to fix it.

Sometimes, app terminations are not crashes. For example, an app using too much memory doesn't crash, but the system terminates it and generates a jetsam event log instead. If the app can't be verified, such as for enterprise app deployments, then the system won't launch the app at all. Diagnosing Issues Using Crash Reports and Device Logs covers all of these situations — look for crash logs, look for jetsam logs, and if you find neither, begin looking at the system console for additional clues.
Actually it's not a memory related issue, I also tried making a crash by adding below code to check crash reports.

   NSArray *arrayStrings = [NSArray arrayWithObject:@"Test"];
NSString *element = [arrayStrings objectAtIndex:10];

for these kind of issues crashes are not being generated.
Are you attached with Xcode? It will prevent crash reports from being generated.

Beyond that, this isn’t something I’ve experienced. If you create a new app from one of the built-in templates and then modify it to crash (without using any third-party), does it exhibit the same problem?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
No, it's not attached with xcode as I have generated IPA and installed it on device and crashed app, then checked for logs.

Actually when I have created new application from existing templates and reproduced same crash then it's generating crash logs, but when I try for same in my application then it's not generating crash logs.

Actually when I have created new application from existing templates

That’s always a good diagnostic technique.

and reproduced same crash then it's generating crash logs, but when I
try for same in my application then it's not generating crash logs.

Is your main app using a third-party crash reporter? It’s not uncommon for them to interfere with the Apple crash reporter.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

Is your main app using a third-party crash reporter?
Yes, it uses AppCenter , but removed framework, all related code from code and checked for crash logs.
Still same issue persists.
Given that you get a crash report when you create a new app from one of the built-in templates, we know that crash reporting is working in general. Thus there’s something specific about your main app that’s causing this problem. Honestly, I suspect that you’ve not done all that’s necessary to remove your third-party crash reporter. I recommend that you take another pass at that.

If that doesn’t work, the next step is to start gutting your app. Replace your main function with one that crashes and then start removing code and libraries. Eventually crash reports will start working, at which point the last thing you removed is the cause of this problem.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
iOS Crash Logs
 
 
Q