从shell发起的乐器的iPhone(硬件?)id [英] iPhone (hardware?) id for instruments launched from shell

查看:111
本文介绍了从shell发起的乐器的iPhone(硬件?)id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿。

我正试图用iPhone指定为目标从shell启动Instruments。至于这个苹果文档我应该能够用'-w'参数指定目标,但我不知道应该在那里。

Hey.
I'm trying to launch Instruments from shell with iPhone specified as target. As for this apple doc I should be able to specify target with '-w' parameter but I don't know what should be there.

我已经尝试过iPhone名称,我已经尝试了它的UUID但没有任何效果 - 我总是得到'未知的硬件设备指定'。我还检查了一些保存的跟踪文档的内容,但在里面我看到了iPhone的UUID。也许是应该添加到UUID的一些前缀/后缀?

I've tried iPhone name, I've tried its UUID but nothing worked - constantly I get 'Unknown hardware device specified'. I also checked content of some saved trace document, but inside I see UUID of the iPhone. Maybe it is some prefix/suffix that should be added to the UUID ?

最后我想得到以下工作:

In the end i would like to get the following working:

instruments -t /Users/user/Template.tracetemplate -D /Users/user/res.trace -w iPhoneID AppName


推荐答案

以下命令对我有用(取自 http://lemonjar.com/blog/?p=69 ):

The following command worked for me(taken from http://lemonjar.com/blog/?p=69):

instruments -t / Developer / Platforms / iPhoneOS .platform / Developer / Library / Instruments / PlugIns / AutomationInstrument.bundle / Contents / Resources / Automation.tracetemplate< full_path_to_application> -e UIASCRIPT< path_to_script.js> -e UIARESULTSPATH< output_results_path>

但有几点需要注意:


  1. 除非您要在设备上运行脚本,否则不需要-w参数。如果要在模拟器上运行脚本,只需在命令中省略此参数。

  2. full_path_to_application是模拟器创建的.app文件的路径。对我来说,路径是

  1. the -w parameter is not required unless you want to run the scripts on your device. If you want to run your scripts on the simulator, simply omit this parameter from the command.
  2. full_path_to_application is the path to your .app file that is created by your simulator. For me, the path was


/ Users / fwasim / Library / Application Support / iPhone Simulator / 5.0 / Applications / AA6BA2E1-D505-4864 -BECC-29ADEE28194D / name_of_application.app

/Users/fwasim/Library/Application Support/iPhone Simulator/5.0/Applications/AA6BA2E1-D505-4864-BECC-29ADEE28194D/name_of_application.app

此路径可能与其他人不同,具体取决于您在模拟器上运行的iOS版本。还记得将此路径放在双引号中。

this path might be different for anyone else depending on what iOS version are you running on your simulator. Also remember to put this path in double quotation marks.

path_to_script.js应该是保存用javascript编写的自动化脚本的完整路径。还要记住将此路径放在双引号中。

The path_to_script.js should be the FULL PATH to where your automation script written in javascript is saved. Also remember to put this path in double quotation marks.

最后,输出结果路径是您要保存输出结果的路径。还记得把这个路径放在双引号中。

Lastly output results path is the path where you want to save the output results. Also remember to put this path in double quotation marks.

这些是我失踪的点,因此是得到上面提到的一些错误。

These were the points I had been missing on and thus was getting some of the errors mentioned above.

这篇关于从shell发起的乐器的iPhone(硬件?)id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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