Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Currently, the only option I can see is `--device` which is poorly documented.
--device should support retina versions of the iPhone and iPad simulators, and the enumeration should be available in `mtouch -h`
There should also be a way to specify the OS version of the simulator.
This is especially relevant as --stdout and --stderr will not apply once the app has quit (as when you switch these parameters in the simulator's drop down menu.
If you directly use the `mtouch` command-line tool then your best reference is it's man page, which is available online at:
This is much better than `mtouch -h` but feel free to comment on it if some options are not documented enough to be useful.
> Currently, the only option I can see is `--device` which is poorly documented.
Specify the type of device you want the iOS simulator to simulate. Use 1 for the iPhone, 2 for the iPad.
> --device should support retina versions of the iPhone and iPad simulators
That was not possible last time I checked (API limitation). I'll check again to see if newer SDK allows this now and update this bug report.
> There should also be a way to specify the OS version of the simulator.
The `sdk` option works on the simulator as long as the specified version of the SDK is available (installed) on your system.
e.g. mtouch -sdk=5.0
If you have several Xcode versions installed on your system you might need to use "--sdkroot=PATH" to select the one you want to be used (in case the iOS version you want is only available in one of them).
Retina is not a 'family' we can set with the existing simulator API, i.e. the only valid value are 0 (use latest), 1 (iPhone) and 2 (iPad). That's also a limitation of the latest Xcode versions I've tested.
AFAICT 'retina' appears to be a configuration option kept by the simulator itself. E.g.
a. run app under iOS simulator (iPhone) - it will be a "normal" (non retina) iPhone
b. switch device to iPhone Retina
c. close the iOS simulator
d. run app again under iOS simulator (iPhone) - it will be a retina iPhone (and --stdout and --stderr should work fine)
We might be able to "push" that before starting the simulator but it likely won't work 100% of the time, e.g. when the simulator process is already running (and reused).
--device=0 is good enough for me.
And, thanks for the note on --sdk. I assumed that only applied to compilation.
for the record (when I google back on this subject ;-) the values are identical to UIDeviceFamily  and that does not include retina devices as separate families.
Future (post 6.2) version of mtouch will allow specify more options to --device. OTOH those new options are configuration-based (no part of the API) and requires to restarts the simulator (about 10 extra seconds) so "1" or "2" is still better in most cases.