Is there a way to read the crash log of an app at runtime [duplicate] - ios

This question already has answers here:
iOS crash log catch, debug info.. Catch and send via email to the Dev team
(9 answers)
Closed 8 years ago.
Is there a way to read the crash log of an app at runtime?
What I mean is this, have some method running at the first beginning of an app that will monitor if the app crashed last time. If so, it will read the crash log, attach it to an email and send it to me.
I know apple has that functionality on iTC but it just shows crashes for a large amount of users and I want to know about all crashes that may be happening without my knowledge. You know, users don't give a crap and will never warn you.
Is this possible?

You could try using the TestFlight SDK. If the app crashes a crash report can be read on the website.
https://testflightapp.com/sdk

Related

Is there way to get the stack trace of an iOS device that running your app?

I have an iOS app that I side-loaded to 5 of my testers onto their phones.
1 of them reported that the app is crashing, but I can’t seem to reproduce it.
He also can’t seem to reproduce it either.
Is there way to get the stack trace of an iOS device that running your app?
Is there away that he can sent his logs to me via email or some kind of cloud service like Firebase?
Should I look into any technology?
If you get the person to bring their phone to you, you can plug it in to XCode and read the logs that way, however, you won't be able to go back and view logs from days past. But, if they plug in and run the app and are able to recreate the crash, then you'll have it right there.
It is possible to write code in your app to write log data to a file that you save on your phone. To keep from filling up your phone storage, I delete that file when the app is closed and create it new when the app is started. Then, I created a method in the app to contact support, and I attach the log file to the e-mail. This works great as long as they click the contact support button before closing out of the app. However, if the app crashes, then you could code it to keep the log file if it already exists on the next startup.
Keep in mind that once you start sending the log data to a file, it will no longer show up in your console when you are debugging your app, unless you code some sort of easy switch to flip to turn that feature on or off.

unable to process application info.plist validation due to a general error? [duplicate]

This question already has answers here:
Unable to process application info.plist validation at this time due to a general error (1095)
(10 answers)
Closed 9 years ago.
I know this question has been asked multiple times before and i looked into all answers.
I just want to confirm , anybody facing this issue today ?
Has someone submitted to app store today or yesterday without facing this issue . Just to make sure if others are facing this issue(seems to me due to apple servers).
This is clearly an Apple server issue, not an Xcode/iOS/OSX issue. Just wait patiently and Apple's servers will catch up to the traffic, or solve whatever issues they're having at their end.
If you're anxious, feel free to just sit there and restart Xcode until it works - but it's not restarting Xcode, only the time you waste that's solving the issue.
While you're waiting, run your apps in Instruments and solve some performance issues
Unable to process application info.plist validation at this time due to a general error (1095)

Send app crash logs/regular app logs [duplicate]

This question already has answers here:
How to get iPhone crash log from customers?
(4 answers)
Is there a way to have our own app to upload its crash repot?
(4 answers)
Closed 9 years ago.
I want to implement "Report a problem" button in my app, which sends me the logs of the user's app as a text file (by email), so I can see what is the problem.
Is there any way to do so?
Thanks in advance!
I have used QuincyKit to capture and retrieve crash logs from customers. It takes a bit of time, but once you get it set up, it works very well.
Crashlytics is definitely the way to go with crash logs. It is by far the easiest to implement and provides excellent information for solving problems as well as allows remote logging. It also means you will get the crash logs even without your users emailing them to you.
I'd still include a report a problem button that simply allows the user to email you if they have a problem specifically, but generally they won't for crashes.

Log method entry and exit Objective C [duplicate]

This question already has answers here:
How to log all methods used in iOS app
(8 answers)
Closed 10 years ago.
I have used NSObjCMessageLoggingEnabled for logging the method entry and exit at run time for an application. THe logs has been saved in /tmp/msgSends-pid. Whre pid is process ID.
I want to save same logs while running an app on the iPhone device instead of running app on emulator using Xcode.
Please let me know if you require more details to help me out.
NSObjCMessageLoggingEnabled appears in Apple's technical note about Mac OS X debugging magic, but not the one about iOS debugging magic. It appears that it is unavailable on iOS.
Apparently, you can log Objective-C method entries and exits using a DTrace probe in Instruments.

Including custom data into iOS crash dumps

Hello Stack Overflow !
A simple question for you : is it possible to embed custom error data into automatically generated iOS crash dumps I get from my users when my app crashed on their device ?
For example : My SQlite database won't operate for some reason (say, the database file is corrupted).. I cannot recover from this error, so I throw an exception, and embed in the exception the detailed sqlite error message. The problem is, the crash dump of the application won't contain the exception message, so it's not easy to know under which conditions the application crashed.
Does anyone know a way to put things into the crash dump report ? Or do you have any other recommended way of reporting production crashes to the developper ?
Thanks !
No, you cannot ad your own data into the crash reports. It is also not possible to access iOS generated crash reports automatically because of the sandbox.
So my suggestion is as follows:
For logging your own data, use Cocoalumberjack. It is much faster than NSLog or other logging frameworks out there and has an option to log your messages into a file. Now when an exception occurs, or whenever else you want to, log that into a file. But if your app crashes right at a point where you add something into a log file, it most likely will be missing, since the app crashed the very same moment.
So its rather impossible to safely catch the exact SQL statement. But the crash report should give you enough information to understand what is happening, with the addition to what you logged of being done before. E.g. you could log the search string used in the SQL way before the SQL is being executed.
In general try not to log too much.
For catching crash report you should nothing else than a solution based on the open source framework PLCrashReporter, which can safely catch crashes, also when you app is already in the app store! Exception catching is not recommended, check this article to see why!
iTunes Connect offers you to view some crash reports too, but it takes up to 2 weeks to see some, but by far not all as e.g. pointed out by the Camera+ developers. So you better use your own solution.
PLCrashReporter will send you standard apple formatted crash reports, ready for symbolication, so you know where the crash happens in your code, including line numbers.
Some solutions based on PLCrashReporter are:
QuincyKit: Open Source client + php server, basic crash grouping, symbolication can be automated from your mac (I am the developer of this)
HockeyApp: Paid service, uses QuincyKit client, advanced crash grouping, symbolication fully done on the server (I am on of the developers of this)
Bugsense: Free service, symbolication announced as premium feature
AppBlade: Paid service, symbolication unknown
Crashlytics: Private beta, unknown features, their solution seems to be based on PLCrashReporter
The proposed solutions either allow sending the data automatically on the next startup or by asking the user if he/she agrees to send.
Disclaimer-as-per-the-faq: I am a developer for AppBlade.
AppBlade allows you to send custom parameters along with symbolicated crash reports as of December 2012.
Check it out! http://blog.appblade.com/news/2012/12/appblade-sdk-update-sessions-and-queues/

Resources