The run command allows you to compile your app locally.

project.json:

{ "name": "mobile", //... "targets": { //... "run-ios": { "executor": "@nrwl/expo:run", "options": { "platform": "ios" } }, "run-android": { "executor": "@nrwl/expo:run", "options": { "platform": "android" } } //... } }
nx run mobile:run-ios nx run mobile:run-android

Examples

The variant option allows you to specify the compile Android app with variants defined in build.gradle file (e.g. debug, release).

"run-android": { "executor": "@nrwl/expo:run", "options": { "platform": "android", "variant": "release" } }

Options

platform

pRequired
string
Default: ios
Accepted values: ios, android

Platform to run for (ios, android).

variant

string
Default: debug

(Android) Specify your app's build variant (e.g. debug, release).

xcodeConfiguration

string
Default: Debug

(iOS) Xcode configuration to use. Debug or Release

bundler

boolean

Whether to skip starting the Metro bundler. True to start it, false to skip it.

buildCache

boolean

Should use derived data for builds.

clean

boolean
Default: false

Delete the native folders and regenerate them before applying changes

device

d
string

Device name or UDID to build the app on. The value is not required if you have a single device connected.

install

boolean
Default: true

Should install missing dependencies before building.

port

p
number
Default: 8081

Port to start the Metro bundler on

scheme

string

(iOS) Explicitly set the Xcode scheme to use

sync

boolean
Default: true

Syncs npm dependencies to package.json (for React Native autolink).