Skip to content

appitool build ​

Compiles and packages platform binaries directly without running the full 7-stage flow pipeline.

Synopsis ​

bash
appitool build ios [options]
appitool build android [options]

appitool build ios ​

Builds and packages an iOS application using xcodebuild (comparable to Fastlane build_app / gym).

Artifacts are written under ~/.appitool/ios/<MainTarget>/build/<version>_<build>[_adhoc|_development]/ (falling back to <yyyy_MM_dd_HH_mm> when version or build number cannot be resolved) with DerivedData isolated in ~/.appitool/ios/<MainTarget>/derivedData/.

Options ​

Option / FlagDefault / .env FallbackDescription
-d, --distribution <method>appstoreDistribution method: adhoc, development, or appstore. Mapped to app-store-connect, release-testing, or debugging export methods.
--workspace-path <path>XCODE_WORKSPACE or auto-detectedPath to .xcworkspace.
--project <path>XCODE_PROJECT or auto-detectedPath to .xcodeproj.
-s, --scheme <name>XCODE_SCHEME or inferredXcode scheme to build (inferred via xcodebuild -list -json).
-c, --configuration <name>XCODE_CONFIGURATION or ReleaseBuild configuration (Debug, Release).
--team-id <id>APPLE_TEAM_IDApple Developer Team ID.
--codesigning-identity <id>—Code signing identity override (e.g., "Apple Distribution", "Apple Development").
--cleanfalseClean build folder before building.
--skip-build-archivefalseSkip compiling .xcarchive and export an IPA from the latest .xcarchive found under ~/.appitool/ios/<MainTarget>/build/.
--skip-package-ipafalseOnly compile .xcarchive and skip IPA packaging.
--allow-provisioning-updatesfalseAllow xcodebuild to communicate with Apple Developer Portal for provisioning updates (passes -authenticationKeyPath, -authenticationKeyID, -authenticationKeyIssuerID automatically if APPLE_KEY is a file path).
--manage-build-numberfalseAllow App Store Connect to automatically manage/increment version and build numbers during export.
--silent / --no-silenttrue (--silent)Suppress (--silent) or stream (--no-silent) xcodebuild stdout logs.
--xcodebuild-formatter <cmd>XCODEBUILD_FORMATTER or xcbeautify --renderer github-actionsFormatter command piped from xcodebuild output.

Plus AppleCredentialsOptions (--apple-key-id, --apple-issuer-id, --apple-key).

Examples ​

bash
# Build App Store IPA (auto-discover workspace & scheme)
appitool build ios -d appstore

# Build Ad-Hoc IPA with automatic provisioning updates and clean build
appitool build ios -d adhoc --clean --allow-provisioning-updates

# Re-export IPA from the most recent existing .xcarchive
appitool build ios -d adhoc --skip-build-archive

appitool build android ​

Builds an Android App Bundle (.aab) or APK (.apk) using Gradle (./gradlew).

Artifacts are written under ~/.appitool/android/<Target>/build/<version>_<build>[_adhoc|_development]/ (falling back to <yyyy_MM_dd_HH_mm> when version or build number cannot be resolved) named <Target>_<flavor_><buildType>.<aab|apk>.

Signing Resolution Order ​

build android resolves signing credentials in the following order:

  1. Base64 keystore via --keystore-base64 / ANDROID_KEYSTORE (decoded temporarily into ~/.appitool/android/keystores/<packageName>.keystore and removed automatically after build).
  2. Local keystore file via --keystore-path / ANDROID_KEYSTORE_PATH.
  3. Match Git repository if --match is passed (or if MATCH_GIT_URL and MATCH_PASSWORD are set when no local keystore path was provided). If the Match lookup is attempted and fails — or --match is passed without Match storage configured — the build stops with an error instead of producing an unsigned artifact.

Options ​

Option / FlagDefault / .env FallbackDescription
-d, --distribution <method>appstoreDistribution method: adhoc, development, or appstore.
--package-name <name>GOOGLE_PACKAGE_NAME or Gradle-resolvedTarget Android package name.
--flavor <name>ANDROID_FLAVORGradle product flavor (e.g., production, staging).
-c, --configuration <type>ANDROID_CONFIGURATION or ReleaseBuild configuration/type (Release, Debug).
--format <format>aab for appstore; apk for adhoc/developmentPackaging format (aab or apk).
--cleanfalseRun Gradle clean before building.
--silent / --no-silenttrue (--silent)Suppress (--silent) or stream (--no-silent) Gradle stdout logs.
--project-dir <path>ANDROID_PROJECT_DIR, ./android, or .Android root directory containing gradlew.
--keystore-path <path>ANDROID_KEYSTORE_PATHPath to local keystore file.
--keystore-base64 <str>ANDROID_KEYSTOREBase64-encoded keystore content.
--keystore-password <pass>ANDROID_KEYSTORE_PASSWORDKeystore store password.
--key-alias <alias>ANDROID_KEY_ALIASKey alias inside keystore.
--key-password <pass>ANDROID_KEY_PASSWORDKey password.
--gradle-opts <opts>—Custom JVM options passed via GRADLE_OPTS (automatically appends -Dorg.gradle.daemon=false if omitted).
--matchfalseFetch signing keystore from Match Git repository.

Plus MatchStorageOptions.

Examples ​

bash
# Build signed release AAB for Google Play using Match keystore
appitool build android -d appstore --match

# Build staging flavor APK cleanly with custom JVM heap
appitool build android -d adhoc --flavor staging --format apk --clean --gradle-opts "-Xmx4g"

Released under the MIT License.