Native Builds
Appflow CLI is available to our enterprise customers only. Please contact us for more information.
Authentication
The Appflow CLI has to be authenticated on Appflow to be able to trigger a native build.
To log in, create a Personal Access Token on the Appflow Dashboard.
then type:
$ export IONIC_TOKEN=<your personal access token>
Trigger a native build
Assuming the CLI is authenticated, to trigger a native build, run:
$ appflow build <ios|android> <build_type> --app-id=<appflow app id> --commit=<git commit sha> --signing-cert="My Signing Certificate"
Build type can be simulator
, ad-hoc
, app-store
, development
or enterprise
for iOS and debug
or release
for Android.
Signing cert is required for all build types except debug
on Android. For information on setting up signing certificates, see here.
Once the build is successfully triggered, the CLI will automatically start tailing the logs from Appflow.
Customize the native build with Options
Noteable options available to customize any native build include:
--build-stack=<name>
to override the target build stack, defaults to latest stack--environment=<name>
to specify the group of environment variables to be exposed to the build--env <list of key value pairs>
Specify ad-hoc environment variables. You can use the flag any number of times to specify as many environment variables.--env-file=<name>
to specify a file with any number of environment variables (one on each line).--secret <list of key value pairs>
to pass ad-hoc secrets into the build process--native-config=<name>
to specify the group of native config variables to be exposed to your build--signing-cert
to specify the name of a signing certificate (for build types that require it)--dependency-caching
to enable caching of npm packages to accelerate the build process--native-app-preview
to enable an app preview directly in the browser via a secure public URL using Appetize (for debug build types only)
Customize the native build with Advanced Options
Noteable options available to customize an iOS build include:
--ipa
Download iOS IPA artifact--xcarchive
Download xcarchive artifact--dsym
Download iOS DSYM artifact
Additional options can be be explored in the CLI Command Reference
Noteable options available to customize an android build include:
--apk
Download Android APK artifact--aab
Download Android AAB artifact
Additional options can be be explored in the CLI Command Reference
Note about referencing Options values by name
Names are case-sensitive and need to be specified including spaces, for instance:
$ appflow build ios development --app-id=123 --commit=456 --signing-cert="iOS Dev"
Look for the name on the Signing Certificate, Environments, and Native Configs pages in Appflow:
For the build stack, use one of the strings identifying the platform in the Appflow Build page: