Setup for Mac

suggest change

Installing package manager Homebrew brew

Paste the following at a Terminal prompt.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing Xcode IDE

Download it using link below or find it on Mac App Store

https://developer.apple.com/download/

NOTE: If you have Xcode-beta.app installed along with the production Xcode.app, make sure you are using the production xcodebuild. Set it with:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

Installing Android environment

If you installed Xcode, Git is already installed. Otherwise run:

brew install git

Choose a Custom installation.

Choose both Performance and Android Virtual Device.

After installation, choose Configure -> SDK Manager from the Android Studio welcome window.

In the SDK Platforms window, choose Show Package Details and under Android 6.0 (Marshmallow), make sure that Google APIs, Intel x86 Atom System Image, Intel x86 Atom_64 System Image, and Google APIs Intel x86 Atom_64 System Image are checked.

In the SDK Tools window, choose Show Package Details and under Android SDK Build Tools, make sure that Android SDK Build-Tools 23.0.1 is selected.

Point ANDROID_HOME at your Android SDK. Add the line below to ~/.bashrc, ~/.bash_profile, or the file your shell uses, then open a new terminal.

If you installed the SDK without Android Studio, the path may instead be /usr/local/opt/android-sdk.

export ANDROID_HOME=~/Library/Android/sdk

Dependencies for Mac

You will need Xcode for iOS and Android Studio for Android, Node.js, the React Native command-line tools, and Watchman.

We recommend installing node and watchman via Homebrew.

brew install node
brew install watchman

Watchman is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance. It is optional.

Node comes with npm, which lets you install the React Native command line interface.

npm install -g react-native-cli

If you get a permission error, try with sudo:

sudo npm install -g react-native-cli

For iOS, the easiest way to install Xcode is the Mac App Store. For Android, download and install Android Studio.

If you plan to make changes in Java code, we recommend Gradle Daemon which speeds up the build.

Testing your React Native Installation

Use the React Native command-line tools to generate a project called "AwesomeProject", then run react-native run-ios inside that folder.

react-native init AwesomeProject
cd AwesomeProject
react-native run-ios

You should see the new app in the iOS Simulator shortly. react-native run-ios is one way to run it. You can also run it from Xcode or Nuclide.

Modifying your app

Now that you have successfully run the app, let’s modify it.

Congratulations! You’ve successfully run and modified your first React Native app.

source: Getting Started - React-Native

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents