UNPKG

4.17 kBMarkdownView Raw
1[![NPM](https://nodei.co/npm/ios-sim.png?compact=true)](https://nodei.co/npm/ios-sim/)
2[![Build status](https://ci.appveyor.com/api/projects/status/xh7auct40k5oxwjg/branch/master?svg=true
3)](https://ci.appveyor.com/project/shazron/ios-sim-bn5fo)
4[![Build Status](https://travis-ci.org/ios-control/ios-sim.svg?branch=master)](https://travis-ci.org/ios-control/ios-sim)
5
6ios-sim
7=======
8
9Supports Node 6 and greater, and Xcode 9.4 and greater -- since version 8.x.
10
11The `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.
12
13Features
14--------
15
16* 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.
17
18See the `--help` option for more info.
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 (6 or greater):
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
87Be sure to enable Developer Mode on your machine:
88
89 $ DevToolsSecurity -enable
90
91Ensure that 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).