fix: AAR should not use app release version
Opened this issue · 5 comments
Description
I'm setting code push for flutter module on platform android app native. My current flutter version is 3.13.9.
my config app native is
defaultConfig {
...
versionCode 1
versionName "1.0.0"
...
}
I created library aar by command
shorebird release aar --release-version 1.0.0+1 --flutter-version=3.13.9
my release app works normally,
but when I release a new patch by command
shorebird patch aar --release-version=1.0.0+1
My app can not update that patch
Someone can help me please!
The updater is saying that the binary produced by shorebird release
is not the same binary as you are running to receive the patch.
Are you using shorebird preview
or are you running the app in some other way?
The updater is saying that the binary produced by
shorebird release
is not the same binary as you are running to receive the patch.Are you using
shorebird preview
or are you running the app in some other way?
No, I'm using app Add to app in flutter follow document shorebird. So I can't apply shorebird preview
command
Ah yes, it's definitely much easier to hit this error in the add2app flow.
The solution here (which I think we have another bug on?) is to create some mechanism for us to version the contents of an aar, separately from the release version from the aab.
Shorebird depends on the stores enforcing one-version-per-aab rules, meaning that the version number is unique for a given set of aab contents. If we move away from that we'll need our own uniqueness mechanism, or find some other one that Android has (maybe it already has some sort of aab/apk identifier that isn't the release version number?)
shorebirdtech/shorebird#793 has more discussion of a similar issue.