UNPKG

4.2 kBMarkdownView Raw
1[![Build status](https://ci.appveyor.com/api/projects/status/0kw833771uu622fs?svg=true)](https://ci.appveyor.com/project/shazron/ios-sim)
2[![Build Status](https://travis-ci.org/phonegap/ios-sim.svg?branch=master)](https://travis-ci.org/phonegap/ios-sim)
3
4ios-sim
5=======
6
7Supports Xcode 6 only since version 3.x.
8
9The ios-sim tool is a command-line utility that launches an iOS application on the iOS Simulator. This allows for niceties such as automated testing without having to open Xcode.
10
11Features
12--------
13
14* Choose the device family to simulate, i.e. iPhone or iPad. Run using "showdevicetypes" option to see available device types, and pass it in as the "devicetypeid" parameter.
15
16See the `--help` option for more info.
17
18The unimplemented options below are in the [backlog](https://github.com/phonegap/ios-sim/milestones/ios-sim%204.2.0)
19
20Usage
21-----
22
23```
24
25 Usage: ios-sim <command> <options> [--args ...]
26
27 Commands:
28 showsdks List the available iOS SDK versions
29 showdevicetypes List the available device types
30 launch <application path> Launch the application at the specified path on the iOS Simulator
31 start Launch iOS Simulator without an app
32 install <application path> Install the application at the specified path on the iOS Simulator without launching the app
33
34 Options:
35 --version Print the version of ios-sim
36 --help Show this help text
37 --exit Exit after startup
38 --log <log file path> The path where log of the app running in the Simulator will be redirected to
39 --devicetypeid <device type> The id of the device type that should be simulated (Xcode6+). Use 'showdevicetypes' to list devices.
40 e.g "com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone6, 8.0"
41
42 Removed in version 4.x:
43 --stdout <stdout file path> The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim)
44 --stderr <stderr file path> The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim)
45 --sdk <sdkversion> The iOS SDK version to run the application on (defaults to the latest)
46 --family <device family> The device type that should be simulated (defaults to `iphone')
47 --retina Start a retina device
48 --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))
49 --64bit In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit))
50
51 Unimplemented in this version:
52 --verbose Set the output level to verbose
53 --timeout <seconds> The timeout time to wait for a response from the Simulator. Default value: 30 seconds
54 --args <...> All following arguments will be passed on to the application
55 --env <environment file path> A plist file containing environment key-value pairs that should be set
56 --setenv NAME=VALUE Set an environment variable
57
58```
59
60Installation
61------------
62
63Choose one of the following installation methods.
64
65### Node JS
66
67Install using node.js (at least 0.10.20):
68
69 $ npm install ios-sim -g
70
71### Zip
72
73Download a zip file:
74
75 $ curl -L https://github.com/phonegap/ios-sim/archive/master.zip -o ios-sim.zip
76 $ unzip ios-sim.zip
77
78### Git
79
80Download using git clone:
81
82 $ git clone git://github.com/phonegap/ios-sim.git
83
84Troubleshooting
85---------------
86
87Make sure you enable Developer Mode on your machine:
88
89 $ DevToolsSecurity -enable
90
91Make sure multiple instances of launchd_sim are not running:
92
93 $ killall launchd_sim
94
95License
96-------
97
98This project is available under the MIT license. See [LICENSE][license].
99
100[license]: https://github.com/phonegap/ios-sim/blob/master/LICENSE