is NSLog() stored on the device (iPhone etc)? If so, where?

前端 未结 6 752
旧时难觅i
旧时难觅i 2020-12-16 20:18

Should all NSLog() calls be deleted in the final app for iTunes?

In my iOS app, I\'ve got lots of NSLog() for debug. Should I conditionally code them out before uplo

6条回答
  •  一整个雨季
    2020-12-16 21:00

    You don't have to remove all of them; in fact, they can be useful if your app crashes on a user's phone and you want them to send you a crash log. When a user syncs his/her phone, the crash log is located in the folder

    ~/Library/Logs/CrashReporter/MobileDevice/
    

    If you have NSLog()s you may gain useful information just as you would when debugging. As the others pointed out, don't overdo it, but it they could end up being useful.

提交回复
热议问题