2013-03-15 34 views
11

当我尝试使用UIAutomation捕获设备上的UI输入时,它会挂起并显示“Starting Capture”。设备上的UIAutomation在启动捕获时挂起

1) I click on Profile in Xcode which 
2) Starts up Instruments where I select Automation and click Profile 
3) Which starts Instruments running. In Scripts I select Add->Create which shows the record button at the bottom 
4) I click the record button and it hangs saying "Starting Capture" and doesn't record my UI input. 

我的配置文件方案的构建配置是调试。

任何想法,我失踪,导致UIAutomation挂起?

回答

16

想通了。我希望这可以帮助别人!

1) Click on Profile in Xcode (or Cmd-I) 
2) In Instruments select Automation and click Profile 
3) Click Instruments Record button to stop the running of the app 
4) Click Scripts -> Add -> Create 
5) Click Record button at bottom of Instruments (which is for recording the script) 
6) Click Record button at top of Instruments (which is for running the app) 
7) Click on Trace Log -> Script to view the script you are creating. 

哎!

+2

关于SO的最佳答案。所有的iOS开发者都应该交上一本小册子。 – 2014-04-12 11:18:34

1

检查您是否在配置文件方案中选择了调试模式,并且您拥有正确的签名标识和配置文件。

41

对于iOS8设备,还要确保在“设置”中启用了UI自动化。

设置 - >开发人员 - >启用UI自动化

+0

谢谢你。 – 2015-03-09 12:17:04

+3

你会认为他们会抛出一个错误,它没有启用,而不是让它挂起 – Sirens 2015-06-13 16:45:59

+0

谢谢。它帮助了我。 – ZevsVU 2015-07-22 11:11:25

相关问题