iOS Schemes and Android Variants support now in Appflow
Appflow, the mobile DevOps platform from Ionic, is excited to introduce support for iOS Schemes and Android Variants. Leveraging Appflow’s Custom Environments feature, you can now specify custom build settings using the Schemes or Variants already defined for your mobile application project.
With support for iOS Schemes and Android Variants, Appflow gives you powerful functionality to customize your builds without the need to pass multiple environment variables or manually specify settings with build scripts.
Build versions for testing, demos, and more
iOS Schemes and Android Variants allow developers to define build targets, configurations, and variables in a build version for a specific purpose. For example:
- A test build version that does not load ads and uses mock data
- A demo build version that excludes premium features
- A legacy build version for older devices that excludes unsupported functionality
- A debug build version that allows for debugger attachment
Appflow has added new environment variables to custom environments so developers can set an iOS Scheme or Android Variant for a given environment.
Custom Environments for all
Plans have been updated with the following custom environment availability:
- Community: Up to 3 environments
- Startup: Up to 5 environments
- Basic: Up to 10 environments
- Standard: Up to 100 environments
- Enterprise: Customized environment limit
iOS build schemes let you configure build targets, configuration, and environment details. Check out the Apple documentation for details on how to create and customize a scheme.
Appflow will attempt to automatically detect which scheme to use for your build, but you can now also specify a scheme for a custom environment using the
IOS_SCHEME environment variable.
Android’s build variants are composed of a Build Type and a Flavor. For example, a build type of
debug and a flavor of
demo would combine to create a
debugDemo build variant.
Build Types and Flavors are both customized in your app’s module-level
build.gradle configuration file.
By default, Appflow provides Debug and Release build types for Android. You can define a custom build type in the
android block to specify build and packaging settings. The Android documentation outlines which options are available.
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Then in Appflow, use the
ANDROID_BUILD_TYPE environment variable and pass the value of which build type to use for a custom environment. Read more in the Appflow documentation here.
Android product flavors let you customize any property in
defaultConfig and create source sets to control which code is used for a given flavor. Flavors are also defined inside the
android block under
flavorDimension, which represents a group of flavors, is also required.
Note: Appflow currently only supports a single flavor dimension. See documentation for more details.
In Appflow, use the
ANDROID_FLAVOR environment variable to set the flavor for a custom environment.
Using Custom Environments
Once you have created a custom environment, select it when creating a new build or use an Appflow automation to always use a specific environment based on a trigger. It’s that simple.
Create your own Custom Environments with iOS Schemes and Android Variants today in the Automate section of your project or from the build screen.
To leverage Appflow for streamlined mobile builds and deployments, start a free trial today.