App Setup
Follow these steps to get started with your Omi. Don’t want to bother with code? Use our official version on / store
Prerequisites
Before starting, make sure you have the following installed:
- Flutter SDK
- Dart SDK
- Xcode (for iOS)
- Android Studio (for Android)
- CocoaPods (for iOS dependencies)
- NDK 26.3.11579264 or above (to build Opus for ARM Devices)
Build the app automatically
Video Walkthrough
Building the app automatically means setting up your environment to use Omi’s Development backend. That makes it much easier for you to get started - with just one command!
This is the best way to get started, make changes to the app, and build apps on Omi.
Alternatively, you can build the app manually (see below) - which allows you to use your own backend, etc.
1. Navigate to the directory:
2. Build the app for iOS:
Note: This works great for iOS simulators! 🎉 Want to run on your real device? Ping us on Discord - we’d love to help! (Apple limits us to 100 dev devices)
3. Build the app for Android:
If you use windows run the following commands
4. Run app in simulator:
Now that we’ve built the app, we can run it in the simulator. Open the app in Xcode (open folder app/ios
) or Android Studio (open folder app/android
) - then just hit the run button!
Alternatively, run flutter run --flavor dev
in terminal
Build the app manually:
Manual setup is useful if you want to build the app with your own backend.
1. Flutter Setup
Ensure Flutter is installed via FVM. Do not use global Flutter or upgrade it.
fvm setup (tested on macos):
Run the following to verify setup:
Example output:
Notes:
-
Flutter version must be 3.24.1 on the stable channel, do not use global Flutter or upgrade it.
-
Android SDK platform tools must be 35.0.0
-
Ensure JDK version is 17 for Android builds. Set it explicitly:
-
(On macos you can use the following command to set the jdk version)
- CocoaPods must be installed to run on iOS/macOS
- Android Studio and VS Code versions do not matter as long as fvm flutter is used for all commands
2. Get Flutter Dependencies
From within app
directory, install flutter packages:
3. Install iOS Pods
Navigate to the iOS directory and install the CocoaPods dependencies:
4. Environment Configuration
Create .env
using template .env.template
, the env template has OPENAI_API_KEY, GOOGLE_MAPS_API_KEY which are optional.
5. API Keys
Add your API keys to the .env
file. (Sentry is not needed)
API_BASE_URL
is your backend url. You can use our dev backend URL https://backend-dt5lrfkkoa-uc.a.run.app/ or Follow this guide to install backend- Be sure to include the trailing ’/’ or you’ll get malformed URL’s
- If you want to update this later on, you will need to delete the builds folder, and recreate the runner using dart.
6. Run Build Runner
Generate necessary files with Build Runner:
7. Setup Firebase
-
This step is mandatory for running the app, otherwise firebase related code needs to be removed from the app.
-
Follow official Firebase Docs till Step 1
-
If you want to use Apple login, first go and create an identifier on the apple developer website
-
Run the following command to register the prod flavor of the app. The command will prompt you to select
configuration type
; under it, selectTarget
and thenRunner
- substitute your apple identifier with the IOS_BUNDLE_ID in the command below
-
Similarly for dev environment
-
Generate SHA1/SHA256 Keys for your Keystore and add them to Firebase. Follow the steps mentioned in this StackOverflow answer or the Official Docs. This is required for Firebase Auth through Google OAuth to work.
If you’re facing auth issues running the app, enable Google/Apple sign-in in Firebase. Go to the Firebase console and select your project. In the left-hand menu, click on “Authentication.” On the “Sign-in method” tab, scroll down to the “Sign-in providers” section. Click on the “Google” sign-in provider. Click the “Enable” switch to enable Google Sign-In for your Firebase project.
8. Run the App
- Select your target device in Xcode or Android Studio.
- Run the app using
fvm flutter run -v --flavor dev
- To generate a dev apk
fvm flutter build apk ---flavor dev
Having troubles? Join Discord and search your issue in help channel