When I try to run a UI Automation script on iOS 5 devices I am getting the following error:
\"An error occurred while trying to run the script.\"
This should fix this issue:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer