0

I have setup firebase distribution with a Flutter app. I am noticing that android can receive app builds with the same build version number while iOS builds cannot.

Is there some way I can prevent this from happening in android in firebase distribution and have it require unique build as well?

lolelo
  • 636
  • 5
  • 16

1 Answers1

0

I ended using a script that sends incremented version to firebase:

It was possible to setup pubspec.yaml in such a way it syncs with the iOS and android app version and build version: How to set build and version number of Flutter app

After that it's possible to setup a custom build script reading and incrementing version like given in this GitHub issue: https://github.com/flutter/flutter/issues/41955

This makes sure that version gets incremented


# Find and increment the version number.
perl -i -pe 's/^(version:\s+\d+\.\d+\.)(\d+)(\+)(\d+)$/$1.($2+1).$3.($4+1)/e' pubspec.yaml

...Coming from the GitHub thread

lolelo
  • 636
  • 5
  • 16