Identify Crash log in iOS - ios

We have used several 3rd party crash logs in past like crittercism, Flurry, crashlytics etc. There're some crash logs in which we are not able to get exact crash point. So, do we have any tool available which provides exact crash point ?
OR which is best 3rd party crash log tools in iOS ?

Depending on the type of crash, stack traces may not contain any of your apps code, which is perfectly fine.
Especially when dealing with memory issues, the crash will happen somewhere completely different than where the bug in your application is. You will have to check for the Exception Type information in the crash log and then go from there.
The following documents can help you understand crash reports better:
https://developer.apple.com/library/ios/technotes/tn2151/_index.html
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
You should also use the tools Xcode provides to make sure there are no easy to detect bugs by using the Instruments Leaks tool, use the Analyze build feature in Xcode, or the Address Sanitizer check in Xcode 7.

Related

iOS Framework and Crash reporting

I'm developing an iOS framework and I like to be able to log data for posible crashes. I don't like to use external logging framework like Fabric to avoid conflicts with the main app that uses the framework. Which should be the best approach to do that. Can I use the dsym files in any way? Thanks a lot.
If I correctly understand what you're trying to achieve; you'd like to get crash reports from apps which link against your framework however only if they occurred directly as a result of the code provided by the framework?
This would be fairly difficult to achieve, as crashes occur at the process level rather than your framework having its own isolated 'section' or subprocess.
You could potentially catch some Objective-C exceptions by writing code to detect and prevent them from resulting in crashes, however major faults such as EXC_BAD_ACCESS would not be 'detectable' without processing the app's crash logs.
If you decide to analyse the crash logs themselves (e.g. when the app next launches), this would require the dSYM of the specific application and build to symbolicate the crash. Once you've symbolicated the crash, you'd then need some logic to determine if the crash was likely due to your framework or not. If you receive crash reports from multiple apps, you'd need to ensure that you use the correct dSYM for each log, as this will very likely be different for each one.

Share iOS app crash report with developer

My boss has an individual Apple developer program. Normally when there are error in his apps, he would just tell me the errors, but lately the errors are too many, so now he just sent me the crash report from Flurry.
The thing is, it is not symbolicated. And when I tried to symbolicate it in my computer, the app is not the same archive with the one sent to Apple, so I didn't get anything. And this also poses a problem when there are many archives.
This symbolicate process is confusing to me. Is there an easy way to find the errors and symbolicate it using my XCode for the apps published using my boss' XCode?
Using flurry or any other way (Apple's own Crash report?)
Thanks a bunch.
There is no way you can pass a core dump to get your hands on it to debug, but there are several tools can help gather the crash report for you.
I am using Crashlytics to collect the crash report, and it will send you email to let you know a new crash happened or a regression, beatiful UI design and already decoded the symbols for you. It's very easy to setup and absorb. Just check it out.
Crashlytics is bundled with Fabric, including many new features you may need in the future.
Apple recently announced its own crash reporting tool, you could also consider. But I am still stick to Crashlytics since there is no reason not to...
If you know the trick, you can decode the symbols on your own, just search how to do it.
I can recommend crashlytics of fabric.io.

How crash reporting tools really work

I know there are many crash reporting tools available in the market to collect crashes from the real devices. I would like to know how a crash reporting tool really collects its data?. Does it collect a crash report from the operating system once the crashed application launched again? or Does iOS allows the crash reporter to collect the data as soon as the app is crashed?.
It will be really great if somebody can explain what happens after an app is crashed or point me to right place.
System crash logs are located at /private/var/mobile/Library/Logs/CrashReporter/ and (as far as I know) can't be accessed by the app directly. Most crash reporting tools will try to catch crashes and generate their own crash reports which will get stored locally and sent to a server for symbolication and processing.
You can take a look at the source for KSCrash, an open source crash reporting tool, to see how crashes are caught/stored/reported.

Diagnosing non-reproduceable bugs?

I've got a very basic, but terribly important and potentially impossible question: how does one go about diagnosing a bug you can't reproduce?
Twice now, I've gotten emails from people asking about app-crashing bugs that I can't reproduce. Non-modified iPhones, current software, tried reinstalling and hard resets, etc. It crashes every time for them, and it works perfectly for me, (not to mention it got approved for the App Store in the first place so I'm clearly not the only one). I had always understood that the consistency of the devices was one of Apple's big selling points for developers, but that also makes it hard to pinpoint what's different about their device from mine...
So, aside from "just keep testing," is there a trick-of-the-trade among programmers for this sort of thing? Some function of the iPhone simulator that lets you test not just different screen sizes but different hardware configurations, etc? Or am I just out of luck, and stuck telling my customer "sorry, it works for me"?
Can anyone share their experiences or suggestions about this?
You should probably start by installing a crash reporting tool like Crashlytics. This may give you the clues you need or at least help you narrow down where to put additional crash logging.
While the iTunes Connect crash reports can be helpful, the crash reporting services like Crittercism are more user-friendly and full-featured. Crittercism has been very helpful in tracking down infrequently-occurring crashes for my apps and can be used no-charge. (I have no association with Crittercism.)
In iTunes Connect you can access crash reports. These crash reports include call stacks that you can symbolicate and then you can see where it actually crashes.
Here is some good instructions for symbolicating: symbolicating-iphone-app-crash-reports
It's important to keep your dsym files from each build & archive safe. You can use them to symbolicate crash reports, to see details of the crash. Users will have to opt in to submitting crash reports though. I think this is a feature of iTunesConnect.

Generating crash reports on Cocoa Touch apps

That probably sounds a lot worse than it is, but here's my question.
I am dealing with a crash on an actual device, that one of my tester's is using. At the moment, there is no way to discover what is causing the crash. I can not reproduce it on the simulator. However, on the simulator when something crashes I get log info about it in the output window. But I don't want to keep testing with the device connected.
Is it possible to log crash exceptions, etc into a file when things crash. I know certain apps can do it, but I am not sure how?
Any info would be appreciated.
There are generally two ways to do that:
Someone get the tester to send you the crash reports, that iOS created on the device. This is usually too tricky for end users, so the next suggestion works better. That's also why I am not describing how to do that :) But you'll find plenty of documentations on that process.
Integrate a crash reporting library, that catches the crashes and allows you to receive them in various ways. You should not implement your own global crash exception handler, things are just too complex to do it right (even though other people will tell you otherwise). Also crashes caused by exceptions are only one type of crashes.
There are multiple open source libraries out there, the safest one to use is anything based on PLCrashReporter. Most others use private or undocumented iOS APIs, or are not async-safe, which basically means those can destroy app data or make the crash even worse. See this blog post about the topic: http://landonf.bikemonkey.org/code/crashreporting/Reliable_Crash_Reporting_1.1.20130119.html
The following linked answer shows some of the available options on how to add logging to your app and also various options on how to receive crash reports for test version and also once the app is released: Including custom data into iOS crash dumps
If you're open to using a third party service, I use https://www.crashlytics.com. Makes debugging crashes from user devices painless.

Resources