Zum Hauptinhalt springen

B1 Mobile

B1 Mobile is the primary member-facing mobile app for ChurchApps, built with React Native and Expo. It allows church members to view directories, access giving, check attendance, receive notifications, and interact with their church community.

Before You Begin

  • Install Node.js and Expo CLI -- see Prerequisites
  • Install Android Studio (for Android emulator) or Xcode (for iOS simulator)
  • Configure your API target (staging or local) -- see Environment Variables

Setup

  1. Clone the repository:

    git clone https://github.com/ChurchApps/B1Mobile.git
  2. Install dependencies:

    cd B1Mobile && npm install
  3. Configure environment variables -- copy the sample file and update the API endpoints:

    cp dotenv.sample.txt .env
  4. Start the Expo dev server:

    npm start
Tipp

You can use the Expo Go app on a physical device for quick testing without setting up Android Studio or Xcode.

Environment Variables

VariableDescription
STAGEEnvironment stage (e.g., dev, staging, prod)
CONTENT_ROOTRoot URL for content delivery
MEMBERSHIP_APIMembership API endpoint
MESSAGING_APIMessaging API endpoint
ATTENDANCE_APIAttendance API endpoint
GIVING_APIGiving API endpoint
DOING_APIDoing API endpoint
CONTENT_APIContent API endpoint
LESSONS_ROOTRoot URL for lessons content

Key Commands

CommandDescription
npm startLaunch Expo dev server
npm run androidRun on Android emulator
npm run iosRun on iOS simulator
npm run testRun tests (Jest)

Production Builds

Before creating a production build, update version numbers in all of the following files:

  • package.json
  • app.config.js
  • android/app/build.gradle
  • ios/B1Mobile/Info.plist

Android

npm run build:android

This uses EAS Build to create the Android binary.

iOS

eas build --platform ios --profile production

OTA Updates

To push an over-the-air update (without going through app store review):

npm run update:production
Info

OTA updates are ideal for JavaScript-only changes. If you modify native code or dependencies, you must submit a full store build instead.