Skip to main content

Overview

The Incidents mobile app is built with Expo and React Native. This guide covers deploying the app to both iOS and Android platforms.

Prerequisites

Before deploying, ensure you have:
  • Node.js 18+ installed
  • Expo CLI installed globally
  • Expo account (create at expo.dev)
  • Apple Developer account (for iOS)
  • Google Play Console account (for Android)

Installation

1

Navigate to mobile directory

cd mobile
2

Install dependencies

npm install
3

Configure environment variables

Create a .env file in the mobile directory with your Supabase credentials:
EXPO_PUBLIC_SUPABASE_URL=your_supabase_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
See Environment Variables for details.

Development Build

Test the app locally before deploying:
npm run ios
The dev server provides a QR code to test on physical devices using Expo Go app.

Building for Production

Using EAS Build

Expo Application Services (EAS) is the recommended way to build production apps.
1

Install EAS CLI

npm install -g eas-cli
2

Login to Expo

eas login
3

Configure EAS

eas build:configure
This creates an eas.json configuration file.
4

Build for iOS

eas build --platform ios
You’ll need to provide your Apple Developer credentials and configure signing certificates.
5

Build for Android

eas build --platform android

App Configuration

The app is configured in app.json with the following key settings:
mobile/app.json
{
  "expo": {
    "name": "incidents-app",
    "slug": "incidents-app",
    "version": "1.0.0",
    "scheme": "fluxomobile",
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "backgroundColor": "#E6F4FE"
      }
    }
  }
}

Key Configuration Options

  • name: Display name shown on device home screen
  • slug: URL-safe identifier for your app
  • version: App version number (increment for updates)
  • scheme: Deep linking URL scheme (fluxomobile://)
  • newArchEnabled: Uses React Native’s new architecture

Submitting to App Stores

iOS App Store

1

Create app in App Store Connect

Visit App Store Connect and create a new app.
2

Submit build with EAS

eas submit --platform ios
Select the build you want to submit from the list.
3

Complete App Store listing

Add screenshots, description, and other metadata in App Store Connect.
4

Submit for review

Submit your app for Apple’s review process.

Google Play Store

1

Create app in Play Console

Visit Google Play Console and create a new app.
2

Generate upload key

eas credentials
Follow prompts to generate Android keystore.
3

Submit build with EAS

eas submit --platform android
4

Complete Play Store listing

Add screenshots, description, and content ratings in Play Console.
5

Release to production

Create a production release in the Play Console.

Over-the-Air Updates

EAS Update allows you to push updates without going through app store review:
# Install EAS Update
npx expo install expo-updates

# Configure updates
eas update:configure

# Publish an update
eas update --branch production --message "Fix bug in incident reporting"
Over-the-air updates only work for JavaScript changes. Native code changes require a new build.

Environment-Specific Builds

Create different builds for staging and production:
eas.json
{
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal",
      "env": {
        "EXPO_PUBLIC_SUPABASE_URL": "staging-url"
      }
    },
    "production": {}
  }
}
Build specific profiles:
eas build --profile preview --platform android

Troubleshooting

Build Failures

If builds fail, check:
  • All dependencies are compatible with Expo SDK version
  • Native modules are properly configured in app.json plugins
  • iOS build properties use static frameworks

Environment Variables Not Working

Ensure environment variables:
  • Start with EXPO_PUBLIC_ prefix for client-side access
  • Are set in eas.json for production builds
  • Are not cached (restart dev server)

Deep Linking Issues

Verify the scheme in app.json matches your deep link configuration:
"scheme": "fluxomobile"

Next Steps

Environment Variables

Configure environment-specific settings

Supabase Setup

Set up your backend database

Build docs developers (and LLMs) love