App Setup 📱
Follow these steps to get started with your Friend. Don’t want to bother with code? Use our official version on Apple/Google store
Install the app
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)
Setup Instructions
- Upgrade Flutter: Before proceeding, make sure your Flutter SDK is up to date:
flutter upgrade
- Get Flutter Dependencies: From within
app
directory, install flutter packages:flutter pub get
- Install iOS Pods: Navigate to the iOS directory and install the CocoaPods dependencies:
cd ios pod install pod repo update
- Environment Configuration: Create
.env
using template.env.template
cd .. cat .env.template > .dev.env
-
API Keys: Add your API keys to the
.env
file. (Sentry is not needed)API_BASE_URL
is your backend url. Follow this guide to install backend
- Run Build Runner: Generate necessary files with Build Runner:
dart run build_runner build
- Setup Firebase:
- Follow official Firebase Docs till Step 1
-
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
flutterfire config --out=lib/firebase_options_prod.dart --ios-bundle-id=com.friend-app-with-wearable.ios12 --android-app-id=com.friend.ios --android-out=android/app/src/prod/ --ios-out=ios/Config/Prod/
-
Similarly for dev environment
flutterfire config --out=lib/firebase_options_dev.dart --ios-bundle-id=com.friend-app-with-wearable.ios12.develop --android-app-id=com.friend.ios.dev --android-out=android/app/src/dev/ --ios-out=ios/Config/Dev/
- 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.
- Run the App:
- Select your target device in Xcode or Android Studio.
- Run the app.
Having troubles? Join Discord and search your issue in help channel