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 (includes Dart).
- Xcode (for iOS)
- Android Studio (for Android)
- CocoaPods (for iOS dependencies)
- NDK (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 by following the official Flutter Installation Guide.
After installation, run the following to verify your setup and see if any additional tools are required:
Example output:
Notes:
-
This project is tested with specific versions of tools like Flutter SDK, Xcode, Android SDK, NDK, and JDK. Please refer to the
app/setup.sh
script for these recommended versions (e.g., Flutter 3.32.4, Xcode 16.4, Android SDK Platform 35, NDK 27.0.12077973, JDK 21). -
To ensure Android builds use the recommended JDK version (e.g., JDK 21), you might need to set it explicitly if it was installed separately from Android Studio. For example, on macOS, you can configure Flutter to use a specific JDK path:
- CocoaPods must be installed to run on iOS/macOS.
- Android Studio and VS Code editor versions generally do not matter as long as
flutter
commands are used from the correctly configured Flutter SDK.
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
flutter run -v --flavor dev
- To generate a dev apk
flutter build apk --flavor dev
Having troubles? Join Discord and search your issue in help channel