Is it there a way to get the crash log that occurs on users' device? - iphone

Some users reported there are bugs when run my app on their device.
Is it there a way to get the crash log that occurs on users' device?
Or is there any solution to catch all crash log for cocoa touch?
Welcome any comment

If you want to reduce the amount of effort users need to go to, something like PLCrashReporter is quite good (I remember seeing a handy wrapper around it recently but I lost the URL).

The most common chrash logs are available through itunesconnect.
Also, the crash logs get synchronized to the Mac or PC. Maybe not the latest news, but this link should get you going: http://aplus.rs/apple/how-to-find-crash-logs-for-iphone-applications-on-mac-vista-and-xp/

You can check out apphance (http://apphance.com). It provides remote access to a test user device including logs written by developer, crash logs and more....
Disclaimer : I am CTO of company which created apphance and co-creator of it.

I use QuincyKit and really like it. It's free, and easy to install on your server.
If you want a hosted solution, I have heard a lot of praises for Crashlytics.com, but did not personally tested it (commercial product).
And forget iTunes Connect if you care about fixing all crashes. Often, you won't see crash happening in there (might be because users do not sync and many other reasons).

Related

Recognise an out of memory crash (IOS)

Our apps are live on the app store.
I wish to recognise crashes of out of memory that some users are getting.
I understand there is no way to 100% recognise an out of memory crash.
Is there any way to recognise these crashes(with a pretty large probability) by doing some logic in the applicationDidReceiveMemoryWarning? (I am not talking about finding it in xcode during development time, i am talking about code that will recognise the out of memory crash from actual users and will log something to file)
While I was looking for any service or library that give me OOM tracking, I could only find this article from Facebook engineering:
https://code.facebook.com/posts/1146930688654547/reducing-fooms-in-the-facebook-ios-app/
The idea is to deduce the reason why the app needs to be launch, checking different aspects (like if the app was at background, if there is an app/OS update,...).
Discarding all the other possible reason that can force the previous app exit, you can know if the reason is a background out of memory or a foreground out of memory.
It would be nice to have a library that implements the Facebook article procedure. But nowadays I couldn't find any, probably there is some reason that make this difficult or may be impossible to add it as an sdk.
If anyone knows any service, please share it with everyone with a comment or a new answer.
Edit:
I have discovered this github (https://github.com/jflinter/JRFMemoryNoodler) with an implementation of the Facebook post procedure. I haven't tried yet, but we will deploy it in our apps to try it.
Look out for the applicationWillTerminate message in your app delegate. This is called if you app is terminated by the system (due to e.g. low memory), but not if the user leaves the app in the usual way by pressing the home key. Note: if your app is in the background and memory runs out, your app gets killed without any messages being sent to it.
YMMV, especially with older versions of iOS, and it's worth researching to ensure that the above is accurate.
The images at this blog post are quite informative (although slightly dated).
For more info, see How to know whether app is terminated by user or iOS (after 10min background)
Firstly Analyse your application by clicking on the Product at the top menu bar of your Xcode and click on Analyse section it will show you the number of leaks on in the application and can take you to the place where leaks occurred. This is how you can find the memory leak and rectify it.
Secondly it above does not worked then see to the view controller where crash occurred and check whether you have left any object to release.
Hope this might help you to resolve your problem.

Is there a delay after which crash logs of an app are visible on iTunes Connect?

One of my apps is in the appstore and I got a call from one of our clients saying a specific feature in the application is consitently causing the app to crash. However, I don't see any logs in iTunes Connect rightnow. Is there a delay between the app crashing and the log being submitted? If so, how long does it usually take?
Thanks,
Teja.
You'd be better asking them to send you crash reports directly. If they sync their handset using iTunes there will be a copy on their PC/Mac.
Unfortunately it seems that people are syncing their phones less and less often. (Which means they never make it into iTC.) Also, not all of them make it into iTC. Apple aggregate them but there also appears to be some level of filtering. What they do is not documented.
This blog explains what I ended up doing with my apps.
You should use a service like Crittercism - They give you real-time crash reports. You could also use something open-source like PLCrashReporter if you want to implement the server yourself.
The delay really depends on how long it takes before the user syncs their device with iTunes. I believe after that it's pretty quick.
Also it's worth noting that iTunes Connect needs a few crash reports before it displays them.

iPhone crash reports

I want to implement something like what four square do when the application crashes it sends out the crash report to their developers. But I really do not know how this is achieved. Can someone please let me know how this works and the components needed to implement something like this.
I guess the iPhone stores the crash report internally so you need to access it and I read something about a dSYM file as well? I this all I need? How can you get access to the crash file to email it out?
Thanks a lot for any help you can give.
EDIT:: So flurry has been mentioned, is there anything else anyone can recommend to achieve this?
It would be much simpler and easier if you use some tools such as Flurry (flurry.com). They offers built-in crash report. For example, Flurry can catch uncaught exceptions and log it, and since it sends the log to their server, you can view it online just like the normal event analytics.
You can also check out Apsalar, which is another pretty robust iOS / Android analytics package. It used to be pretty expensive but is now free. It can be configured to do crash reports as well.

How do YOU handle crashes in your iPhone apps?

If been looking around the web and can't seem to find any good solutions to sending allowing your user to submit bug reports from your iPhone app.
How do you handle crashes and exceptions?
Do you send the error user-data to a server,
grab a log file from somewhere and attach,
or do you ignore it and pretend it never happened?
Anybody got any experience with this?
Update
I am aware of how to prepare you software testing it with Static Analysis, Leak Detection, User Testing etc.
But errors might still happen when a user (mis)using my software. Always assume your user is trying to break your software.
What I want to figure out is how (I, or rather the app) can provide me with useful data when/if errors happen. As they do even in top quality products – like my own ofc. :)
I'm looking anyone that has experience with allowing the use to send error reports, stack traces, logs etc. to see how they handle the problem.
Some people use built-in analytics like Flurry which will post exception data to Flurry's website which you can review later.
Also, Apple has a "crash log" reporting area on iTunes Connect, but I'm not sure if it works since I've yet to see something come through and I kinda doubt each and every person has run my apps flawlessly. Not saying I write poor code (hopefully), but not every device is created equal either so I have to imagine it has crashed at least ONCE. There's always the option of logging and sending to a server later though.
Most of the time though, if you give users your e-mail address within the app itself (like on an instructions or about screen), they will e-mail me about any issues. That's a little bit nicer since it gives you a chance to correct the issue before they hit the review forms on iTunes.
You can also try BugSense. It's free, realtime, error reporting for iOS
PS: I am one of the founders.
Crashes most of the time comes with problems of memory management. To test memory leaks and find in your code on to what areas you were leaking a memory. Use the Instruments if your using XCode.
In your XCode go to Run -> Run with performance tool -> Leaks.
You can check everything here when it comes to memory allocations.
Note: To avoid crashes, make sure you released objects correctly and check your scheduled timers as well.
Regards,
ZaldzBugz

Cocoa Touch best practice for capturing/logging/diagnosing crashes

As I get closer to releasing my first public iPhone app I'm concerned about catching crashes in the field. I'm curious to hear how others have gone about this.
I'm not sure what's possible outside of the debugger. Is all lost with an EXC_BAD_ACCESS or can I still catch it and get something useful into a log? Is the program main() the spot to put a #try/#catch?
Apple will collect all crashes for you, and if the user allows apple to gather the reports from his/her phone, you can see them inside iTunes Connect.
This is the kind of information I was looking for. I never found it with a search but saw it linked from another blog recently.
http://cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html