Перейти к содержанию

Building

Build instructions for Android, iOS, and Windows.

Android

# Debug APK
flutter build apk --debug

# Release APK
flutter build apk --release

# App Bundle (for Play Store)
flutter build appbundle --release

The release APK is written to build/app/outputs/flutter-apk/app-release.apk. It is self-contained for sideloading and bundles the ONNX models in flutter_assets.

For Play Store releases, use the app bundle. During AAB builds, the .onnx files are moved into the install-time models_pack asset pack so the base module stays below Google Play's size limit while the installed app still works offline.

The local release helper wraps the Play Store build and copies the AAB, mapping file, symbols, and release-note stubs into release/<version>/:

dart dev/build_release.dart

iOS

Requires macOS with Xcode 15+:

cd ios && pod install && cd ..
flutter build ios --release

Open ios/Runner.xcworkspace in Xcode for archive and distribution.

Windows

Requires Visual Studio 2022 with C++ desktop workload:

flutter build windows --release

Notes

  • The two ONNX models are tracked with Git LFS. Run git lfs pull before building from a fresh clone.
  • APK builds keep the models in flutter_assets; AAB builds ship them via the install-time models_pack asset pack.
  • ONNX Runtime native libraries are platform-specific and handled by the flutter_onnxruntime package.

Forking and Re-releasing

The Acceptable Use Policy asks forks and redistributed versions to use distinct naming and branding unless explicit written permission has been granted. If you fork the project for your own distribution, you must change the app identity in all of the following places:

Androidandroid/app/build.gradle:

android {
    defaultConfig {
        applicationId = "com.yourorg.yourapp"   // replace de.tu_chemnitz.mi.kahst.birdnet_live
    }
}

iOS — update the bundle identifier in Xcode:
Open ios/Runner.xcworkspace → select the Runner target → Signing & Capabilities → change Bundle Identifier from com.birdnet.birdnetLive to your own identifier. Alternatively, edit PRODUCT_BUNDLE_IDENTIFIER directly in ios/Runner.xcodeproj/project.pbxproj.

Also update the app name shown to users:

  • Android: android/app/src/main/AndroidManifest.xmlandroid:label
  • iOS: ios/Runner/Info.plistCFBundleDisplayName
  • Flutter: pubspec.yamlname field (Dart package name, lowercase with underscores)