...
Note: If you previously installed a global react-native-cli
, please remove it as it may cause unexpected issues: [sudo] npm remove -g react-native-cli
Development Setup
Clone project to your development workspace
Code Block git clone https://github.com/OpenTeleRehab/patient-service.git ~/dev/docker-projects/hiv/patient-app
Navigate to project root directory
Code Block cd ~/dev/docker-projects/hiv/patient-app
Run yarn to install node packages
Code Block yarn install
Configure
settings.js
Code Block cp config/ansible/roles/deploy/templates/settings.js.j2 config/settings.js
Edit file and replace/add value for:
isDebugMode =
true
// orfalse
if you want to disable redux log print outSet patient api URL
apiBaseURL
:'http://your-computer-ip:8084/api'
Set admin api URL
adminApiBaseURL
:'http://your-computer-ip:8082/api'
appVersion =
'1.0.0-local'
Start JS server with Metro Bundler
Code Block yarn start
Start your local emulator or plug with real mobile device
Android
Configure
build.gradle
Code Block cp config/ansible/roles/deploy/templates/build.gradle.j2 android/build.gradle
Edit file and replace value for:
majorApkVersion
= 1minorApkVersion
= 0patchApkVersion
= 0classifierApkVersion
= "local"
Start your local emulator or plug with real mobile device
Deploy development app to online testing device(s):
adb devices
Code Block yarn android
Note: if you have problem with missing
ndk
, please follow this instruction: Install NDK and check required version in fileandroid/build.gradle
Build released app
Android (.apk)
...