Skip to main content

Build a Native Binary

Next we'll build an Android Debug binary using the native builds feature.

note

If you'd like to build an Android Release binary or any iOS binary, you'll need to generate signing certificates and upload them to the Appflow dashboard.

Prerequisites

This step assumes that you have pushed a commit that has everything Appflow needs to create a native build. If you decided to import an existing app into Appflow, then the requirements to successfully create a native build will vary depending on your choice of native runtime.

If you decided to create a new app, then you can use the following commands to add the android platform into your newly created app on your local repo.

npm install @capacitor/android
npx cap add android

You can also visit the Capacitor docs for additional information about Capacitor's support for Android and iOS

Then push the commit to your remote repo so that Appflow can see the commit it needs to create a successful native build.

Start a Native Build

In order to download a binary of your application, you will first need to create a native build.

There are two ways to do this:

  • Navigate to the Commits page and press the Start build button for the desired commit. Start Build from Commits
  • Navigate to the Builds page and press the New build button in the top right New Build

Select the proper commit for your build. There are several required and optional fields you can specify:

  • Target Platform - The platform for your build (iOS or Android for a native build)
  • Build Stack - The build stack where the job will run.
  • Build Type - The type of build for the given platform (See iOS build types or Android build types)
  • Signing Certificate - The signing certificate for the build (if required)
  • Environment - The environment to use to customize your build process
  • Native Config - The Native Config to use to customize your app configuration
  • Webhooks - (optional) If enabled, a POST with information about completed builds will be sent to the entered URL.

For the quickstart tutorial, select the Android platform, the Latest build stack and the Debug type build which requires no other configuration. Once the build begins, you can view the progress and review the logs if you encounter errors.

Running Web Build

Downloading the Build

note

If you have trouble getting a successful build in the previous step, you can find answers to common native build errors in this section of our knowledge base.

A successful native build yields an iOS binary (.ipa or IPA) or an Android binary (.aab or AAB) file. Once you have a successful build, you can download it so that you can install it on a device by clicking the file name in the Artifacts section in the right of the build detail page or clicking the Download IPA/APK icon on the build in the Build > Builds tab.

Download Native Build

Automating the Build Process

Now that you know how to manually create a native build, we will next explore how to automate this process!