5

I'm looking for a way to build and run my app in the simulator from the command line. I need it to behave the same way as when you press Run in xcode.

I can build it with xcodebuild and I tried using simulator with -SimulateApplication option. My app launched but my tests didn't start executing (as they do when run from xcode).

I tried the script I found here and few other AppleScripts I found on the web. They didn't work for me. Commands like build and clean were ignored and others would throw errors. Maybe it's because I use xcode 4. Please help.

Community
  • 1
  • 1
Rad
  • 51
  • 2
  • Yes, unfortunately it appears that with Xcode 4 AppleScripts that attempt to launch applications no longer work. – ThomasW Feb 06 '12 at 10:14
  • Even UI Scripting appears to be broken with Xcode 4. – ThomasW Feb 06 '12 at 10:56
  • For some reason the "Run" command of Xcode 4 can only be triggered when Xcode is active. This answer has a script that works. It then needs to be triggered from a script: http://stackoverflow.com/questions/5473761/how-to-keep-an-application-activated-in-foreground-while-a-script-is-running – ThomasW Feb 06 '12 at 11:21

0 Answers0