Native Versioning allows you to control when an update should happen based on native features and binary version.
For instance, if you have Live Update pulling from the "Production" Channel, and you push an update that requires a native plugin that didn't exist until version 1.2.3 of your App, you'll want to set the iOS/Android Minimum version to 1.2.3. This will prevent earlier versions of your App from downloading live updates that require that native functionality. See the following articles for more details on Deploy and binary compatible live updates.
When using this feature Appflow expects app versions to follow the NPM semver standard. This standard does not allow for leading zeroes before any other digit. Apps with an invalid version will not be properly handled.
1.0.3 = valid
1.0.03 = invalid
0.0.50 = valid
0.0.050 = invalid
To resolve the issue simply correct the version and prepare a new native build.
To set native versioning:
- Select Build>Builds.
- Select the Web Deploy build you plan to use for an update form the list of available builds.
Select the Versioning tab and set the appropriate version for each mobile platform. After setting versions click Save.
Fields are defined as follows:
- Minimum: Native binary must be at least this version in order to download this Live Update.
- Maximum: Native binary must be this version or below in order to downloadthis Live Update.
- Equivalent: If the Native binary is this version, do NOT download this Live Update, because they are equal.
In the example shown above:
- Users running version 1.0.0 will not receive the update because the version is lower than the minimum version requirement.
- Users running version 1.0.1 will receive the update because the version meets the minimum version requirement.
- Users running version 1.0.2 will not receive the update because the version matches the equivalent version.
- Users running version 1.0.3 to 2.0.0 will receive the update because the version meets the maximum version requirement.
- Users running version 2.0.1+ will not receive the update because the version is greater than the maximum version requirement.
Below is an example of a common native versioning scheme. In this scenario we'll be managing each native release (distributed through the App Store/Play Store) with equivalent, and minimum version requirements. Bear in mind that all changes to an app's native configuration will require a new native build, and native distribution. See our doc on binary compatible changes for more details on when a new native build is necessary.
We'll manage updates to our webcode using the minimum version exclusively. This will allow for seamless updates for a given native version.
Note: As a best practice we recommend that only commits intended for release be deployed to a channel.