Wiki

Clone wiki

MobileCoach demonstration / Using-the-MobileCoach-client

Using the MobileCoach client

Requirements

Running the App

  • In the directory of the cloned repository, run rm -rf node_modules && npm install and react-native link.
  • In a separate terminal in the same folder, run react-native start.

For the iOS app

  • For iOS App, you need the latest version of XCode and the latest macOS.
  • Run react-native run-ios and 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.sh in the terminal.
  • Run react-native run-android.

Editing the configuration file (./App/AppConfig.js) of the MobileCoach client

  • Set useLocalServer as true to connect to local server (Eg. when connected through virtual box running locally).
  • Set interventionPattern to the name of the intervention. (Eg. interventionPattern = ‘TestIntervention’).
  • Set interventionPassword same as the deepstream password set in the MC webapp.

Troubleshooting

For the iOS app

  • If you get an error with the package react-native-vector-icons, Run rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json and re-run react-native start and react-native run-ios.

Updated