Trustroots.org mobile app built with Expo.io and React Native.
Install for Android via Play Store or download APK.
Currently the app merely wraps Trustroots.org site in a WebView
component and provides push notifications.
- You need Node.js installed
- Install Expo CLI
npm install -g expo
- Run
npm ci
in project directory - Create settings file:
cp Settings-example.js Settings.js
(and modify contents if needed) - Start the application by running
npm start
- Get an Expo account. You register from Expo web site or by using command line utility.
- Install Expo App to your mobile phone:
- Android
- iOS
- or download APK or IPA via tools page.
If you prefer emulator instead of using physical phone check out instructions form Expo site.
Note that emulator cannot process push notifications.
Type expo ios
or expo android
to open the application in emulators.
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. - Open
Settings.js
and setBASE_URL
tohttp://YOUR-IP-ADDRESS:3000/
. - 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.
- Read Debugging React Native
- Check out React devtools
MIT