Usage | Synopsis |
---|---|
Deploy on device, run the app, start Safari Web Inspector and attach the debugger | $ tns debug ios |
Deploy on device, run the app and stop at the first code statement | $ tns debug ios --debug-brk [--device <Device ID>] [--no-client] |
Deploy in the iOS Simulator, run the app and stop at the first code statement | $ tns debug ios --debug-brk --emulator [<Emulator Options>] [--no-client] |
Attach the debug tools to a running app on device | $ tns debug ios --start [--device <Device ID>] [--no-client] |
Attach the debug tools to a running app in the iOS Simulator | $ tns debug ios --start --emulator [<Emulator Options>] [--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 <Device ID>] [--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 [<Emulator Options>] [--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.<% } %>
<% 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
<% } %>
<% 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.<% } %>
--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
.
<Device ID>
is the index or name of the target device as listed by$ tns device
<Emulator Options>
is any valid combination of options as listed by$ tns help emulate ios
<% } %> <% if(isHtml) { %>
- If you want to debug in the iOS Simulator, you must have Xcode 6 or later installed on your system.
- You can run
$ tns debug ios
only on OS X systems.
Command | Description |
---|---|
build android | Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator. |
build ios | Builds the project for iOS and produces an APP or IPA that you can manually deploy in the iOS Simulator or on device, respectively. |
build | Builds the project for the selected target platform and produces an application package that you can manually deploy on device or in the native emulator. |
debug android | Debugs your project on a connected Android device or in a native emulator. |
debug | Debugs your project on a connected device or in a native emulator. |
deploy | Builds and deploys the project to a connected physical or virtual device. |
emulate android | Builds the specified project and runs it in a native Android emulator. |
emulate ios | Builds the specified project and runs it in the native iOS Simulator. |
emulate | You must run the emulate command with a related command. |
livesync | Synchronizes the latest changes in your project to devices. |
livesync ios | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator. |
livesync android | Synchronizes the latest changes in your project to Android devices. |
run android | Runs your project on a connected Android device or in a native Android emulator, if configured. |
run ios | Runs your project on a connected iOS device or in the iOS Simulator, if configured. |
run | Runs your project on a connected device or in the native emulator for the selected platform. |
test init | Configures your project for unit testing with a selected framework. |
test android | Runs the tests in your project on Android devices or native emulators. |
test ios | Runs the tests in your project on iOS devices or the iOS Simulator. |
<% } %> |