[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

 

posted @ 2017-02-12 20:33  Zhentiw  阅读(274)  评论(0编辑  收藏  举报