You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2024. It is now read-only.
On some platforms downgrades from higher to lower app versions are possible (e.g. on iOS when switching from TestFlight Beta to official App store). In such scenarios VersionTracking is broken, e.g. VersionTracking.PreviousVersion is incorrect.
Same for VersionTracking.PreviousBuild.
Its also questionable what the correct behavior is VersionTracking.IsFirstLaunchForCurrentVersion in such downgrade scenarios. I think its not clearly defined in the documentation. Currently the semantics are more like IsFirstLaunchEverForCurrentVersion.
One could interpret too that IsFirstLaunchForCurrentVersion returns true upon the first launch with this version. Currently it returns false when the version was installed at some point (in the version history)
Steps to Reproduce
Note: never explicitly uninstall/remove the app on iOS (this will clear local data).
Install App version 1.0.0 from App Store (official app version)
Start App (to let VersionTracking update its state)
CurrentVersion: "1.0.0"
New VersionHistory: ["1.0.0"]
PreviousVersion: null
Switch to TestFlight and install some alpha/beta build, say 1.0.1054
Start App (to let VersionTracking update its state)
CurrentVersion: "1.0.1054"
New VersionHistory: ["1.0.0", "1.0.1054"]
PreviousVersion: "1.0.0"
Stop testing in TestFlight and switch back to official app version 1.0.0
Start App (to let VersionTracking update its state)
CurrentVersion: "1.0.0"
VersionHistory: ["1.0.0", "1.0.1054"] (will not be updated since IsFirstLaunchForCurrentVersion == false) PreviousVersion: "1.0.0" (incorrect)
Platform Target Frameworks: applies to all platforms where app downgrades are possible (without clearing local state/config), e.g. on iOS in combination with TestFlight.
Screenshots
None
Reproduction Link
None
The text was updated successfully, but these errors were encountered:
It is impossible for your users to downgrade their app. In TestFlight yes, but not on the app store. This is an interesting edgecase, but it was only meant to track new verisons, so it did track 1.0.0.
@jamesmontemagno Well it happens in day to day use when users are switching back from alpha and beta versions to productive. I don't know if other platforms are - or in the future will be - affected by this as well. Note that in the above example the fact that VersionTracking "tracks" 1.0.0 is just by accident (not by design).
I can try to prepare PR to fix this. Does it have chances of being merged?
Description
On some platforms downgrades from higher to lower app versions are possible (e.g. on iOS when switching from TestFlight Beta to official App store). In such scenarios VersionTracking is broken, e.g.
VersionTracking.PreviousVersion
is incorrect.Same for
VersionTracking.PreviousBuild
.Its also questionable what the correct behavior is
VersionTracking.IsFirstLaunchForCurrentVersion
in such downgrade scenarios. I think its not clearly defined in the documentation. Currently the semantics are more like IsFirstLaunchEverForCurrentVersion.One could interpret too that
IsFirstLaunchForCurrentVersion
returns true upon the first launch with this version. Currently it returns false when the version was installed at some point (in the version history)Steps to Reproduce
Note: never explicitly uninstall/remove the app on iOS (this will clear local data).
CurrentVersion: "1.0.0"
New VersionHistory: ["1.0.0"]
PreviousVersion: null
CurrentVersion: "1.0.1054"
New VersionHistory: ["1.0.0", "1.0.1054"]
PreviousVersion: "1.0.0"
CurrentVersion: "1.0.0"
VersionHistory: ["1.0.0", "1.0.1054"] (will not be updated since
IsFirstLaunchForCurrentVersion == false
)PreviousVersion: "1.0.0" (incorrect)
Expected Behavior
VersionTracking.PreviousVersion
returns "1.0.1054"Actual Behavior
VersionTracking.PreviousVersion
returns "1.0.0"Basic Information
Screenshots
None
Reproduction Link
None
The text was updated successfully, but these errors were encountered: