B1Mobile
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Slack.
Join us onB1Mobile Setup
- Copy dotenv.sample.txt to .env
- Run
npm i
to install dependencies
Running the app
Method 1
- Start React Native - Run
npm start
to start the React Native server (server runs on 8081 port). - Install Android App - In Android Studio open the /android folder and click the run button to install the app on your device.
- Connect App to React Native - Either shake the device or run
adb shell input keyevent 82
to open the developer menu. Go to settings, Debug server host and enter YourIP:8081. Restart the app and it should work properly.
Method 2
- Start and Install - Run
react-native run-android
to start the React Native server and install the app - Connect App to React Native - Either shake the device or run
adb shell input keyevent 82
to open the developer menu. Go to settings, Debug server host and enter YourIP:8081. Restart the app and it should work properly.
Release build
Android
- Follow the environment setup instructions here (first time only)
- Hardcode stage="prod" in EnvironmentHelper.ts
- Make sure
/android/app/google-services.json
and/ios/GoogleService-Info.plist
files exist. - Increment the version number in
android/app/build.gradle
andpackage.json
- Run
cd android
followed bygradlew bundleRelease
to produce the release bundle. - Plug in an Android phonet via USB so an apk is generated for the correct device.
- Run
cd..
followed byreact-native run-android --variant=release
to generate an apk file for Android devices. You can close the node window when it completes. - Open the app in Android studio. Choose Build -> Generate Signed Bundle and point to your keys. Note: It may be necessary to run
SET NODE_OPTIONS=--openssl-legacy-provider
and then launch Android Studio from the consoleC:\Program Files\Android\Android Studio\bin\studio64.exe
in order to comiple the release bundle. - The signed build will be at
\android\app\release
. Upload it to the Google Play store.
iOS
Follow instructions here
- Run
yarn
- Run
cd ios
andpod install
- In XCode open
Info
and increase the version number and code. - Build, archive, validate and distribute.
Codepush release
- Hardcode stage="prod" in EnvironmentHelper.ts
- Update version number in package.json
- Run 'appcenter codepush release-react -a Live-Church-Solutions/B1Mobile -d Production' to push to Android
- Run 'appcenter codepush release-react -a Live-Church-Solutions/B1Mobile_iOS -d Production' to push to iOS