Firstly, you need a Mac computer for iOS development. If you want to build an Android app only, you can try experimental Linux and Windows support. These instructions presume an OS X installation.
Before you get started, make sure you have the following dependencies installed on your machine:
-
NodeJS 5.x or newer
-
Homebrew (or an alternative way to install OSX packages)
-
Latest React Native CLI
$ npm install -g react-native-cli
Install dependencies from NPM
$ npm install
Create a blank configuration file
$ cp env.example.js env.js
- Install Requirements:
- Xcode for iOS development (download from Mac App Store)
- Ruby (>2.2) to run CocoaPods
- CocoaPods 1.0 or newer for iOS package management.
Please note that CocoaPods 0.x will not work, and at the time of writing the version in Homebrew is still 0.39, so check your pod --version
and install 1.0 with gem
if necessary.
-
Install native iOS dependencies
$ (cd ios; pod repo update; pod install)
-
Build the app and run the simulator:
$ react-native run-ios
More details here: React Native Android Setup
-
Install latest JDK
-
Install the Android SDK
-
Set ANDROID_HOME environment variable in .bashrc, .zshrc or similar:
-
Start Android SDK Manager
$ android
-
Add SDK tools via Android sdk manager
- Android SDK tools
- Android SDK Platform-tools
- Android SDK Build-tools (Important: Rev. 23.0.1)
- SDK Platform
- Intel x86 Atom_64 System Image
- Intel x86 Atom System Image
- Android Support Repository
- Android Support Library
- Intel x86 Emulator Accelerator (HAXM installer)
-
Configure and install hardware acceleration
-
Open Android Virtual Device manager
android avd
- Add new virtual device
- name: reactnative
- Device: Nexus 5
- Target: Android 6 - API Level 23
- CBU: Intel Atom x86
- check Use Host GPU
-
Build app and run emulator:
$ react-native run-android
-
Before you start you need to create a new application in Auth0
-
Set
AUTH0_CLIENT_ID
andAUTH0_DOMAIN
inenv.js
according to your application you created in AuthAUTH0_CLIENT_ID: '<CLIENT_ID>', AUTH0_DOMAIN: '<ACCOUNT_NAME>.eu.auth0.com'
-
Follow the steps for your platform below. Check the official instructions for more information.