Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get iPhone crash log from customers?

Does anyone knows how to get crash logs from customers? Instead of manually asking them to sync and go to this directory and this directory and send it.

Is there any automatic way to do send a crash report to our server?

like image 697
g.revolution Avatar asked Oct 02 '10 05:10

g.revolution


People also ask

What tool is used to record crash logs iOS?

Firebase Crashlytics Crashlytics is a crash reporting tool that allows you to monitor your iOS applications.

How do I get a TestFlight crash report?

App Store Connect shows you all of your TestFlight feedback, including crash feedback. You can continue to download the raw feedback and crash log directly from App Store Connect or, new this year, you can open the associated crash right in the Organizer with the new Open in Xcode button.


2 Answers

You can perform your own crash-logging with PLCrashReporter. Typically, you write the crash log to a file and then send it to a server the next time the app starts.

In order to prevent an infinite crash-reporting loop (there was one in an early version), you want to do things in a specific order:

  1. Read the file to memory and delete it. (Hopefully this won't crash.)
  2. Parse the crash report and send it to the server. (If it crashes now, the file has been deleted, so it shouldn't happen again.)
  3. Finally, enable crash reporting (so if it crashes in steps 1 or 2, the crash isn't logged).

In any case, you should have a "Oops, it crashed! Do you want to send a crash report?" dialog. I think automatic crash-logging is permitted by the default EULA, but it doesn't hurt to be nice to your users.

If you're worried about losing reports forever if the user says "no", instead of deleting the report, you can do logrotate-style style renaming (i.e. rename report8 to report9, rename report7 to report8, ..., rename report to report0). Then have a "send last N crash reports" button (either set N=10 or count the number of reports), so even if they've accidentally disabled it (or they had no internet at the time), they can still send the report.

like image 99
tc. Avatar answered Sep 28 '22 03:09

tc.


iOS 5 and later Tapping Settings > General > About > Diagnostics & Usage will allow you to choose between Automatically Send and Don't Send.

iOS 4 and earlier By default, opting in is a one-time decision. If you'd like to change your decision, you can reset warnings for your iOS 4 or earlier device so that you will be asked again.

How to reset warnings within iTunes Connect your iPad, iPhone, or iPod touch to your PC or Mac. Wait until your device has appeared on the left side of the iTunes window under Devices. Right-click (Mac or PC) or Control-click (Mac) the icon for your device. From the shortcut menu, choose Reset Warnings:

The next time you sync after resetting warnings, you should see:

To disagree and stop sending Apple diagnostic and usage information, click No Thanks.

If you don't see the window above Disconnect your device from your computer. Open an application on your device. Press and hold the Sleep/Wake button until the red slider appears, and then press and hold the Home button until the application quits. If you're using iOS 2.x or earlier, press and hold the Home button until the application quits. Connect your device and sync it with iTunes. The option to agree or disagree to diagnostics collection should appear again.

Chearz;)

reference:

http://support.apple.com/kb/HT4305

like image 26
Saad Avatar answered Sep 28 '22 01:09

Saad