Way to see crash logs for an iOS app outside of an Xcode debugging session?

扶醉桌前 提交于 2019-12-10 20:07:05

问题


I have an app where the user needs to login before using it .

to enhance the user experience , the user needs only to login at the first time and each other time the app will not show the login screen but it will show the app [ I am using user default to store his id ] now I have achieved this but I ran into a bug and the app crashes when I open it after a succeeded login ..

The problem is : to mimic the scenario where I open the app without the need to login , I had to stop the app [ which means there will be no debugging session ] and then reopen the app ..

What I am asking for : is there a way to see what causes the bug knowing that I am not running the app in a debugging session ?

Thanks in advance


回答1:


Can you run your app on a device? If so, you might be able to get the crash data you need from the Devices window, from Xcode.

Xcode -> Window -> Devices.

Select your device, then select View Device Logs.

Here's Apple's page on the subject.

For running in the simulator, you may be able to get the crash data you need from the Console (I've just tried this and seen at least one crash log from my current development).

Here is Apple's page on Testing with the Simulator. From the menu on the left, check out Viewing Crash Logs. Extract from that page...

To view a crash log

  1. Open Console by going to Applications/Utilities/Console in the Finder.
  2. Look for the line in Console that reads “Saved Crash Report for.”
  3. Expand this item using the arrow at the left.
  4. Click Open Report.



回答2:


You can maybe check: https://try.crashlytics.com/

It's part of the twitter Fabric framework now quite easy to use, and provides good information




回答3:


Use Hockey app for getting the info regarding the crash logs:

Here is the link to setup the Hockey app in iOS:

http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/hockeyapp-for-ios



回答4:


check plcrashreporter : https://code.google.com/p/plcrashreporter/downloads/list http://plcrashreporter.googlecode.com/svn/tags/plcrashreporter-1.1-beta1/Documentation/API/functions.html

it's very easy to use and If your application crashes, a crash report will be written. When the application is next run, you may check for a pending crash report, and submit the report to your own HTTP server, send an e-mail, or even introspect the report locally



来源:https://stackoverflow.com/questions/31833428/way-to-see-crash-logs-for-an-ios-app-outside-of-an-xcode-debugging-session

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!