12

I have upgraded to xcode 5.0 and Instruments 5.0. Problem: Can not make a new recording / new script. It worked before upgrade.

How to recreate problem: - Make a new instance with the template "Automation" - Go to "script" - Choose "Add", then "Create". A code line "var target = UIATarget.localTarget();" is created as expected in the script pane. - click the red record button at the bottom of the script pane Simulator opens as expected (iPhone Regina (4-inch 64-bit)/iOS 7.0.3) Problem: in the script pane it says "Starting capture" and this does not stop and recording does not work. In the "Editor log" it says: "An error occurred while trying to run the script".

I have restarted Instruments, xCode and the computer a few times.

2 Answers2

47

This happened to me. Turns out the option to enable UI Automation was turned off in the Developer Settings on the phone. After turning the option on, the error went away and everything worked as expected.

Developer Settings - enable UI Automation

Mia Clarke
  • 8,134
  • 3
  • 49
  • 62
2

Try this in terminal:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Nikos M.
  • 13,685
  • 4
  • 47
  • 61