Firebase App Distribution Automatic Build Distribution Setup
Firebase App Distribution is the simplest way to deliver test builds to team without App Store Review and without Google Play Internal Testing, when immediate updates are needed. Suitable for both Android APK and iOS IPA. Testers get email link, install profile (iOS) or allow unknown source installation (Android)—done.
Android Setup via Fastlane
Fastlane firebase_app_distribution plugin—most convenient automation:
lane :distribute_android do
gradle(
task: "assemble",
build_type: "Debug",
flavor: "staging"
)
firebase_app_distribution(
app: ENV["FIREBASE_APP_ID_ANDROID"],
firebase_cli_token: ENV["FIREBASE_CLI_TOKEN"],
groups: "qa-team, internal-testers",
release_notes: "Branch: #{git_branch}\nCommit: #{last_git_commit[:message]}"
)
end
FIREBASE_CLI_TOKEN obtained via firebase login:ci once on local machine, result in CI secrets. Alternative—Service Account JSON (Google Cloud IAM), preferable for long-term automation, as login:ci tokens periodically expire.
iOS Setup
More complex due to signing. Need .ipa file signed with ad-hoc or development provisioning profile. Tester devices must be registered in Apple Developer Portal and included in profile.
lane :distribute_ios do
match(type: "adhoc", readonly: true)
build_app(
scheme: "MyApp-Staging",
export_method: "ad-hoc"
)
firebase_app_distribution(
app: ENV["FIREBASE_APP_ID_IOS"],
firebase_cli_token: ENV["FIREBASE_CLI_TOKEN"],
groups: "ios-testers",
release_notes: "Build #{build_number}"
)
end
iOS pain point: adding new tester requires adding UDID to Developer Portal and rebuilding provisioning profile. match + sigh automates device registration (register_devices), but UDID must come from tester manually or via Firebase App Distribution—it can collect UDIDs automatically via special onboarding URL.
Firebase App ID
FIREBASE_APP_ID is not bundleIdentifier. String like 1:123456789:android:abcdef. From Firebase Console → Project Settings → Your apps. Common mistake—confuse iOS and Android App ID.
CI Integration Without Fastlane
If Fastlane not used, Firebase CLI uploads directly:
firebase appdistribution:distribute app-release.apk \
--app "$FIREBASE_APP_ID" \
--groups "qa-team" \
--release-notes "Automated build $CI_BUILD_NUMBER" \
--token "$FIREBASE_CLI_TOKEN"
Works in any CI: GitHub Actions, GitLab CI, Bitrise, CircleCI.
Process
Create Firebase project (or use existing) → setup App Distribution → get authorization token → write Fastlane lane or shell script → integrate in CI → setup tester groups → test run.
Timeline: 1–3 days. Cost calculated individually.







