Trustroots Mobile App
Currently the app merely wraps Trustroots.org site in a
WebView component and provides push notifications.
Getting started with development
Before you start
- You need Node.js installed
- Install Expo CLI
npm install expo-cli --global
npm ciin project directory
- Create settings file:
cp Settings-example.js Settings.js(and modify contents if needed)
- Start the application by running
Running the app on physical phone
- Get an Expo account. You register from Expo web site or by using command line utility.
- Install Expo App to your mobile phone:
Running in emulator
If you prefer emulator instead of using physical phone check out instructions form Expo site.
Note that emulator cannot process push notifications.
expo start --ios or
expo start --android to open the application in emulators.
Running local development version of the site inside the app
By default app is configured to load site from
https://www.trustroots.org in the WebView, but you can change this to load your local version.
Before you start, install and run Trustroots on your local machine.
To load your local version:
- You should have Trustroots website running at http://localhost:3000.
- Find your computer's private network IP. You can verify it by loading
http://YOUR-IP-ADDRESS:3000/in your browser.
- Done! You should now see the page refresh on your phone or emulator if you change any files at the website.
Note that if you want to use https or different port, you need to configure those from Trustroots's configuration files.