设备上的UIAutomation在开始捕获时挂起

Jam*_*sta 11 iphone xcode instruments ui-automation

当我尝试使用UIAutomation在设备上捕获UI输入时,它会挂起"开始捕获".

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.
Run Code Online (Sandbox Code Playgroud)

我的Profile方案的Build Configuration是Debug.

知道我错过了什么导致UIAutomation挂起?

ano*_*dev 41

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

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

  • 你认为他们会抛出一个错误,它没有启用而不是让它挂起 (3认同)

Jam*_*sta 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.
Run Code Online (Sandbox Code Playgroud)

呼!

  • 关于SO的最佳答案.所有iOS开发者都应该提交一本小册子. (2认同)