Overview
There are two ways to set up the Omi app for development:Automatic Setup
Manual Setup
Prerequisites
Before starting, make sure you have the following installed:Flutter SDK
Xcode
Android Studio
CocoaPods
npx). make dev-up names any of these that are missing.Build the App Automatically
This is the recommended way to get started.setup.sh builds the dev flavor
against the local backend harness — the Python API on port 8000 and the
Firebase Auth emulator on port 9099, using the demo-omi-local Firebase
project. iOS builds address them as 127.0.0.1; Android builds default to the
emulator’s host alias 10.0.2.2.
Video Walkthrough
Setup Steps
Start the local backend harness
make dev-init builds backend/.venv from whatever python3 resolves to,
and the backend requires Python 3.11 — make sure that’s what you get, or
the harness fails later with import errors.No provider API keys? Use fake providers instead:make dev-status, and stop it later with
make dev-down. Ports, seeded local users, and troubleshooting live in the
local emulator runbook.Navigate to the app directory
Run setup for your platform
- iOS
- Android
Run in simulator
- Xcode: Open
app/iosfolder - Android Studio: Open
app/androidfolder
Build the App Manually
Manual setup gives you full control, allowing you to use your own backend.Verify Flutter Installation
Example output
Example output
Recommended versions
Recommended versions
app/setup.sh for recommended versions:- Flutter 3.44.5
- Xcode 16.4
- Android SDK Platform 35
- NDK 28.2.13676358
- JDK 21
Get Flutter Dependencies
app directory, install packages:Install iOS Pods
Configure Environment
Add API Keys
.dev.env and add your API keys:Run Build Runner
Setup Firebase
- Follow the official Firebase Flutter Setup through Step 1
- For Apple login, create an identifier first
- Configure
flutterfire configusing your own bundle IDs and your own project — not Omi’s - Generate SHA1/SHA256 keys for your keystore and add them to Firebase (StackOverflow guide | Official Docs)
Run the App
Code Formatting
We usedart format with a line length of 120 characters.
To automatically format code on commit, install the pre-commit hook:
Troubleshooting
Flutter doctor shows issues
Flutter doctor shows issues
- Run
flutter doctor -vfor detailed output - Follow the suggestions to fix each issue
- Make sure all required SDKs are installed
iOS build fails
iOS build fails
- Ensure CocoaPods is installed:
sudo gem install cocoapods - Run
pod installin theiosdirectory - Try
pod repo updateif dependencies fail
Android build fails
Android build fails
- Check NDK is installed via Android Studio SDK Manager
- Verify JDK version matches requirements (JDK 21)
- Accept all Android licenses:
flutter doctor --android-licenses
Firebase auth not working
Firebase auth not working
- Enable Google/Apple sign-in in Firebase Console
- Verify SHA1/SHA256 keys are added to Firebase
- Check bundle IDs match your Firebase configuration
App can't reach the backend (connection refused / timeouts)
App can't reach the backend (connection refused / timeouts)
setup.sh builds against http://127.0.0.1:8000 but does not start anything.
Run make dev-up from the repo root first, and confirm with make dev-status.On a physical device, 127.0.0.1 is the phone — set OMI_DEV_HOST to your
Mac’s LAN or Tailscale address before running both setup.sh (so the
build points at your machine) and make dev-up (so the harness actually
listens there — it defaults to loopback-only otherwise, which is why a
device build alone used to reach nothing). Export it in the same shell so
both commands see it. The Android emulator uses 10.0.2.2 by default.Sign-in works but every request returns 401
Sign-in works but every request returns 401
API_BASE_URL points at a backend
initialized for a different project. Point API_BASE_URL at a backend that
verifies against your project.Omi’s shared https://api.omiapi.com/ is never a valid target for a
self-configured build — it verifies against Omi’s own Firebase project, and
the demo-omi-local configs setup.sh installs are emulator-only fakes that
no hosted backend can verify. Production data requires the explicit beta
profile.iOS: works under flutter run, crashes when opened from the Home Screen
iOS: works under flutter run, crashes when opened from the Home Screen
- The dev build runs fine while
flutter runis attached, then crashes instantly when you open it from the Home Screen after disconnecting (or iOS relaunches it in the background for Bluetooth/VoIP). The phone’s crash report ends inSwiftAwesomeNotificationsPlugin.register(with:)withKERN_INVALID_ADDRESS at 0x0. flutter runitself prints:
FlutterEngine init returns
nil, the app’s FlutterViewController has no engine, and plugin registration
has nothing to register against. The app now shows a notice explaining this
instead of crashing, but it still cannot run.Solutions:-
Install an AOT build for untethered use (physical devices):
Profile (or
release) builds open from the Home Screen on their own. You lose hot reload; pressdinflutter runto detach and keep the app running.setup.sh ioswarns whenever a debug build is about to land on a physical iPhone. -
Use the iOS Simulator for debug-mode development:
- The simulator has no JIT restriction, so
flutter run --flavor devworks from the Home Screen too.
- The simulator has no JIT restriction, so