[NativeScript] Create new application and run emulator

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
原文地址:https://www.cnblogs.com/Answer1215/p/6391737.html