Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run MonoTouch application in iOS Simulator from Terminal?

Apparently, you can start iOS app in Simulator from Terminal by running

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication path_to_your_app/YourFavouriteApp.app/YourFavouriteApp

This does not work for a MonoTouch app—I'm getting a black Simulator screen.
How do I launch a compiled MonoTouch app in Simulator from Terminal?

like image 759
Dan Abramov Avatar asked Dec 25 '12 20:12

Dan Abramov


1 Answers

Not sure why it does not work. Maybe the simulator that will start up might not be the version you expect. You might want to check inside Console.app to see what went wrong.

Anyway you can use mtouch to start your application, e.g.

/Developer/MonoTouch/usr/bin/mtouch --launchsim=/path/to/your/application.app

You can also specify which version of iOS to use and the device (iPhone or iPad) to start.
By default it runs on iPhone simulator. Adding --device=2 flag will switch it to iPad.

See mtouch man page or mtouch --help for details.

like image 65
poupou Avatar answered Sep 25 '22 14:09

poupou