Setting up the mobile app
Requirements
- Administrator permissions
- Installed Git
Please follow the React Native CLI Quickstart Guide for your desired development/target OS. If you do that correctly, you're ready to deploy this repository.
Configuration
Cloning the repository
Setting the config file
- First open the config file (Path: App/Config/AppConfig.js) in an editor.
- Change the intervention variables to the information of the created or existing intervention.
- Change the remote URL variables to the host you want to connect.
For example:
All other variables are explained HERE
Changing the project name and the App identifier
note
This needs to be changed if you want to use push notifications and/or publish the app.
First you have to open your mobilecoach-client folder in the terminal. You can simply rename almost all of the needed files.
For example:
Additional Todo for Android:
Open the google-services file in (Path: android/app/google-services.json).
Edit the package name on line 13.
For example:
caution
react-native-rename works for MacOS users and it may not work for other platforms. If you are using Windows or Linux, please try this instruction.
Installing all dependencies
You have to be in the mobilecoach-client folder.
Starting the metro bundler
In a new tab of your terminal, run the following command in the mobilecoach-client folder. This should start the metro bundler.
Running the app
note
Important: A connected smartphone or an installed emulator is required.
OR running it for instance on an iPhone Simulator
Troubleshooting
- Presence of a
.git
file in the project folders in node_modules would produce an error when executingyarn
commands. Please remove them as shown below.
- Building failed because of "java.io.IOException: Unable to delete directory
pathToPackage
" Execute the following commands: