如何读取iPhone上的设备控制台的内容? [英] How to read the contents of the device console on iPhone?

查看:906
本文介绍了如何读取iPhone上的设备控制台的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当设备通过Xcode插入到我的机器时,我可以读取控制台。

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.

有控制台日志和崩溃报告在iOS上的标准文件位置?

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

推荐答案

控制台不会保存到iPhone上的文件(这就是为什么重新启动完全清除它)。

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

我建议您将 NSLog 替换为日志到控制台的文件以及Documents目录下的文件应用程序和允许在应用程序中提供功能将文件发送到电子邮件。

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.

崩溃日志保存位置在应用程序的沙箱外,您不能直接访问崩溃日志,但与iTunes同步将导致它们被上传到开发人员的iTunes Connect帐户。

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.

这篇关于如何读取iPhone上的设备控制台的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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