首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从命令行运行Instruments 4.3?

问从命令行运行Instruments 4.3?
EN

Stack Overflow用户
提问于 2012-04-25 03:07:08
回答 3查看 2.1K关注 0票数 1

我在cmd生产线上运行Instruments 4.3时遇到问题。我相信它正在使用我的4.2版本,这个版本还在安装中。如何让Instruments4.3安装并启动我的应用程序,然后对其运行UIAutomation?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-05-15 11:42:12

问题是你指定了-w参数,但没有提供设备ID。如果你试图在模拟器中从你的应用程序运行,那么就像这样省略-w。

代码语言:javascript
复制
xcrun instruments -v \
  -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
  /Users/cliff/Src/MyApp/build/MyApp/Build/Products/Debug-iphoneos/MyApp.app \
  -e UIASCRIPT /Users/cliff/Src/MyApp/UIAutomation/automation-test.js \
  -e UIARESULTSPATH /Users/cliff/Src/MyApp/build/uiautomation

如果您确实要在设备上运行此自动化脚本,则可以使用this script I wrote快速获取设备ID。将该ID传递给-w参数,它应该可以正常工作。

票数 2
EN

Stack Overflow用户

发布于 2012-04-25 05:10:21

我想我已经弄明白了,但我还是有问题。我从preferences -> Downloads安装了命令行工具

代码语言:javascript
复制
xcode-select -switch /Applications/Xcode.app/Contents/Developer

然后我运行:

代码语言:javascript
复制
xcrun instruments -v -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w /Users/cliff/Src/MyApp/build/MyApp/Build/Products/Debug-iphoneos/MyApp.app -e UIASCRIPT /Users/cliff/Src/MyApp/UIAutomation/automation-test.js -e UIARESULTSPATH /Users/cliff/Src/MyApp/build/uiautomation

我非常确定这将获得当前版本的Instruments cmd行工具,因为我还将我的/Developer文件夹从PATH中移出。我一直在卖"Instruments Usage Error : Device failed to ready to use“。那是怎么回事?

票数 1
EN

Stack Overflow用户

发布于 2012-04-25 03:10:48

你试过了吗:/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments

这个怎么样:/Applications/Xcode.app//Contents/Developer/usr/bin/instruments

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10304423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档