ChurchApps / B1Mobile

ReactNative mobile application for B1.church

Home Page:https://b1.church

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

B1Mobile

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Join us on Slack.

B1Mobile Setup

  1. Copy dotenv.sample.txt to .env
  2. Run npm i to install dependencies

Running the app

Method 1

  1. Start React Native - Run npm start to start the React Native server (server runs on 8081 port).
  2. Install Android App - In Android Studio open the /android folder and click the run button to install the app on your device.
  3. 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

  1. Start and Install - Run react-native run-android to start the React Native server and install the app
  2. 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

  1. Follow the environment setup instructions here (first time only)
  2. Hardcode stage="prod" in EnvironmentHelper.ts
  3. Make sure /android/app/google-services.json and /ios/GoogleService-Info.plist files exist.
  4. Increment the version number in android/app/build.gradle and package.json
  5. Run cd android followed by gradlew bundleRelease to produce the release bundle.
  6. Plug in an Android phonet via USB so an apk is generated for the correct device.
  7. Run cd.. followed by react-native run-android --variant=release to generate an apk file for Android devices. You can close the node window when it completes.
  8. 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 console C:\Program Files\Android\Android Studio\bin\studio64.exe in order to comiple the release bundle.
  9. The signed build will be at \android\app\release. Upload it to the Google Play store.

iOS

Follow instructions here

  1. Run yarn
  2. Run cd ios and pod install
  3. In XCode open Info and increase the version number and code.
  4. Build, archive, validate and distribute.

Codepush release

  1. Hardcode stage="prod" in EnvironmentHelper.ts
  2. Update version number in package.json
  3. Run 'appcenter codepush release-react -a Live-Church-Solutions/B1Mobile -d Production' to push to Android
  4. Run 'appcenter codepush release-react -a Live-Church-Solutions/B1Mobile_iOS -d Production' to push to iOS

About

ReactNative mobile application for B1.church

https://b1.church


Languages

Language:TypeScript 94.9%Language:Java 2.4%Language:Objective-C 1.8%Language:JavaScript 0.4%Language:Ruby 0.3%Language:Starlark 0.2%