Setting up the development environment run react native
Installing dependencies
You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio.
Node & Watchman
Recommend install node > v16 version.
We recommend installing Node and Watchman using Homebrew. Run the following commands in a Terminal after installing Homebrew:
brew install node
brew install watchman
Java Development Kit
We recommend installing the OpenJDK distribution called Azul Zulu using Homebrew. Run the following commands in a Terminal after installing Homebrew:
brew tap homebrew/cask-versions
brew install --cask zulu11
The Zulu OpenJDK distribution offers JDKs for both Intel and M1 Macs. This will make sure your builds are faster on M1 Macs compared to using an Intel-based JDK.
Or you can download jdk HERE. Choose JDK Version 11 of source Pharmacity
Configure the PATH ENV for JDK
Android development environment
1. Install Android Studio
Android SDKAndroid SDK PlatformAndroid Virtual Device
2. Install the Android SDK
The SDK Manager can also be found within the Android Studio "Preferences" dialog, under Appearance & Behavior → System Settings → Android SDK.
3. Configure the ANDROID_SDK_ROOT environment variable
Warning: You need install SDK,NDK... in SDK Manager in Android Studio before run source android
Xcode tool
Download Xcode in Appstore and setup step by step
Notes: Open xcode preferences and accept command line tools in settings
Install Reactotron tools for debug api and redux action Here
Now you can clone source from Pharmacity App
Enter terminal after clone source code
##for ios
cd "Path to source/pmc-mobile-app"
npm install/yarn install
cd ios && pod install
open Xcode -> run source with emulator
##for android
npm install/yarn install
cd android && ./gradlew clean
open AndroidStudio -> run source with emulator
If you want run source to Real device:
Check abd and device connect with computer/laptop
This check devices have connect or disconect
adb devices
Convert port to 8081
adb reverse tcp:8081 tcp:8081
yarn run android/ios