Syntax
Arguments
platform
The platform to build for. Required (or use platform flags).androidora- Package for Google Play Storeiosori- Package for Apple App Store
Common Options
—ios
Target iOS platform (shorthand forplatform=ios).
—android
Target Android platform (shorthand forplatform=android).
—build-type=TYPE
Build type. Default:release
release- Signed APK (Android) or IPA (iOS)bundle- Android App Bundle (AAB) for Play Store
—output=PATH
Output directory for signed artifacts.—skip-prepare
Skip prepareAndroidBuild() to preserve existing project files.Android Signing Options
—keystore=PATH
Path to Android keystore file (.jks or .keystore) for signing.
ANDROID_KEYSTORE_FILE in .env.
—keystore-password=PASSWORD
Keystore password. Alternatively, setANDROID_KEYSTORE_PASSWORD in .env.
—key-alias=ALIAS
Key alias for signing. Alternatively, setANDROID_KEY_ALIAS in .env.
—key-password=PASSWORD
Key password. Alternatively, setANDROID_KEY_PASSWORD in .env.
—fcm-key=KEY
FCM Server Key for push notifications (optional). Alternatively, setFCM_SERVER_KEY in .env.
—google-service-key=PATH
Google Service Account Key file path (required for Play Store upload). Alternatively, setGOOGLE_SERVICE_ACCOUNT_KEY in .env.
iOS Signing Options
—api-key=PATH, —api-key-path=PATH
Path to App Store Connect API key file (.p8).
APP_STORE_API_KEY_PATH in .env.
—api-key-id=ID
App Store Connect API key ID. Alternatively, setAPP_STORE_API_KEY_ID in .env.
—api-issuer-id=ID
App Store Connect API issuer ID. Alternatively, setAPP_STORE_API_ISSUER_ID in .env.
—certificate-path=PATH
Path to iOS distribution certificate (.p12 or .cer).
IOS_DISTRIBUTION_CERTIFICATE_PATH in .env.
—certificate-password=PASSWORD
iOS certificate password. Alternatively, setIOS_DISTRIBUTION_CERTIFICATE_PASSWORD in .env.
—provisioning-profile-path=PATH
Path to provisioning profile (.mobileprovision).
IOS_DISTRIBUTION_PROVISIONING_PROFILE_PATH in .env.
—team-id=ID
Apple Developer Team ID. Alternatively, setIOS_TEAM_ID in .env.
—export-method=METHOD
iOS export method. Default:app-store
app-store- For App Store distributionad-hoc- For ad-hoc distributionenterprise- For enterprise distributiondevelopment- For development/testing
—validate-only
Only validate the archive without exporting.—validate-profile
Validate iOS provisioning profile entitlements.—rebuild
Force rebuild by removing existing archive.—clean-caches
Clear Xcode and SPM caches before building (iOS only).App Store Upload Options
—upload-to-app-store
Upload iOS app to App Store Connect after packaging.--api-key, --api-key-id, --api-issuer-id
—test-upload
Test upload existing IPA to App Store Connect (skip build).—upload-to-play-store
Upload Android app to Play Store after packaging.--google-service-key
—play-store-track=TRACK
Play Store track for upload. Default:internal
internal- Internal testingalpha- Alpha testingbeta- Beta testingproduction- Production release
—test-push=PATH
Test Play Store upload with existing AAB file (skip build).—jump-by=NUMBER
Add extra number to the suggested version code (e.g.,--jump-by=10 to skip ahead).
—no-tty
Disable TTY mode for non-interactive environments.Examples
Package Android AAB for Play Store
Package and upload to Play Store
Package iOS for App Store
Package and upload iOS to App Store Connect
Validate iOS provisioning profile
Using environment variables
Store credentials in.env to avoid exposing them in commands:
See also
- native:credentials - Generate signing credentials
- native:release - Bump version numbers
- native:check-build-number - Sync build numbers with stores