Skip to main content

Local development

git clone https://github.com/Every-Man-A-Warrior/emaw-mobile-app.git
cd emaw-mobile-app
git checkout develop
npm install

Point at the dev backend​

The base URL is hard-coded in constants/backendIp.js. It ships pointing at production (https://app.emaw-app.com/), with the dev URL commented out. For development, switch it:

constants/backendIp.js
// const backendIp = 'https://app.emaw-app.com/';
const backendIp = 'https://dev.emaw-app.com/';

Do not commit that change. scripts/bumpVersion.mjs rewrites the file to production as part of a version bump, which is the safety net, but check the diff before any release.

Run on Android​

npm run android # expo run:android — prebuilds android/, builds with Gradle, installs on the running emulator/device, starts Metro

The first build takes several minutes (CMake + Gradle). Afterwards, when only JavaScript changed, npm start (which is expo start --dev-client) is enough and the installed dev client reloads.

expo-dev-client

npm start uses --dev-client and the EAS development profile sets developmentClient: true, but expo-dev-client is not in package.json. expo run:android still produces a runnable debug build; if npm start cannot connect, install it (npx expo install expo-dev-client) and rebuild. Tracked on known gaps.

Run on iOS (macOS)​

npm run ios # expo run:ios — prebuilds ios/, pod install, builds, launches the simulator

Pick a device with --device for a physical phone.

Rebuild versus reload​

ChangeNeeds
JavaScript, assets, localesMetro reload (npm start)
Anything under plugins/, app.json plugins or permissions, native dependency added or upgraded, Google client idsNew native build (expo run:* or EAS)
android/ or ios/ editsLost on expo prebuild --clean; put the change in a config plugin instead

Sign in​

Use a dev backend account (create one on the dev website or in the app). Google sign-in works on Android only if the debug keystore's SHA-1 is registered as an Android client (Workstation setup).

Logs​

adb logcat | findstr ReactNative # Android

Xcode's console for iOS. The axios instance logs requests in development; it never logs auth request bodies.

Things that only work on a device​

  • Audio practice (microphone) works on emulators with a host mic but is more reliable on a device.
  • Offline Bible download needs the Expo fetch with file-system access; it does not work on Expo Web or with remote JS debugging.