Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Latest commit

 

History

History
98 lines (76 loc) · 1.71 KB

README.md

File metadata and controls

98 lines (76 loc) · 1.71 KB

RN Example

This is React Native Demo Project

requirements

iOS:

  • Make sure you have Xcode installed (tested with Xcode 11.2.1).
  • Make sure you have iOS simulators installed (tested with iPhone 11 Pro Max/iOS 13.2).
  • Make sure you have node installed (tested with node 12.12).

Android:

  • Make sure you have Android Studio installed(Android SDK、Android SDK Platform、Performance (Intel ® HAXM)、Android Virtual Device)
  • Make sure you have Android SDK installed(tested with Android SDK Platform 28, Android 9 (Pie))
  • Make sure you have created a Android Virtual Device(tested with Pixel_3_API_28)
  • Make sure you have set the $HOME/.bashrc or $HOME/.bash_profile
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

generate the compiled files

In the root directory

  • iOS:
make build-ios-rn-example
  • Android:
make build-android-rn-example

install

  1. install node_modules
yarn install
  1. install pod
(cd ios && pod install)
  1. generate the Protocol Buffers
yarn pbjs

run

  • run iOS
yarn ios
  • run Android
yarn android

e2e

We use Detox for e2e test.

run iOS

  1. install applesimutils

A collection of utils for Apple simulators, Detox uses it to communicate with the simulator.

brew tap wix/brew
brew install applesimutils
  1. run e2e
yarn e2e

or run debug mode

yarn e2e:debug

run Android

yarn e2e:android

or run debug mode

yarn e2e:debug:android