Fastlane
Fastlane
Fastlane Configuration Documentation
This document explains the Fastlane configuration file (Fastfile) which automates the iOS and Android app deployment process.
Global Configuration
Before All Hook
This section sets up global environment variables that Fastlane will use throughout the deployment process. It includes:
- App Store Connect Team identification
- Team name
- App bundle identifier
- Developer account email
Environment Management
The configuration includes environment handling for both CI and local builds:
- On CI systems: Uses environment variables set by the CI system
- Local builds: Copies
.env.production
to.env
iOS Platform Configuration
Build iOS Release Lane
This lane:
- Automatically increments the build number based on the latest TestFlight version
- Builds the iOS app in release configuration
- Prepares it for App Store distribution
Deploy to TestFlight Lane
This lane:
- Reads API credentials from
AppStoreConnect.json
- Sets up App Store Connect authentication
- Triggers the build process
- Uploads the build to TestFlight
Android Platform Configuration
Build Android Release Lane
This lane:
- Increments the version code in the gradle file
- Cleans and builds a release bundle (
.aab
) - Signs the bundle using keystore credentials from environment variables:
ANDROID_KEYSTORE_FILE
ANDROID_KEYSTORE_PASSWORD
ANDROID_KEY_ALIAS
ANDROID_KEY_PASSWORD
Deploy to Play Store Lane
This lane:
- Triggers the Android release build
- Uploads the
.aab
file to the Play Store’s internal testing track
Usage
iOS Deployment
Android Deployment
Required Environment Variables
iOS
FASTLANE_ITC_TEAM_ID
FASTLANE_ITC_TEAM_NAME
FASTLANE_APP_IDENTIFIER
FASTLANE_USER
Android
ANDROID_KEYSTORE_FILE
ANDROID_KEYSTORE_PASSWORD
ANDROID_KEY_ALIAS
ANDROID_KEY_PASSWORD
Important Notes
- The configuration supports both CI and local development environments
- API keys and credentials should be properly secured and not committed to version control
- iOS builds require App Store Connect API credentials in
AppStoreConnect.json
- Android builds require a valid keystore and associated credentials
- Both platforms use automated version/build number incrementing