Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIAutomation on device hangs in starting capture

When I try to capture UI inputs on the device using UIAutomation, it hangs saying "Starting Capture".

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.

My Profile scheme's Build Configuration is Debug.

Any idea what I am missing that is causing UIAutomation to hang?

like image 420
James Testa Avatar asked Mar 15 '13 23:03

James Testa


3 Answers

For an iOS8 device, also make sure that UI Automation is enabled in Settings.

Settings -> Developer -> Enable UI Automation

like image 191
anorskdev Avatar answered Sep 28 '22 20:09

anorskdev


Figured it out. I hope this helps someone else!

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.

Whew!

like image 44
James Testa Avatar answered Sep 28 '22 19:09

James Testa


Check if you've chosen Debug mode in the Profile Scheme and also you've got the correct signing identity and the provisioning profile.

like image 25
SarpErdag Avatar answered Sep 28 '22 19:09

SarpErdag