This page contains a list of all system requirements needed to build and run NativeScript apps on macOS, as well as a guided walkthrough for getting these requirements in place. On macOS systems, you can use the NativeScript CLI to develop Android and iOS apps.
- macOS Mavericks or later
- The latest stable official release of Node.js (LTS) 6.x
- (Optional) Homebrew to simplify the installation of dependencies
- For iOS development
- Latest Xcode
- Command-line tools for Xcode
- xcodeproj ruby gem
- (Optional) xcproj command line tool
- For Android development
- JDK 8
- Android SDK 22 or a later stable official release
- Android Support Repository
- (Optional) Google Repository
- Android SDK Build-tools 25.0.2 or a later stable official release
You must also have the following two environment variables setup for Android development:
Complete the following steps to setup NativeScript on your macOS development machine:
Install Homebrew to simplify the installation process.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node@6
Install the dependencies for iOS development.
- Run the App Store and download and install Xcode 5 or later.
- Go to Downloads for Apple Developers, log in and download and install the Command Line Tools for Xcode for your version of macOS and Xcode.
Install the xcodeproj ruby gem with the following command.
sudo gem install xcodeproj
sudo gem install cocoapods
(Optional) If you are using Xcode 7.3 as well as an older version of CocoaPods (0.39.0 or earlier), you must install the
xcprojcommand-line tool by running
brew install xcprojin your terminal. You can check your CocoaPods version with pod --version.
brew install xcproj
Install the dependencies for Android development.
- Install JDK 8.
- Go to Java SE Downloads and click Download for JDK.
- In the Java SE Development Kit section, accept the license agreement and click the download link for macOS.
- Wait for the download to complete and install the JDK.
Set the JAVA_HOME system environment variable.
Install the Android SDK.
In the terminal, run the following commands:
brew cask install android-sdk
Next, run the following command to set the ANDROID_HOME system environment variable:
NOTE: This is the directory that contains the
In addition, install all packages for the Android SDK Platform 25, Android SDK Build-Tools 25.0.2 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 "tools" "platform-tools" "platforms;android-25" "build-tools;25.0.2" "extras;android;m2repository" "extras;google;m2repository"
- Install JDK 8.
Setup Android Emulators (AVD) by following the article here
Install the NativeScript CLI.
Run the following command.
npm i -g nativescript
Restart the command prompt.
To check if your system is configured properly, run the following command.