是NSLog()存储在设备(iPhone等)?如果是这样,在哪里? [英] is NSLog() stored on the device (iPhone etc)? If so, where?

查看:121
本文介绍了是NSLog()存储在设备(iPhone等)?如果是这样,在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否应该在iTunes的最终应用程序中删除所有NSLog()调用?

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

在我的iOS应用程序中,我有很多用于调试的NSLog()。
我应该在上传到iTunes之前有条件地将它们编码吗?

In my iOS app, I've got lots of NSLog() for debug. Should I conditionally code them out before uploading to iTunes?

这适用于以下应用:iPhone,iPod,iPad

This is for an app for: iPhone, iPod, iPad

谢谢。

推荐答案

您不必删除所有这些;实际上,如果您的应用程序在用户手机上崩溃并且您希望他们向您发送崩溃日志,它们会非常有用。当用户同步他/她的手机时,崩溃日志位于文件夹中

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/<DEVICE_NAME>

如果您有 NSLog() s可以像调试时那样获得有用的信息。正如其他人指出的那样,不要过度,但它们最终可能会有用。

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.

这篇关于是NSLog()存储在设备(iPhone等)?如果是这样,在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆