Skip to main content

Package builds on Appflow using the Ionic Cloud CLI

note

This feature is only available on our Standard or Enterprise plans. Please contact us to enable this feature.

Authentication#

The Ionic Cloud CLI has to be authenticated on Appflow to be able to trigger a Package 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:

$ ionic-cloud build <ios|android> <build_type> --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA> --signing-cert="My Signing Certificate"

Build type can be 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 package build with Options#

The Options available to customize the build include:

  • --env=<name> Specify ad-hoc environment variables. You can use the flag any number of times to specify as many environment variables.
  • --env-file=<name> You can specify a file with any number of environment variables (one on each line).
  • --environment=<name> to specify the group of environment variables to be exposed to the build (available only with Automation; more info about environments are available here)
  • --native-config=<name> to specify the group of native config variables to be exposed to your build (more info about native configs are available here)

Customize the package build with Advanced Options#

The Advanced Options available to customize the build include:

  • --build-stack=<name> This option is mostly useful for iOS builds if for any reason a package build with a specific version of Xcode is needed. If this is omitted, the preferred version is used.
  • --apk Download Android APK artifact
  • --aab Download Android AAB artifact
  • --ipa Download iOS IPA artifact
  • --dsym Download iOS DSYM artifact
  • --apk-name=<name> To override the Android apk downloaded file name
  • --aab-name=<name> To override the Android aab downloaded file
  • --ipa-name=<name> To override the iOS ipa downloaded file
  • --dsym-name=<name> To override the iOS dsym downloaded file

Note about referencing Options values by name#

Names are case-sensitive and need to be specified including spaces, for instance:

$ ionic-cloud build ios development --app-id=123 --commit=456 --signing-certificate="iOS Dev"

Apart from the --commit option, all others require the full name setup within the Appflow Dashboard.

Look for the name on the signing certificate, Environments and Native Configs pages in Appflow:

Signing Certificates Environments Native Configs

For the build stack, use one of the strings identifying the platform in the Appflow Package Build form:

Target Platform

Contact Us#