Skip to content

Instantly share code, notes, and snippets.

@nnnikolay
Last active June 14, 2018 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nnnikolay/24722ae4857d2cb8f1b2df30d84a1c99 to your computer and use it in GitHub Desktop.
Save nnnikolay/24722ae4857d2cb8f1b2df30d84a1c99 to your computer and use it in GitHub Desktop.

Requirements

You need to have installed brew on your laptop

Development

IDE

Install Visual Studio Code

$ brew cask install visual-studio-code

Install React Native Tools for Visual Studio Code

Running on device

For OS X users you need to install watchman

$ brew install watchman

To be able to run the App on the device follow the link and choose required platform (iOS, Android). Install it on your device first and then you can run npm start from the source project tree

Running in Emulator

Android

To run an Android emulator you need to have complete following steps:

Install Android SDK, Java JDK and HAXM (for improving graphic performance)

$ brew cask install android-sdk intel-haxm caskroom/versions/java8

Don't forget to export following variable - ANDROID_SDK_ROOT after installation will be finished.

Then you need to set up and run the Android Emulator

$ sdkmanager "emulator"

Install system image

$ sdkmanager "system-images;android-P;default;x86_64"

Create Android Virtual Device (AVD)

$ avdmanager create avd -n TestDeviceP -k "system-images;android-P;default;x86_64"

Now you can see the list of available AVDs

$ ${ANDROID_SDK_ROOT}/tools/emulator -list-avds

Run Emulator

$ ${ANDROID_SDK_ROOT}/tools/emulator -avd TestDeviceP -skin 800x600

iOS

To run iOS emulator you need to install XCode from the AppStore and run the following command

$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Running

As soon appropriated emulator has been installed you can run it as either

npm run android or npm run ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment