Skip to content

Setting up Your Development Environment

Brett Weissbart edited this page May 10, 2023 · 15 revisions

Contents

You'll need a Mac with Xcode to build iOS applications. Windows and Linux computers can be used to develop Android applications.

Homebrew

Homebrew is a popular package manager for Mac OS and is utilized as part of React Native's setup documentation. While not mandatory, Homebrew makes installing dependencies such as Node and Cocoapoads extremely easy. Refer to the Homebrew website for instructions.

React Native, Xcode, and Android Studio

We recommend following React Native's Getting Started guide for installing all necessary applications and frameworks.

  1. Click the "React Native CLI Quickstart" tab
  2. Select the tab corresponding to your development machine's OS: macOS, Windows, or Linux
  3. Select the tab corresponding to the mobile OS you which to set up: iOS or Android
  4. Follow the steps in the "Installing Dependencies" section
  5. Repeat for all mobile OSes you wish to use

image

Once complete, please verify that you have all of the necessary software installed:

✔ Node

✔ Watchman

✔ OpenJDK or Oracle JDK

✔ React Native CLI

✔ Xcode (iOS development)

✔ Xcode Command Line Tools (these will be installed the first time you launch Xcode)

✔ Android SDK (Android development)

✔ Android Studio (Android development)

NVM

NVM (short for Node Version Manager) is a command-line manager that allows you to quickly install and switch between multiple versions of Node.

To install, follow their installation instructions: https://github.com/nvm-sh/nvm#install--update-script

To run Flagship 10 & 11 apps you'll need Node 14: nvm install 14

Yarn

We use Yarn for installing and managing NPM dependencies within our projects. Once you have installed Node with the above instructions, simply run npm install -g yarn to install Yarn.

Xcode Configuration

From your terminal, run the following:

xcode-select -p

The output should be the path to an Xcode app, as in the following example:

$ xcode-select -p
/Applications/Xcode10.3.app/

(There may be a /Contents/Developer at the end of the path, that's OK!)

If the output does not point to an Xcode app, run the following:

sudo xcode-select -s /Applications/Xcode.app

iOS Simulator

If this is your first time installing Xcode, you'll need to install at least one simulator.

  1. Open Xcode
  2. Navigate to Xcode > Preferences
  3. Click on the Components tab
  4. Click the download tab for the version of the simulator that you wish to install (this will typically be the latest version of iOS)

image

CocoaPods

CocoaPods is the standard library for managing dependencies within iOS projects. Refer to their website or use Homebrew: brew install cocoapods.

Download an IDE

We recommend VSCode (free) for its compatibility with all major OSes, support for JavaScript and TypeScript, and community support.

Clone this wiki locally