How to run MonoTouch app in iOS Simulator from terminal?

Apparently you can launch the iOS app in Simulator from the 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 the MonoTouch application - I get a black simulator screen.
How to run a compiled MonoTouch application in Simulator from a terminal?

+6
source share
1 answer

I don’t know why this is not working. Perhaps the simulator that starts may not be the version you expect. You can check inside Console.app to see what went wrong.

In any case, you can use mtouch to launch your application, for example.

 /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 run.
By default, it runs on the iPhone simulator. Adding the --device=2 flag --device=2 switch it to the iPad.

See the mtouch man page or mtouch --help .

+4
source

All Articles