3

OK, so this is all I need:

  • I've got an Xcode 4.3 project, all set up
  • I want to run in the simulator, given its path, via the terminal

Is this doable? And how?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
  • possible duplicate of [How to install iPhone application in iPhone Simulator](http://stackoverflow.com/questions/1187611/how-to-install-iphone-application-in-iphone-simulator) – aleroot Sep 10 '12 at 18:40
  • 1
    This answer http://stackoverflow.com/a/8352745/792677 has links to the open source command-line projects launching .app projects in simulator. – A-Live Sep 10 '12 at 20:50

1 Answers1

2

Best thing to do, if it doesn't have much of a UI, is to create a Mac-targeted version. Create a side-directory within your project, and create a new Mac project in that, complete with separate main, et al. Then "add existing files" to that project to add the files you want from the original project.

There's also a way to do this within a single Xcode 4 (not Xcode 3) project, vs creating a separate one, but that's a little flaky and this approach is simpler.

If you want to preserve the UI, though, probably the best approach is to just run the app in the emulator.

Hot Licks
  • 47,103
  • 17
  • 93
  • 151