diff --git a/docs/man_pages/project/testing/build-android.md b/docs/man_pages/project/testing/build-android.md index 6dcf983041..0226025829 100644 --- a/docs/man_pages/project/testing/build-android.md +++ b/docs/man_pages/project/testing/build-android.md @@ -37,9 +37,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/build-ios.md b/docs/man_pages/project/testing/build-ios.md index 08dbb1cbb9..dfd914a625 100644 --- a/docs/man_pages/project/testing/build-ios.md +++ b/docs/man_pages/project/testing/build-ios.md @@ -36,9 +36,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/build.md b/docs/man_pages/project/testing/build.md index e2369345d4..a53ed9d2ee 100644 --- a/docs/man_pages/project/testing/build.md +++ b/docs/man_pages/project/testing/build.md @@ -32,9 +32,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/debug-android.md b/docs/man_pages/project/testing/debug-android.md index b941bb8b5a..0020bb9586 100644 --- a/docs/man_pages/project/testing/debug-android.md +++ b/docs/man_pages/project/testing/debug-android.md @@ -6,39 +6,31 @@ Usage | Synopsis Deploy on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android` Deploy on device, run the app and stop at the first code statement | `$ tns debug android --debug-brk [--device ] [--debug-port ] [--timeout ]` Deploy in the native emulator, run the app and stop at the first code statement | `$ tns debug android --debug-brk --emulator [] [--timeout ]` -Deploy in Genymotion, run the app and stop at the first code statement | `$ tns debug android --debug-brk --geny [--timeout ]` Attach the debug tools to a running app on device | `$ tns debug android --start [--device ] [--debug-port ] [--timeout ]` Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [] [--timeout ]` -Attach the debug tools to a running app in Genymotion | `$ tns debug android --start --geny [--print-app-output] [--timeout ]` -Livesync on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android --no-rebuild` -Livesync on device, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk [--device ] [--debug-port ] [--timeout ]` -Livesync in the native emulator, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --emulator [] [--timeout ]` -Livesync in Genymotion, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --geny [--timeout ]` -Livesync on device/emulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug android --watch [--debug-brk]` Detach the debug tools | `$ tns debug android --stop` -Debugs your project on a connected device, in a native emulator or in Genymotion. +Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or emulator. +While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. ### Options * `--device` - Specifies a connected device on which to debug the app. * `--emulator` - Specifies that you want to debug the app in the native Android emulator from the Android SDK. -* `--geny` - Specifies a Genymotion emulator on which you want to debug your app. * `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, launches the Chrome DevTools of your Chrome browser and stops at the first code statement. * `--start` - Attaches the debug tools to a deployed and running app. * `--stop` - Detaches the debug tools. * `--debug-port` - Sets a new port on which to attach the debug tools. * `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds. -* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application. -* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the index or name of the target device as listed by `$ tns device` * `` is an accessible port on the device to which you want to attach the debugging tools. * `` is any valid combination of options as listed by `$ tns help emulate android` -* `` is the name of the Genymotion virtual device that you want to use as listed by `$ genyshell -c "devices list"` <% if(isHtml) { %> -###Prerequisites +### Prerequisites * You must have Chrome installed on your system.
If you are using a non-standard named Chrome app on an OS X system (for example, a nightly Canary update), you need to set this name in the `ANDROID_DEBUG_UI_MAC` setting in the NativeScript [config.json](file:///<%= #{config.getConfigPath(config)} %>). @@ -55,9 +47,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/debug-ios.md b/docs/man_pages/project/testing/debug-ios.md index 634a2cfba5..59766b276e 100644 --- a/docs/man_pages/project/testing/debug-ios.md +++ b/docs/man_pages/project/testing/debug-ios.md @@ -8,12 +8,9 @@ Deploy on device, run the app and stop at the first code statement | `$ tns debu Deploy in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk --emulator [] [--no-client]` Attach the debug tools to a running app on device | `$ tns debug ios --start [--device ] [--no-client]` Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios --start --emulator [] [--no-client]` -Livesync on device, run the app, start Safari Web Inspector and attach the debugger | `$ tns debug ios --no-rebuild` -Livesync on device, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk [--device ] [--no-client]` -Livesync in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk --emulator [] [--no-client]` -Livesync on device/simulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug ios --watch [--debug-brk]` -Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) { %>Any debugging traffic is forwarded on port 8080 from the device to the local machine.<% } %> +Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) { %>Any debugging traffic is forwarded on port 8080 from the device to the local machine.<% } %> +While debugging, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. <% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help debug ios`<% } %> @@ -21,13 +18,14 @@ Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) <% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %> ### Options +* `--device` - Specifies a connected device on which to run the app. +* `--emulator` - Indicates that you want to debug your app in the iOS simulator. * `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, runs the app, launches the developer tools of your Safari browser and stops at the first code statement. * `--start` - Attaches the debug tools to a deployed and running app and launches the developer tools of your Safari browser. -* `--emulator` - Indicates that you want to debug your app in the iOS simulator. * `--no-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari. * `--timeout` - Sets the number of seconds that NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds. -* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application. -* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the index or name of the target device as listed by `$ tns device` @@ -55,9 +53,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/debug.md b/docs/man_pages/project/testing/debug.md index cc125dbb40..f0d8d6bde0 100644 --- a/docs/man_pages/project/testing/debug.md +++ b/docs/man_pages/project/testing/debug.md @@ -5,11 +5,11 @@ Usage | Synopsis ---|--- <% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns debug `<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns debug android`<% } %> -Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> +Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and refreshes the selected device. <% if((isConsole && isMacOS) || isHtml) { %>### Attributes `` is the target mobile platform for which you want to debug your project. You can set the following target platforms. -* `android` - Debugs your project on a connected Android device, native Android emulator or Genymotion emulator. +* `android` - Debugs your project on a connected Android device or Android emulator. * `ios` - Debugs your project on a connected iOS device or in a native iOS emulator.<% } %> <% if(isHtml) { %> @@ -30,9 +30,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/deploy.md b/docs/man_pages/project/testing/deploy.md index da72d4b28c..7338bbb0fd 100644 --- a/docs/man_pages/project/testing/deploy.md +++ b/docs/man_pages/project/testing/deploy.md @@ -6,7 +6,7 @@ Usage | Synopsis Deploy on Android | `$ tns deploy android [--device ] [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release]` <% if(isMacOS) { %>Deploy on iOS | `$ tns deploy ios [--device ] [--release]`<% } %> -Builds and deploys the project to a connected physical or virtual device. <% if(isMacOS) { %>You must specify the target platform on which you want to deploy.<% } %> +Prepares, builds and deploys the project to a connected physical or virtual device. <% if(isMacOS) { %>You must specify the target platform on which you want to deploy.<% } %> It will deploy the app on all connected devices targeting the selected platform. <% if(isMacOS) { %> <% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %> @@ -24,7 +24,7 @@ Builds and deploys the project to a connected physical or virtual device. <% if( * `--key-store-alias-password` - Provides the password for the alias specified with `--key-store-alias-password`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. ### Attributes -* `` is the index or name of the target device as listed by `$ tns device` +* `` is the index or name of the target device as listed by `$ tns devices` <% if(isHtml) { %> ### Command Limitations @@ -47,9 +47,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/emulate-android.md b/docs/man_pages/project/testing/emulate-android.md index d2c6c55bcc..f5fbcd646b 100644 --- a/docs/man_pages/project/testing/emulate-android.md +++ b/docs/man_pages/project/testing/emulate-android.md @@ -4,15 +4,15 @@ emulate android Usage | Synopsis ---|--- Run in the native emulator | `$ tns emulate android [--device ] [--path ] [--timeout ] [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release] [--justlaunch]` -Run in Genymotion | `$ tns emulate android --geny [--path ] [--timeout ] [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release] [--justlaunch]` Run in the default Android virtual device or in a currently running emulator | `$ tns emulate android [--path ] [--timeout ] [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release] [--justlaunch]` -Builds the specified project and runs it in the native emulator from the Android SDK or Genymotion. While your app is running, prints the output from the application in the console.<% if(isHtml) { %>If you do not select an Android virtual device (AVD) with the `--device` option or a Genymotion virtual device with the `--geny` option, your app runs in the default AVD or a currently running emulator, if any. <% } %> +Builds the specified project and runs it in the native emulator from the Android SDK. While your app is running, prints the output from the application in the console.<% if(isHtml) { %>If you do not select an Android virtual device (AVD) with the `--device` option, your app runs in the default AVD or a currently running emulator, if any. <% } %> ### Options +* `--available-devices` - Lists all available emulators for Android. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command * `--path` - Specifies the directory that contains the project. If not specified, the project is searched for in the current directory and all directories above it. -* `--device` - Sets the Android virtual device on which you want to run your app. You can set only one device at a time. You cannot use `--device` and `--geny` simultaneously. -* `--geny` - Sets the Genymotion virtual device on which you want to run your app. You can set only one device at a time. You cannot use `--device` and `--geny` simultaneously. +* `--device` - Sets the Android virtual device on which you want to run your app. You can set only one device at a time. * `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the virtual device to boot before quitting the operation and releasing the console. If not set, the default timeout is 120 seconds. To wait indefinitely, set 0. * `--release` - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the `--key-store-*` options. * `--key-store-path` - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. @@ -20,10 +20,10 @@ Builds the specified project and runs it in the native emulator from the Android * `--key-store-alias` - Provides the alias for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. * `--key-store-alias-password` - Provides the password for the alias specified with `--key-store-alias-password`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. * `--justlaunch` - If set, does not print the application output in the console. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the name of the Android virtual device that you want to use as listed by `$ android list avd` -* `` is the name of the Genymotion virtual device that you want to use as listed by `$ genyshell -c "devices list"` <% if(isHtml) { %> ### Prerequisites @@ -32,20 +32,9 @@ Before running your app in the Android emulator from the Android SDK, verify tha * Verify that you have added the following Android SDK directories to the `PATH` environment variable: * `platform-tools` * `tools` -* Before running your app in the Genymotion emulator, verify that your system meets the following requirements. - * Verify that you have installed Genymotion. - * On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable. - * On OS X systems, verify that you have added the following paths to the PATH environment variable. - * For Genymotion earlier than 2.6: - * `/Applications/Genymotion.app/Contents/MacOS/` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` - * For Genymotion 2.6: - * `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` ### Command Limitations -* You can run this command for one virtual device at a time. To test your app on multiple Android virtual devices, run `$ tns emulate android --device ` or `$ tns emulate android --geny ` for each virtual device. * When the `--release` flag is set, you must also specify all `--key-store-*` options. ### Related Commands @@ -61,9 +50,6 @@ Command | Description [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/emulate-ios.md b/docs/man_pages/project/testing/emulate-ios.md index cc7a53fe47..ad73948968 100644 --- a/docs/man_pages/project/testing/emulate-ios.md +++ b/docs/man_pages/project/testing/emulate-ios.md @@ -5,16 +5,19 @@ Usage | Synopsis ---|--- General | `$ tns emulate ios [--path ] [--device ] [--available-devices] [--release] [--timeout]` -Builds the specified project and runs it in the native iOS Simulator. +Prepares, builds and deploys the specified project. Runs it in the native iOS Simulator. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. <% if(isConsole && (isLinux || isWindows)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help emulate ios`<% } %> <% if((isConsole && isMacOS) || isHtml) { %>### Options -* `--available-devices` - Lists all available device type identifiers for the current Xcode. +* `--available-devices` - Lists all available emulators for the current Xcode. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. * `--release` - If set, produces a release build. Otherwise, produces a debug build. * `--path` - Specifies the directory that contains the project. If not specified, the project is searched for in the current directory and all directories above it. * `--device` - Specifies the name of the iOS Simulator device on which you want to run your app. To list the available iOS Simulator devices, run `$ tns emulate ios --available-devices` * `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the iOS Simulator to start before quitting the operation and releasing the console. The value must be a positive integer. If not set, the default timeout is 90 seconds. +* `--justlaunch` - If set, does not print the application output in the console. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the name of the iOS Simulator device on which you want to run your app as listed by `$ tns emulate ios --available-devices`<% } %> @@ -41,9 +44,6 @@ Command | Description [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/emulate.md b/docs/man_pages/project/testing/emulate.md index aa18d99625..52ea563ed9 100644 --- a/docs/man_pages/project/testing/emulate.md +++ b/docs/man_pages/project/testing/emulate.md @@ -5,7 +5,7 @@ Usage | Synopsis ---|--- <% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns emulate `<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns emulate android`<% } %> -Builds and runs the project in the native emulator for the selected target platform. <% if(isMacOS) { %>You must specify the target platform for which you want to build your project.<% } %> +Runs the project in the native emulator for the selected target platform. <% if(isMacOS) { %>You must specify the target platform for which you want to build your project.<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and refreshes all selected emulators. <% if((isConsole && isMacOS) || isHtml) { %>### Attributes `` is the target mobile platform for which you want to emulate your project. You can set the following target platforms. @@ -26,9 +26,6 @@ Command | Description [deploy](deploy.html) | Builds and deploys the project to a connected physical or virtual device. [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. diff --git a/docs/man_pages/project/testing/livesync-android.md b/docs/man_pages/project/testing/livesync-android.md index 41593453e4..0b0807b20e 100644 --- a/docs/man_pages/project/testing/livesync-android.md +++ b/docs/man_pages/project/testing/livesync-android.md @@ -7,6 +7,8 @@ General | `$ tns livesync android [--device ] [--watch]` Synchronizes the latest changes in your project to Android devices. +`This command is deprecated. It will be removed in the next version of NativeScript CLI. Use the "run" command instead.` + ### Options * `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device. * `--device` - Specifies the serial number or the index of the connected device to which you want to synchronize changes. To list all connected devices, grouped by platform, run `$ tns device` diff --git a/docs/man_pages/project/testing/livesync-ios.md b/docs/man_pages/project/testing/livesync-ios.md index 93871ba9da..c544f7315c 100644 --- a/docs/man_pages/project/testing/livesync-ios.md +++ b/docs/man_pages/project/testing/livesync-ios.md @@ -9,6 +9,8 @@ Synchronize changes to the iOS Simulator | `$ tns livesync ios --emulator [--wat Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. +`This command is deprecated. It will be removed in the next version of NativeScript CLI. Use the "run" command instead.` + ### Options * `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device. * `--device` - Specifies the serial number or the index of the connected device to which you want to synchronize changes. To list all connected devices, grouped by platform, run `$ tns device`. You cannot set `--device` and `--emulator` simultaneously. diff --git a/docs/man_pages/project/testing/livesync.md b/docs/man_pages/project/testing/livesync.md index 1fbabc2c07..12a372efbf 100644 --- a/docs/man_pages/project/testing/livesync.md +++ b/docs/man_pages/project/testing/livesync.md @@ -7,6 +7,8 @@ General | `$ tns livesync []` Synchronizes the latest changes in your project to devices. +`This command is deprecated. It will be removed in the next version of NativeScript CLI. Use the "run" command instead.` + ### Attributes `` is the target mobile platform to which you want to synchronize your changes. <% if(isHtml) { %>If you have connected only Android or only iOS devices, you can omit setting the target platform. If you have connected devices of multiple platforms, you must specify the target platform. <% } %>You can set the following target platforms. * `android` - Synchronizes the latest changes in your project to connected Android devices. diff --git a/docs/man_pages/project/testing/run-android.md b/docs/man_pages/project/testing/run-android.md index 8658fcaf8b..68172a9ffc 100644 --- a/docs/man_pages/project/testing/run-android.md +++ b/docs/man_pages/project/testing/run-android.md @@ -7,11 +7,11 @@ Run on all connected devices and running emulators | `$ tns run android [--key-s Run on a selected connected device or running emulator | `$ tns run android --device [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release] [--justlaunch]` Start an emulator and run the app inside it | `$ tns run android --emulator [] [--key-store-path --key-store-password --key-store-alias --key-store-alias-password ] [--release] [--justlaunch]` -Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console. +Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. ### Options -* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device. -* `--device` - Specifies a connected device on which to run the app. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. +* `--device` - Specifies a connected device/emulator on which to run the app. * `--emulator` - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other valid combination of emulator options as listed by `$ tns help emulate android`. * `--release` - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the `--key-store-*` options. * `--key-store-path` - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. @@ -19,6 +19,7 @@ Runs your project on a connected Android device or in a native Android emulator, * `--key-store-alias` - Provides the alias for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. * `--key-store-alias-password` - Provides the password for the alias specified with `--key-store-alias-password`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options. * `--justlaunch` - If set, does not print the application output in the console. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the index or name of the target device as listed by `$ tns device android` @@ -31,17 +32,6 @@ Before running your app in the Android emulator from the Android SDK, verify tha * Verify that you have added the following Android SDK directories to the `PATH` environment variable: * `platform-tools` * `tools` -* Before running your app in the Genymotion emulator, verify that your system meets the following requirements. - * Verify that you have installed Genymotion. - * On Windows and Linux systems, verify that you have added the Genymotion installation directory to the `PATH` environment variable. - * On OS X systems, verify that you have added the following paths to the `PATH` environment variable. - * For Genymotion earlier than 2.6: - * `/Applications/Genymotion.app/Contents/MacOS/` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` - * For Genymotion 2.6: - * `/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS` - * `/Applications/Genymotion Shell.app/Contents/MacOS/` - ### Command Limitations @@ -62,9 +52,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. [test init](test-init.html) | Configures your project for unit testing with a selected framework. diff --git a/docs/man_pages/project/testing/run-ios.md b/docs/man_pages/project/testing/run-ios.md index 11dc94b429..49503d47ef 100644 --- a/docs/man_pages/project/testing/run-ios.md +++ b/docs/man_pages/project/testing/run-ios.md @@ -7,18 +7,19 @@ Run on all connected devices | `$ tns run ios [--release] [--justlaunch]` Run on a selected connected device | `$ tns run ios [--device ] [--release] [--justlaunch]` Start an emulator and run the app inside it | `$ tns run ios --emulator [] [--release]` -Runs your project on a connected iOS device or in the iOS Simulator, if configured. This is shorthand for prepare, build, and deploy. While your app is running, prints the output from the application in the console. +Runs your project on a connected iOS device or in the iOS Simulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application. <% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help run ios`<% } %> <% if((isConsole && isMacOS) || isHtml) { %> <% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %> ### Options -* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device. +* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command. * `--device` - Specifies a connected device on which to run the app. * `--emulator` - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other valid combination of emulator options as listed by `$ tns help emulate ios`. You cannot use `--device` and `--emulator` simultaneously. * `--release` - If set, produces a release build. Otherwise, produces a debug build. * `--justlaunch` - If set, does not print the application output in the console. +* `--clean` - If set, forces rebuilding the native application. ### Attributes * `` is the index or name of the target device as listed by `$ tns device ios` @@ -50,9 +51,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform. [test init](test-init.html) | Configures your project for unit testing with a selected framework. diff --git a/docs/man_pages/project/testing/run.md b/docs/man_pages/project/testing/run.md index 9d26cd3322..1afbff00a3 100644 --- a/docs/man_pages/project/testing/run.md +++ b/docs/man_pages/project/testing/run.md @@ -5,11 +5,11 @@ Usage | Synopsis ---|--- <% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns run `<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns run android`<% } %> -Runs your project on a connected device or in the native emulator for the selected platform.<% if(isMacOS) { %>You must specify the target platform on which you want to run your project.<% } %><% if(isConsole && (isLinux || isWindows)) { %>You must run `$ tns run android`<% } %> +Runs your project on all connected devices or in native emulators for the selected platform.<% if(isMacOS) { %> You must specify the target platform on which you want to run your project.<% } %><% if(isConsole && (isLinux || isWindows)) { %>You must run `$ tns run android`<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and refreshes all selected devices. <% if((isConsole && isMacOS) || isHtml) { %>### Attributes `` is the target mobile platform on which you want to run your project. You can set the following target platforms. -* `android` - Runs your project on a connected Android device, in the native emulator or in Genymotion. +* `android` - Runs your project on a connected Android device, in the native emulator. * `ios` - Runs your project on a connected iOS device or in the iOS Simulator.<% } %> <% if(isHtml) { %> @@ -33,9 +33,6 @@ Command | Description [emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator. [emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator. [emulate](emulate.html) | You must run the emulate command with a related command. -[livesync](livesync.html) | Synchronizes the latest changes in your project to devices. -[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. -[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices. [run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured. [run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured. [test init](test-init.html) | Configures your project for unit testing with a selected framework. diff --git a/lib/commands/livesync.ts b/lib/commands/livesync.ts index fd5da9b505..da86a87daa 100644 --- a/lib/commands/livesync.ts +++ b/lib/commands/livesync.ts @@ -7,6 +7,11 @@ export class LivesyncCommand implements ICommand { private $errors: IErrors) { } public execute(args: string[]): IFuture { + + if (!this.$options.help && args[0]) { + this.$logger.warn('This command is deprecated. It will be removed in the next version of NativeScript CLI. Use "$ tns run" command instead.'); + } + this.$platformService.deployPlatform(args[0]).wait(); return this.$usbLiveSyncService.liveSync(args[0]); } @@ -16,7 +21,6 @@ export class LivesyncCommand implements ICommand { if (args.length >= 2) { this.$errors.fail("Invalid number of arguments."); } - let platform = args[0]; if (platform) { return _.includes(this.$mobileHelper.platformNames, this.$mobileHelper.normalizePlatformName(platform)) && this.$platformService.validateOptions(args[0]).wait();