xcode 如何访问 iOS7 不受限制的能源/网络录音?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19285426/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:03:57  来源:igfitidea点击:

How can iOS7 untethered energy/network recordings be accessed?

iosxcodeios7xcode-instruments

提问by Luke

iOS7 has a preference under " Preferences | Developer | Instruments / Logging | Untethered Recording" to record the energy and network usage data.

iOS7 在“Preferences | Developer | Instruments / Logging | Untethered Recording”下有一个首选项来记录能源和网络使用数据。

How do I extract this from the device to view in Xcode or Instruments?

如何从设备中提取它以在 Xcode 或 Instruments 中查看?

回答by aethe

This basically records the same data that would get recorded if you were running the Energy Diagnosticsor Networkinstruments while the device is plugged in, except it'll keep logging in the background all the time without the need for a tethered Instruments session.

这基本上记录的数据与在设备插入时运行能源诊断网络仪器时记录的数据相同,除了它会一直在后台登录,而无需连接仪器会话。

You'll need to be running the version of Instruments provided in Xcode 5 (or newer) for this to work. Make sure you have you device plugged in before starting Instruments.

您需要运行 Xcode 5(或更新版本)中提供的 Instruments 版本才能运行。确保在启动 Instruments 之前已插入设备。

First step is to create a new Trace Document using the corresponding Instrument Template in Instruments' New screen:

第一步是在 Instruments 的 New 屏幕中使用相应的 Instrument Template 创建一个新的 Trace Document:

Instruments New Screen

仪器新屏幕

Now, in the File menu, a new option Import Logged Data from Deviceshould be available, if you have your device plugged in.

现在,在文件菜单中,如果您已插入设备,则应该可以使用从设备导入记录数据的新选项。

Import Logged Data from Device

从设备导入记录的数据

You should now see the results from your last run. You don'thave to stop logging on your device to access this option, it'll just give you the data between when you started recording to when you pressed the import button.

您现在应该可以看到上次运行的结果。您不必停止登录您的设备来访问此选项,它只会为您提供从开始录制到按下导入按钮之间的数据。

回答by inigo333

This Apple page explains the whole process: Energy Efficiency Guide for iOS Apps

这个 Apple 页面解释了整个过程:iOS 应用程序的能源效率指南

To import logged energy data from an iOS device

从 iOS 设备导入记录的能源数据

  1. Launch Instruments and create a new trace document that targets your device and app with the Energy Diagnostics profiling template. Choose Instruments template
  2. Choose File > Import Logged Data from Device.
  1. 启动 Instruments 并使用能源诊断分析模板创建一个新的跟踪文档,以您的设备和应用程序为目标。 选择仪器模板
  2. 选择“文件”>“从设备导入记录的数据”。

Import Logged Data from Device

从设备导入记录的数据