I need to access iphone crash log file via programmatically. I trying to write a crash report feature that when you launch the app after a crash, it will offer to send the crash report to the server. I can't find how to get the crash log within the app. I saw there is a framework that doing so (PLCrashReporter), however this framework is large and I don't need most of it's features. is any library or IOS code to read crash log file .
Check out http://quincykit.net/ for your self hosted php based solution, contains all you need. Or a hosted service, there are plenty out there right now.
Related
I raised the App on the App Store.
I've check in iTunes Connect, crash reports do not accumulate.
Currently using Xcode 4.4 and the App name CityOfOz.
I wonder~T.T.
Other tasks necessary to use crash reports?
How to accumulate based on the crash logs?
I will wait your kind response.
iTunes connect only shows crash reports after a specific group reached a threshold (the amount of crashes needed for that is unknown). Also the list can only be updated once a day. In addition it only shows crash reports if the user did allow to send anonymous data to be send to Apple when setting up the device. Most users don't allow that, hence you don't see any reports. Also before iOS 5.0 these reports would only be send to Apple when the device is synced with iTunes.
I listed some alternatives on how to get crash reports fast and reliably as part of the following answer: Including custom data into iOS crash dumps
As mentioned by Kemi, the crash reports section in iTunes Connect isn't particularly useful. These days most developers use a third party crash report tool.
In my experience, crashlytics (http://try.crashlytics.com) is one of the best solutions.
Is it possible to get the crash log from my app? I know that we can get the exception handler by NSSetUncaughtExceptionHandler, but I want to get the crash file which could be found by Organizer. I want to access that file and send to my server. Is there any supported SDK to do that?
Thanks!!
The popular service HockeyApp is based on open source software that has it's own client that lives in your app and a basic server to collect crash reports from your app.
Check out their github account for more information on setting it all up.
https://github.com/TheRealKerni/QuincyKit
There are quite a few tutorials on how to access crash reports using a computer, but what I would like my app to do is scan for crash reports (from itself) on startup--so that users can use my app to send me their reports. Is this possible?
PLCrashReporter is an open source crash reporting framework that can be added to an iOS App. Reports are generated in protobuf encoded format, which should allow an app to upload these reports to a server.
Take a look at these few resources that may have the solution you need:
https://testflightapp.com/
http://www.hockeyapp.net/
http://quincykit.net/
You can get them using your itunes connect account
When the user synchronizes their device using iTunes, crash reports are copied to a
directory on the user's computer. If the application was distributed via the App Store and
the user has chosen to submit crash logs to Apple, the crash log will be uploaded and the
developer can download it via iTunes Connect.
You can also use Crittercism which directly sends you an email once a crash happens.
Another proprietary (but free) framework you can use for crash reporting is Crashlytics.
I have place several NSLog() in my iOS application, is it possible to see all the logs later on my Mac that was generated when the app ran on iPhone handset even when iPhone was not connected with Mac.
Thanks
No. You can however redirect NSLog to a file, using something like this: http://blog.coriolis.ch/2009/01/09/redirect-nslog-to-a-file-on-the-iphone/
Then you can access the file via Xcode, or upload it with your app. File usage and privacy issues apply.
Keep in mind that NSLog is supposed to be turned off in published apps, so you may want to use a different logging app. A number of NSLog alternatives are available.
Unfortunately this is not possible.
The only thing that you can get is a Crash Log.
If you need a better logging system, I suggest to take a look to CocoaLumberjack, a very powerful logging framework that gives you the opportunity to save log in files and, eventually, send them to a server.
You also have many different levels like: log info, log error, log warning, etc...
You can view crash logs from your iPhone in the Organizer.
If you want to view your own log statements, you could consider TestFlight ( http://testflightapp.com ). They offer an SDK which includes features for remote logging.
I'm fairly certain that's not possible. The device needs to be connected to the Mac in order to run in Xcode's debug mode, and you need to be in debug mode to view the console, which contains your NSLogs.
There is a crash log for every crash that occurs on the phone, which is readable after connecting to your mac. These NSLog's don't appear in this log nor do they appear anywhere else in a (semi) permanent manner.
It's possible using custom macros and a custom class which will write each message in the documents directory in a file.
If the file sharing is enabled in the app you can later download them in iTunes.
Seeing the logs in mac might not be possible. But you can send the log to testflight using TFLog(). But you will need to distribute your app through testflightapp. And integrate the sdk. I think that is what you are looking for. try out - testflightapp.com
The crash log returned when your app has an error on iOS is wonderful however it would be 100 times better if it contained the console output from when your app started as part of the log. Is there a way to automatically have that information in the crash log, or have a semi-automatic system that testers could use when sending in crash logs?
I think you might want to take a look at http://apphance.com. It's exactly what you are looking for - including capability of sending problem reports from device by testers, including screenshots, you can track history of session including full console logs, you can even see crashes from out-of-memory problems which are otherwise difficult to get without physical access to the device. It's closed beta for now but soon it will be open for everyone. You can request access directly at the page.
Disclaimer: I am CTO of Polidea, company which is behind apphance and co-creator of the service.
#Medran i am not sure if this will help but if you can get the Brad Larsons videos on Advance iPhone App Development than there he says some thing about .dSYM file that will help you find the places where crash occurs. .dSYM file is made when you build your app using Xcode. See if you can find that file in your project folder its named something like this MYapp.app.dSYM