KMP Publish iOS App on Firebase
ActionsTags
(2)This GitHub Action automates the process of building and publishing iOS applications to Firebase App Distribution. It handles the build process, signing, and deployment using Fastlane.
- Automated Firebase App Distribution deployment
- iOS IPA build and signing
- Build artifact archiving
- Gradle and Ruby dependency caching
- Firebase tester group management
Before using this action, ensure you have:
- A Firebase project with App Distribution enabled
- Firebase service account credentials
- An iOS app set up in Firebase
- Xcode project configured with proper signing
Create a Gemfile
in your project root:
source "https://rubygems.org"
gem "fastlane"
gem "firebase_app_distribution"
Create a fastlane/Fastfile
with the following content:
default_platform(:ios)
platform :ios do
desc "Deploy to Firebase App Distribution"
lane :deploy_on_firebase do |options|
build_ios_app(
scheme: ENV["IOS_PACKAGE_NAME"],
export_method: "ad-hoc"
)
firebase_app_distribution(
app: ENV["FIREBASE_APP_ID"],
groups: options[:groups],
service_credentials_file: options[:serviceCredsFile],
release_notes: "New build from GitHub Actions"
)
end
end
Add the following workflow to your GitHub Actions:
name: Deploy to Firebase
on:
push:
branches: [ main ]
# Or trigger on release
release:
types: [created]
jobs:
deploy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Deploy to Firebase
uses: openMF/[email protected]
with:
ios_package_name: 'YourAppName'
firebase_creds: ${{ secrets.FIREBASE_CREDS }}
tester_groups: 'qa-team,beta-testers'
Input | Description | Required |
---|---|---|
ios_package_name |
Name of your iOS app/scheme | Yes |
firebase_creds |
Base64 encoded Firebase service account credentials | Yes |
tester_groups |
Comma-separated list of Firebase tester groups | Yes |
- Encode your Firebase credentials file to base64:
base64 -i path/to/firebase-credentials.json -o firebase-creds.txt
- Add the following secret to your GitHub repository:
FIREBASE_CREDS
: Content of firebase-creds.txt
The action uploads the built IPA file as an artifact with:
- Name: 'ios-app'
- Retention period: 1 day
- Maximum compression (level 9)
You can find the IPA file in your GitHub Actions run artifacts.
This helps reduce build times in subsequent runs.
- Go to the Firebase Console
- Navigate to App Distribution
- Create a new iOS app or select an existing one
- Set up tester groups under App Distribution
- Create a service account with appropriate permissions
- Download the service account JSON key file
Common issues and solutions:
-
Build fails due to signing
- Ensure your Xcode project has proper signing configuration
- Verify the export method matches your provisioning profile
-
Firebase deployment fails
- Check if the service account has sufficient permissions
- Verify the Firebase app ID is correct
- Ensure tester groups exist in Firebase console
KMP Publish iOS App on Firebase is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.