I'm using Firebase App Distribution to distribute my app for iOS and Android. For most users on iOS & Android, that worked with the latest version. But for one user, Firebase claimed that the new version was a downgrade. I'd like to know how to prevent this in the future.
The old version was "2021.6.4 (5)", the new one "2021.6.5 (4)". As I understand semantic versioning, the old version is less than the new one because the new one has a higher patch version: 5 vs. 4.
But Firebase begged to differ once. Below you see the installed version at the top and the new one, labeled as a "Downgrade", below. Why?
That number in parentheses is the versionCode
that can be a positive integer and that's what Android uses internally as the application version. 2021.6.x
is just the versionName
that is displayed to the users, but Android doesn't use that field at all to decide if it's an upgrade or downgrade, the versionCode
is used for that. Because the installed versionCode
is 5
and you want to install 4
it's a downgrade.