trustroots-expo-mobile
trustroots-expo-mobile copied to clipboard
Basic mobile WebView wrapper for Trustroots.org
Trustroots Mobile App
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.
Getting started with development
Before you start
- You need Node.js installed
- Install Expo CLI
npm install expo-cli --global
- 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
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:
- Android
- iOS
- or download APK or IPA via tools page.
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.
Type 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. - 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.
Debugging
- Read Debugging React Native
- Check out React devtools
License
MIT