The following steps assume that you are developing on Mac.
- Clone this repo:
git clone https://github.com/kiddkevin00/local-detour.git
. - Install Xcode and update to the latest version.
- Download and install Android Studio.
- Install all dependencies by running
npm install
.
- Open Getting Started and click the Android button under macOS for reference.
- Run
brew install android-sdk
. - [Optional] Add
export ANDROID_HOME=/usr/local/opt/android-sdk
to "/.bashrc", "/.bash_profile" or "~/.zshrc" (ZSH). - Open Android Studio and click Configure.
- Edit Android SDK Location to be
/usr/local/opt/android-sdk
&& Select all API levels that are 23+ - Click on Show Package Details in the bottom and make sure to install the following packages:
- Create file in "$HOME/.gradle/gradle.properties" and add
REACT_NATIVE_PACKAGER_PORT = 8085
to it.
cd local-detour/
react-native start
react-native run-ios
cd local-detour/
react-native start
npm run map-adb-ports;
8097 (Nuclide/Atom)react-native run-android
react-native run-android
orreact-native run-ios
only needs to be run once to install the app on a device, unless there is any change to native code.npm run map-adb-ports
needs to be run every time a emulator starts or a physical Android device is re-connected.- Normal Steps is to run
react-native start
(Start Server) &&react-native run-(platform)
(ios | android) to build the app on a device.