iosfluttersemantic-versioningappcenter

Setting semantic version for iOS flutter bundle


I have a build pipeline, that builds up flutter application, for both iOS and android.

For android I have no issues in running below command:

flutter build appbundle --build-number "202312001" --build-name "1.2-feature.2"

So the version published to google play is exactly what I configured it for. But with iOS it's differently Here is a command, not very much different:

flutter build ios --build-number "202312001" --build-name "1.2-feature.2"

On xCode build logs, I;m seeing this one

export FLUTTER_BUILD_NUMBER\=1.2.2

Which is removing all the characters from semantic version I have set. Any ideas how to tackle it?

Some more info: I'm using azure pipeline macOS-12 agent. Then build is distributed to app center. Version in app center for iOS is as well, like above.

Thanks!


Solution

  • Your version can only contain numbers and periods. App Store Connect will ensure that your version numbers only increase, which is why the version must be machine readable. "Feature" is not machine readable.

    It looks like the Flutter build process is modifying your version to ensure it complies.

    From the documentation

    This key is a machine-readable string composed of one to three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods.