<commit_before>---
title: NativeScript Advanced Setup—OS X
description: Configure your OS X system to create, develop and build projects locally with NativeScript.
position: 4
publish: false
slug: osx
previous_url: /setup/ns-cli-setup/ns-setup-os-x
---

# NativeScript Advanced Setup: OS X

This page contains a list of all system requirements needed to build and run NativeScript apps on OS X, as well as a guided walkthrough for getting these requirements in place. On OS X systems, you can use the NativeScript CLI to develop Android and iOS apps.

* [System Requirements](#system-requirements)
* [Advanced Setup Steps](#advanced-setup-steps)

## System Requirements

* OS X Mavericks or later
* The latest Node.js 0.10.x, 0.12.x, 4.x, or 5.x stable official release
* (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 or a later stable official release
    * Android SDK 22 or a later stable official release
    * Local Maven repository for Support Libraries
    * Android SDK Build-tools 23.0.0 or a later stable official release
    * (Optional) Genymotion to expand your testing options

You must also have the following two environment variables setup for Android development:

* JAVA_HOME
* ANDROID_HOME

## Advanced Setup Steps

Complete the following steps to setup NativeScript on your OS X development machine:

1. Install [Homebrew](http://brew.sh) to simplify the installation process.

    <pre class="add-copy-button"><code class="language-terminal">ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    </code></pre>

1. Install the latest Node.js stable official release. We recommend using Node.js v4.x.

    <pre class="add-copy-button"><code class="language-terminal">brew install homebrew/versions/node4-lts
    </code></pre>

1. Install the dependencies for iOS development.
    1. Run the App Store and download and install Xcode 5 or later.
    1. Go to [Downloads for Apple Developers](https://developer.apple.com/downloads/index.action), log in and download and install the **Command Line Tools for Xcode** for your version of OS X and Xcode.
    1. Install the [xcodeproj ruby gem](https://rubygems.org/gems/xcodeproj/versions/0.28.2) with the following command.

        <pre class="add-copy-button"><code class="language-terminal">sudo gem install xcodeproj
        </code></pre>

    1. [Install CocoaPods](https://guides.cocoapods.org/using/getting-started.html#getting-started)

        <pre class="add-copy-button"><code class="language-terminal">sudo gem install cocoapods
        </code></pre>

    1. (Optional) If you are using Xcode 7.3 and CocoaPods 0.39.0 or earlier you **must** install [xcproj](https://github.com/0xced/xcproj#installation) command-line tool either by running `brew install xcproj` in the terminal, or building the xcproj tool manually with `xcodebuild`.

        <pre class="add-copy-button"><code class="language-terminal">brew install xcproj
        </code></pre>

1. Install the dependencies for Android development.
    1. Install [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or a later stable official release.
        1. Go to [Java SE Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and click **Download** for JDK.
        1. In the **Java SE Development Kit** section, accept the license agreement and click the download link for Mac OS X.
        1. Wait for the download to complete and install the JDK.
    1. Set the JAVA_HOME system environment variable.

        <pre class="add-copy-button"><code class="language-terminal">export JAVA_HOME=$(/usr/libexec/java_home)
        </code></pre>

    1. Install the [Android SDK](http://developer.android.com/sdk/index.html).
        1. In the terminal, run the following command.

            <pre class="add-copy-button"><code class="language-terminal">brew install android-sdk<commit_msg>OS X setup: List CocoaPods as a system requirement<commit_after>---
title: NativeScript Advanced Setup—OS X
description: Configure your OS X system to create, develop and build projects locally with NativeScript.
position: 4
publish: false
slug: osx
previous_url: /setup/ns-cli-setup/ns-setup-os-x
---

# NativeScript Advanced Setup: OS X

This page contains a list of all system requirements needed to build and run NativeScript apps on OS X, as well as a guided walkthrough for getting these requirements in place. On OS X systems, you can use the NativeScript CLI to develop Android and iOS apps.

* [System Requirements](#system-requirements)
* [Advanced Setup Steps](#advanced-setup-steps)

## System Requirements

* OS X Mavericks or later
* The latest Node.js 0.10.x, 0.12.x, 4.x, or 5.x stable official release
* (Optional) Homebrew to simplify the installation of dependencies
* For iOS development
    * Latest Xcode
    * Command-line tools for Xcode
    * xcodeproj ruby gem
    * CocoaPods
    * (Optional) xcproj command line tool
* For Android development
    * JDK 8 or a later stable official release
    * Android SDK 22 or a later stable official release
    * Local Maven repository for Support Libraries
    * Android SDK Build-tools 23.0.0 or a later stable official release
    * (Optional) Genymotion to expand your testing options

You must also have the following two environment variables setup for Android development:

* JAVA_HOME
* ANDROID_HOME

## Advanced Setup Steps

Complete the following steps to setup NativeScript on your OS X development machine:

1. Install [Homebrew](http://brew.sh) to simplify the installation process.

    <pre class="add-copy-button"><code class="language-terminal">ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    </code></pre>

1. Install the latest Node.js stable official release. We recommend using Node.js v4.x.

    <pre class="add-copy-button"><code class="language-terminal">brew install homebrew/versions/node4-lts
    </code></pre>

1. Install the dependencies for iOS development.
    1. Run the App Store and download and install Xcode 5 or later.
    1. Go to [Downloads for Apple Developers](https://developer.apple.com/downloads/index.action), log in and download and install the **Command Line Tools for Xcode** for your version of OS X and Xcode.
    1. Install the [xcodeproj ruby gem](https://rubygems.org/gems/xcodeproj/versions/0.28.2) with the following command.

        <pre class="add-copy-button"><code class="language-terminal">sudo gem install xcodeproj
        </code></pre>

    1. Install [CocoaPods](https://guides.cocoapods.org/using/getting-started.html)

        <pre class="add-copy-button"><code class="language-terminal">sudo gem install cocoapods
        </code></pre>

    1. (Optional) If you are using Xcode 7.3 and CocoaPods 0.39.0 or earlier you **must** install [xcproj](https://github.com/0xced/xcproj#installation) command-line tool either by running `brew install xcproj` in the terminal, or building the xcproj tool manually with `xcodebuild`.

        <pre class="add-copy-button"><code class="language-terminal">brew install xcproj
        </code></pre>

1. Install the dependencies for Android development.
    1. Install [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or a later stable official release.
        1. Go to [Java SE Downloads](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and click **Download** for JDK.
        1. In the **Java SE Development Kit** section, accept the license agreement and click the download link for Mac OS X.
        1. Wait for the download to complete and install the JDK.
    1. Set the JAVA_HOME system environment variable.

        <pre class="add-copy-button"><code class="language-terminal">export JAVA_HOME=$(/usr/libexec/java_home)
        </code></pre>

    1. Install the [Android SDK](http://developer.android.com/sdk/index.html).
        1. In the terminal, run the following command.

            <pre class="add-copy-button"><code class="language-terminal">brew install android-sdk
{'fraction_non_alphanumeric': 0.09933373712901272, 'fraction_numerical': 0.011387038158691703, 'mean_word_length': 3.7612456747404845, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1513890', 'n_tokens_mistral': 2442, 'n_tokens_neox': 2288, 'n_words': 896}