docs-maui icon indicating copy to clipboard operation
docs-maui copied to clipboard

Missing a section on bringing VersionTracking migration code together?

Open munkii opened this issue 5 months ago • 0 comments

Type of issue

Typo

Description

Firstly, thanks for all the effort in putting together the LegacyVersionTracking code. We need to migrate our SecureStorage, Preferences and VersionTracking from Xamarin Forms to MAUI.

I don't want to sound lazy or ungrateful but I feel there is a section in the docs that is missing.

If we take the Version Tracking migration as an example. In "Access legacy version tracking data" you explain how to get access to the VersionTracking that the XF version of the app would have written and how to expose it via a series of properties and methods. In the "Android" and "iOS" sections you show the platform specific classes needed to read the data exposed in "Access legacy version tracking data". In "Consume legacy version tracking data" you show how the data could be read, written to MAUI Preferences and then the old data removed.

What I feel like is missing is how that final peice would work in the practice.

The scenario is new MAUI version of the same app is opened for the first time on the device. What we would want is some code that would see it is an update not a new version then copy over the old data to the new localtion and that code never run again.

Could that be acheived with

if (VersionTracking.IsFirstLaunch == true && LegacyVersionTracking.IsFirstLaunchEver == false)

As the XF data has yet to be copied over VersionTracking.IsFirstLaunch would be True and with the XF data having yet to be removed/migrated the LegacyVersionTracking.IsFirstLaunchEver would still be false.

What do you think about having something like that as a conclusion and do you agree that would work?

Page URL

https://learn.microsoft.com/en-us/dotnet/maui/migration/version-tracking?view=net-maui-8.0

Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/migration/version-tracking.md

Document Version Independent Id

eab654d6-44ef-a076-40e1-2bb873940e89

Article author

@davidbritch

Metadata

  • ID: eab654d6-44ef-a076-40e1-2bb873940e89
  • Service: dotnet-mobile
  • Sub-service: dotnet-maui

munkii avatar Sep 13 '24 11:09 munkii