Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Latest commit

 

History

History
91 lines (60 loc) · 4.3 KB

ns-setup-win.md

File metadata and controls

91 lines (60 loc) · 4.3 KB
title description position tags slug publish previous_url
NativeScript Advanced Setup — Windows
Follow this walkthrough to learn how to install the NativeScript requirements in order to start creating, developing and building mobile apps on Windows.
30
nativescript setup, nativescript windows setup
windows
false
/setup/ns-cli-setup/ns-setup-win,/start/ns-setup-installer

NativeScript Advanced Setup: Windows

This page contains a guided walkthrough for installing NativeScript requirements and start building and running NativeScript apps on Windows.

NOTE: On Windows systems you can only use the NativeScript CLI to develop Android apps. This is because the NativeScript CLI uses Xcode to build iOS apps, which is only available on the macOS operating system. If you’re interested in building iOS apps on Windows, you may want to try out NativeScript Sidekick. NativeScript Sidekick provides robust tooling for NativeScript apps, including a service that performs iOS and Android builds in the cloud, removing the need to complete these system requirements, and allowing you to build for iOS on Windows.

Prerequisites

  • Windows 7 Service Pack 1 or later

Setup Steps

Complete the following steps to set up NativeScript on your Windows development machine:

  1. Install Chocolatey to simplify the installation and configuration of the requirements.

    • Run the command prompt as an Administrator.

    • Copy and paste the following script in the command prompt.

      Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
        
    • Restart the command prompt.

  2. Install Google Chrome (required to debug NativeScript apps)

    • In the command prompt, run the following command.

      choco install googlechrome -y
        
  3. Install the latest Node.js LTS

    • In the command prompt, run the following command.

      choco install nodejs-lts -y
        
  4. Set up JDK 8

    • In the command prompt, run the following command.

      choco install adoptopenjdk --version 8.192
        
  5. Install the Android SDK.

    • In the command prompt, run the following command.

      choco install android-sdk -y
        
    • Restart the command prompt.

  6. Install all packages for the Android SDK Platform 28, Android SDK Build-Tools 28.0.3 or later, Android Support Repository, Google Repository and any other SDKs that you may need. You can alternatively use the following command, which will install all required packages.

    "%ANDROID_HOME%\tools\bin\sdkmanager" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"
     
  7. Setup Android Emulators (AVD) by following the article [here]({%slug android-emulators%})

  8. Install the NativeScript CLI.

    • Run the following command.

      npm i -g nativescript
        
    • Restart the command prompt.

  9. To check if your system is configured properly, run the following command.

    tns doctor
    

If you see "No issues were detected" you are good to go!

NativeScript tns doctor result

What’s Next

{% angular %}

{% nativescript %}