Search code examples
iphoneiosmacosios5nslog

How to view logs from iPhone?


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


Solution

  • 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.