Using the MobileCoach client
- Clone the repository MobileCoach Client.
- Please install react native.
- Set API Key from crashlytics in android/app/src/main/AndroidManifest.xml and in ios/APP_FOLDER/Info.plist.
Running the App
- In the directory of the cloned repository, run
rm -rf node_modules && npm installand
- In a separate terminal in the same folder, run
For the iOS app
- For iOS App, you need the latest version of XCode and the latest macOS.
react-native run-iosand it should start the ios simulator automatically if it is not open already.
- Troubleshooting: See below.
For the Android app
- For the Android App, you need the latest version of Android Studio including some target SDKs (currently we recommend: compileSdkVersion 26, buildToolsVersion 26.0.1, minSdkVersion 16, targetSdkVersion 22 in the Gradle file) and the Android SDK tools.
- Then an Android virtual device (e.g. a Pixel with Android 7) should be created and started.
- Switch to the mobile client folder and run
./android-reverse-ports.shin the terminal.
Editing the configuration file (./App/AppConfig.js) of the MobileCoach client
- Set useLocalServer as false to connect to remote server. Also, set the remoteDeepstreamURL and remoteRestURL.
- Set interventionPattern to the name of the intervention. (Eg. interventionPattern = ‘TestIntervention’).
- Set interventionPassword same as the deepstream password set in the MC WebApp.
- If you get an error with the package react-native-vector-icons,
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.jsonand re-run
- Update the gradle files or the gradle version, if necessary for android.