project.json:

1{ 2 "name": "mobile", 3 //... 4 "targets": { 5 //... 6 "run-ios": { 7 "executor": "@nx/react-native:run-ios", 8 "options": {} 9 } 10 } 11} 12
1nx run mobile:run-ios 2

Examples

The mode option allows to specify the xcode configuartion schema, such as Debug or Release.

1 "run-ios": { 2 "executor": "@nx/react-native:run-ios", 3 "options": { 4 "mode": "Release" 5 } 6 } 7
1nx run-ios <app-name> --mode=Debug 2

Options

mode

string
Default: Debug

Explicitly set the scheme configuration to use

simulator

string

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

buildFolder

string

Location for iOS build artifacts. Corresponds to Xcode's "-derivedDataPath". Relative to ios directory.

binaryPath

string

Path relative to project root where pre-built .app binary lives.

device

string

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

extraParams

oneOf [Array<string>, string]

Custom params that will be passed to xcodebuild command.

interactive

boolean

Explicitly select which scheme and configuration to use before running a build

port

number
Default: 8081

The port where the packager server is listening on.

resetCache

boolean
Default: false

Resets metro cache.

scheme

string

Explicitly set Xcode scheme to use

udid

string

Explicitly set device to use by udid

verbose

boolean

Do not use xcbeautify or xcpretty even if installed

xcconfig

string

Explicitly set xcconfig to use