Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read the contents of the device console on iPhone?

I can read the console when the device is plugged into my machine via Xcode.

I need to build in a way to read the console for my test users to get console output messages and crash reports from the device and then email them via the email dialog.

Is there a standard file location where the console log and crash reports live on iOS?

like image 856
Streamline Avatar asked Jan 12 '12 01:01

Streamline


1 Answers

The console is not saved to a file on the iPhone (which is why reboots completely clear it).

I would recommend replacing your NSLogs with something that logs to the console as well as a file within the Documents directory of your app and allow provide functionality within the app to send in the file to an email.

The location of where the crash logs are kept is outside the sandbox of the application, so you can't access the crash logs directly, but sync'ing with iTunes will cause them to be uploaded to the developer's iTunes Connect account.

like image 121
Ben S Avatar answered Oct 13 '22 22:10

Ben S