[NativeScript] Create new application and run emulator

庄萧迟
2023-12-01

Install:

npm i -g nativescript

 

Create: 

tns create <app_name> --ng

 

Run:

tns emulate ios

 

List all emulators:

xcrun simctl list

 

Run a different emulator:

tns emulate ios --device "iPad Air 2"

 

Livesync:

Run with emulator:

tns livesync ios --emulator --watch

If you omit device 'ios', it will run both Android and ios emulator at the same time, but you need to install Android emulatior first on your mac.

 

Run with device that connected:

tns livesync ios --watch

 

 类似资料: