{"id":14968250,"url":"https://github.com/jfversluis/plugin.maui.formsmigration","last_synced_at":"2026-03-08T17:33:23.169Z","repository":{"id":198713717,"uuid":"701251016","full_name":"jfversluis/Plugin.Maui.FormsMigration","owner":"jfversluis","description":"A .NET MAUI plugin that provides helpers to make your transition from Xamarin.Forms to .NET MAUI easier","archived":false,"fork":false,"pushed_at":"2024-06-20T11:27:09.000Z","size":8630,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-30T08:04:15.467Z","etag":null,"topics":["dotnet","dotnet-maui","migration","properties","secure-storage","version-tracking","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfversluis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jfversluis"}},"created_at":"2023-10-06T08:47:39.000Z","updated_at":"2024-08-29T21:54:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"42fde39a-efb0-4f8a-86fc-ad41135600b4","html_url":"https://github.com/jfversluis/Plugin.Maui.FormsMigration","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.21739130434782605","last_synced_commit":"b6918d8c909a178f382d5cf9437d4087c112d030"},"previous_names":["jfversluis/plugin.maui.formsmigration"],"tags_count":4,"template":false,"template_full_name":"jfversluis/Plugin.Maui.Feature","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.FormsMigration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.FormsMigration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.FormsMigration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfversluis%2FPlugin.Maui.FormsMigration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfversluis","download_url":"https://codeload.github.com/jfversluis/Plugin.Maui.FormsMigration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227932101,"owners_count":17843003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnet-maui","migration","properties","secure-storage","version-tracking","xamarin","xamarin-forms"],"created_at":"2024-09-24T13:39:35.514Z","updated_at":"2026-03-08T17:33:23.139Z","avatar_url":"https://github.com/jfversluis.png","language":"C#","funding_links":["https://github.com/sponsors/jfversluis"],"categories":[],"sub_categories":[],"readme":"![](nuget.png)\n# Plugin.Maui.FormsMigration\n\n`Plugin.Maui.FormsMigration` provides helpers to make your transition from Xamarin.Forms to .NET MAUI easier.\n\n## Install Plugin\n\n[![NuGet](https://img.shields.io/nuget/v/Plugin.Maui.FormsMigration.svg?label=NuGet)](https://www.nuget.org/packages/Plugin.Maui.FormsMigration/)\n\nAvailable on [NuGet](http://www.nuget.org/packages/Plugin.Maui.FormsMigration).\n\nInstall with the dotnet CLI: `dotnet add package Plugin.Maui.FormsMigration`, or through the NuGet Package Manager in Visual Studio.\n\n### Supported Platforms\n\nThe supported platforms for this library are Android, iOS and Windows.\n\n## API Usage\n\nThis library consists of three APIs that you can use for different scenarios:\n\n* [App Properties](#app-properties)\n* [SecureStorage](#securestorage)\n* [VersionTracking](#versiontracking)\n\nEach of these APIs will have their own way of using it. You can find the specifics below, or have a look at the [sample application](/samples/Plugin.Maui.FormsMigration.Sample/) that is included in this repository.\n\n\u003e [!NOTE]\n\u003e These APIs are meant for transition scenarios only. Use these APIs to retrieve data that is previously stored by your legacy Xamarin application and save them in a place where .NET MAUI can access that data from that point on. This is also the reason that these APIs are read-only.\n\n### App Properties\n\nWith Xamarin and Xamarin.Forms you had the possibility to save simple types through the `Properties` API like so: `Application.Current.Properties [\"id\"] = someClass.ID;`. In .NET MAUI, this is no longer possible. \n\nTo help you transition from Xamarin to .NET MAUI, this library offers the `LegacyApplication` API to still be able to access previously saved properties. From there, save them through a newer API that is available in .NET MAUI. An example could be to use the [Preferences API](https://learn.microsoft.com/dotnet/maui/platform-integration/storage/preferences). See a simple example below.\n\n```csharp\nint id;\nif (LegacyApplication.Current.Properties.ContainsKey(\"id\"))\n{\n    id = (int)LegacyApplication.Current.Properties[\"id\"];\n    Preferences.Set(\"id\", id);\n}\n```\n\n\u003e [!NOTE]\n\u003e For this API to work properly, you will have to make sure that the application identifier (or bundle identifier) is the same between your legacy Xamarin app and .NET MAUI app. This is needed so that the app gets installed in the same container on the operating system, which is needed to be able to read the property values that were stored previously.\n\nAlso see this [Microsoft Learn Docs page](https://learn.microsoft.com/dotnet/maui/migration/app-properties) for more information.\n\n### SecureStorage\n\nThe [SecureStorage API](https://learn.microsoft.com/dotnet/maui/platform-integration/storage/secure-storage) is still available in .NET MAUI the same as it is in Xamarin and Xamarin.Forms. However, the name of the store where values were stored and some other details have changed which causes the .NET MAUI version of your app to not being able to retrieve the previously saved secure storage information.\n\nWith the `LegacySecureStorage` you can retrieve the previously saved information in the secure storage of your legacy Xamarin application. From there you should resave them through the .NET MAUI secure storage API. An example of how to use this API can be found below.\n\n```csharp\n// The code below assumes that there is a secure value saved with the key \"oauth_token\". Replace this key\n// with any value(s) you have stored in your legacy Xamarin app to get them out.\n\nstring oauthToken = await LegacySecureStorage.GetAsync(\"oauth_token\");\nbool result = LegacySecureStorage.Remove(\"oauth_token\");\nawait SecureStorage.SetAsync(\"oauth_token\", oauthToken);\n```\n\n\u003e [!NOTE]\n\u003e For this API to work properly, you will have to make sure that the application identifier (or bundle identifier) is the same between your legacy Xamarin app and .NET MAUI app. This is needed so that the app gets installed in the same container on the operating system, which is needed to be able to read the secure store values that were stored previously.\n\n\u003e [!WARNING]\n\u003e For iOS, make sure you have a `Entitlements.plist` with the following entry:\n\u003e \n\u003e `\u003ckey\u003ekeychain-access-groups\u003c/key\u003e`\n\u003e \n\u003e `\u003cstring\u003e$(AppIdentifierPrefix)$(CFBundleIdentifier)\u003c/string\u003e`\n\u003e \n\u003e `$(AppIdentifierPrefix)$(CFBundleIdentifier)` can stay in place and will be replaced at build time or you can replace it with a hardcoded value.\n\u003e Additionally make sure that the `Entitlements.plist` file is set in the Custom Entitlements field for Bundle Signing. For more information, refer to the [Microsoft Learn Docs page about entitlements](https://learn.microsoft.com/dotnet/maui/ios/entitlements).\n\nAlso see this [Microsoft Learn Docs page](https://learn.microsoft.com/dotnet/maui/migration/secure-storage) for more information.\n\n### VersionTracking\n\nThe [VersionTracking API](https://learn.microsoft.com/dotnet/maui/platform-integration/appmodel/version-tracking) is still available in .NET MAUI the same as it is in Xamarin and Xamarin.Forms. However, the name of the store where values were stored and some other details have changed which causes the .NET MAUI version of your app to not being able to retrieve the previously saved version tracking information.\n\n\u003e [!NOTE]\n\u003e For this API to work properly, you will have to make sure that the application identifier (or bundle identifier) is the same between your legacy Xamarin app and .NET MAUI app. This is needed so that the app gets installed in the same container on the operating system, which is needed to be able to read the version information that was stored previously.\n\n\u003e [!WARNING]\n\u003e Make sure that the app version of your .NET MAUI app is **higher** than your legacy Xamarin application. Failing to do so might have unexpected results.\n\nAlso see this [Microsoft Learn Docs page](https://learn.microsoft.com/dotnet/maui/migration/version-tracking) for more information.\n\n# Acknowledgements\n\nThis project could not have came to be without these projects and people, thank you! \u003c3\n\nThe code in the plugin is mostly based on the original code in [Xamarin.Forms](https://github.com/xamarin/Xamarin.Forms) and [Xamarin.Essentials](https://github.com/xamarin/Essentials/). It has been adapted for the Microsoft Learn Docs by [David Britch](https://github.com/davidbritch).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfversluis%2Fplugin.maui.formsmigration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfversluis%2Fplugin.maui.formsmigration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfversluis%2Fplugin.maui.formsmigration/lists"}