Setting up React Native Development

This chapter deals only with React Native development for iOS. I’ll be using only universal cross-platform components—for example, Navigator and not NavigatorIOS—so the code provided should work for Android too. However, I won’t go into the details of how you would compile Android projects.

If you don’t work on Apple hardware with Mac OS X, you can install a virtual machine running Mac OS X on a Linux or Windows OS by following this guide. Moving forward, I assume we are all working on Mac OS X, either virtual or not, to build iOS apps.

To get everything installed, you can do it manually or use a package manager. Since we’re working in a Mac OS X environment, I recommend using Homebrew (a.k.a. brew) to install some of the required tools. If you don’t have Homebrew already, you can go to its website, http://brew.sh, or run this Ruby command (Mac OS X comes with Ruby):

1 $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/maste\
2 r/install)"

We will need the following tools and libraries:

I recommend using NVM v0.29.0, n, or a similar Node version manager. This step is optional but recommended because it means you can switch to Node.js v5.1 even if your main version is more recent. To use Homebrew, execute $ brew install nvm and follow the instructions.

Your system should be ready for the development of iOS apps. Let’s start with the quintessential programming example, Hello World.