Table of contentsiPhone applications are shipped as application bundles. These are directories with the extension The process of turning a .NET executable into an application is mostly driven by the BuildingThe
Building for the SimulatorWhen you get started, the most common used scenario will be for you to try out the application in the Simulator, so you will be using the $ mtouch -sim Hello.app hello.exe Building for the DeviceTo build software for the device you will build your application using the $ mtouch -dev -c "iPhone Developer: Miguel de Icaza" foo.exe
In this particular case, we are using the "iPhone Developer: Miguel de Icaza" certificate to sign the application. This step is very important, or the physical device will refuse to load the application. Running your ApplicationLaunching on the SimulatorLaunching on the simulator is very simple once you have an application bundle: $ mtouch -launchsim Hello.app You will see some output like this: Launching application
Application launched
PID: 98460
Press enter to terminate the application
It is strongly recommended that you also keep a log of the standard output and standard error files to assist in your debugging. The output of Console.WriteLine goes to stdout, and the output from Console.Error.WriteLine and any other runtime error messages goes to stderr. To do this, use the --stdout and --stderr flags: ../../tools/mtouch/mtouch --launchsim=Hello.app --stdout=output --stderr=error If your application fails, you can see the fiels output and error to diagnose the problem. Deploying to a DeviceTo deploy to your device you need to provision your device as described in Apple's Managing Devices document. Once your device has been properly provisioned, you can use the mtouch command to deploy a compiled ".app" into your device. You do this using this command:
$ mtouch -installdev=MyApp.app
These steps are typically performed by MonoDevelop. ReferenceSee the mtouch(1) manual page for details on the other command line options. |