project.json:

{ "name": "mobile", //... "targets": { //... "run-ios": { "executor": "@nrwl/react-native:run-ios", "options": {} } } }
nx run mobile:run-ios

Examples

To see all the available simulators, run command:

xcrun simctl list

The simulator option allows you to launch your iOS app in a specific simulator:

"run-ios": { "executor": "@nrwl/react-native:run-ios", "options": { "simulator": "iPhone 14 Pro" } }

Options

device

string

Explicitly set device to use by name. The value is not required if you have a single device connected.

simulator

string
Default: iPhone 14

Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: iPhone X (12.1).

xcodeConfiguration

string
Default: Debug

Explicitly set the Xcode configuration to use.

install

boolean
Default: false

Runs pod install for native modules before building iOS app.

interactive

boolean
Default: true

Run packager server in interactive mode.

port

number
Default: 8081

The port where the packager server is listening on.

packager

boolean
Default: true

Starts the packager server.

resetCache

boolean
Default: false

Resets metro cache.

scheme

string

Explicitly set the Xcode scheme to use.

terminal

string

Launches the Metro Bundler in a new window using the specified terminal path.

sync

boolean
Default: true

Syncs npm dependencies to package.json (for React Native autolink). Always true when --install is used.