{"id":48840,"date":"2021-07-21T10:54:01","date_gmt":"2021-07-21T17:54:01","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/xamarin\/?p=48840"},"modified":"2021-07-21T10:54:01","modified_gmt":"2021-07-21T17:54:01","slug":"xamarin-essentials-1-7-and-introducing-net-maui-essentials","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/xamarin-essentials-1-7-and-introducing-net-maui-essentials\/","title":{"rendered":"Xamarin.Essentials 1.7 and introducing .NET MAUI Essentials"},"content":{"rendered":"<p>Xamarin.Essentials has become a critical library for .NET developers building apps across iOS, Android, Tizen, macOS, and Windows since its original release over three years ago. Since then the library has been installed nearly 10 million times, has 79 contributors, has been stared 1,400 times on GitHub, and has been the foundation for developers around the globe to access native APIs. Today, I would like to share with you what is new in the latest version of <a href=\"https:\/\/docs.microsoft.com\/xamarin\/essentials\/release-notes\/1.7?WT.mc_id=friends-0000-jamont\">Xamarin.Essentials 1.7<\/a>, and talk about the future roadmap for the library as .NET Multi-platform App UI (MAUI) approaches this fall.<\/p>\n<h2>Xamarin.Essentials 1.7<\/h2>\n<p>This release of Xamarin.Essentials focuses on critical bug fixes and introduces enhancements to the <a href=\"https:\/\/docs.microsoft.com\/xamarin\/essentials\/web-authenticator?WT.mc_id=friends-0000-jamont\">Web Authenticator API<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2018\/12\/Essentials.png\" alt=\"Logo for Xamarin.Essentials\" width=\"426\" height=\"272\" class=\"aligncenter size-full wp-image-40907\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2018\/12\/Essentials.png 426w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2018\/12\/Essentials-300x192.png 300w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/p>\n<h3>Web Authenticator<\/h3>\n<p>The Web Authenticator enables you to add authentication to your app and integrate with many providers using your own server backend powered by ASP.NET Core. There have been several fixes introduced for all platforms from the team and the community! Thank you!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2021\/07\/web-authenticator.png\" alt=\"Web authenticator overview of authentication from mobile to backend\" width=\"884\" height=\"376\" class=\"aligncenter size-full wp-image-48842\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2021\/07\/web-authenticator.png 884w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2021\/07\/web-authenticator-300x128.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2021\/07\/web-authenticator-768x327.png 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/p>\n<p>We have also introduced a new API for private authentication sessions on iOS.<\/p>\n<h3>Private authentication session<\/h3>\n<p>iOS 13 introduced a new web browser API for developers to launch the authentication session as private. This enables developers to request that no shared cookies or browsing data is available between authentication sessions and will be a fresh login session each time. This is available through the new <code>WebAuthenticatorOptions<\/code> that was introduced in Xamarin.Essentials 1.7 for iOS.<\/p>\n<pre><code class=\"csharp\">var url = new Uri(\"https:\/\/mysite.com\/mobileauth\/Microsoft\");\nvar callbackUrl = new Uri(\"myapp:\/\/\")\nvar authResult = await WebAuthenticator.AuthenticateAsync(new WebAuthenticatorOptions\n    {\n        Url = url,\n        CallbackUrl = callbackUrl,\n        PrefersEphemeralWebBrowserSession = true\n    });\n<\/code><\/pre>\n<h2>.NET MAUI Essentials<\/h2>\n<p>.NET MAUI is the future of Xamarin.Forms and .NET MAUI Essentials is the future of Xamarin.Essentials. .NET MAUI Essentials is part of the <a href=\"https:\/\/github.com\/dotnet\/maui\/tree\/main\/src\/Essentials?WT.mc_id=friends-0000-jamont\">.NET MAUI GitHub repo<\/a> and has been under active development to seamlessly transition to .NET MAUI.<\/p>\n<p>.NET MAUI Essentials is now directly integrated into .NET MAUI starting with <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-6-preview-6?WT.mc_id=friends-0000-jamont\">.NET 6 Preview 6<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-maui-preview-6?WT.mc_id=friends-0000-jamont\">.NET MAUI Preview 6<\/a>. When you create a new .NET MAUI application, it will use the new .NET MAUI workload and you will see <code>&lt;UseMaui&gt;true&lt;\/UseMaui&gt;<\/code> in the .csproj. With this enabled all of .NET MAUI Essentials comes into your project! All you need to do is add <code>using Microsoft.Maui.Essentials;<\/code> and all of the APIs you know and love are at your fingertips.<\/p>\n<p>We know that there are developers today that will be updating their existing Xamarin.iOS and Xamarin.Android apps to .NET 6 without .NET MAUI and still want to leverage all of the APIs in Xamarin.Essentials. We have you covered as well as you can add <code>&lt;UsingMauiEssentials&gt;true&lt;\/UsingMauiEssentials&gt;<\/code> to your .NET 6 iOS and Android apps to bring in all of the latest APIs.<\/p>\n<p>We are excited for this next chapter of Xamarin.Essentials with .NET MAUI Essentials and we hope you are too!<\/p>\n<h2>Sunsetting Xamarin.Essentials<\/h2>\n<p>Earlier this year we announced that we will be following the <a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/wiki\/Feature-Roadmap\">same schedule as Xamarin.Forms<\/a>. This means that we will continue to service Xamarin.Essentials through November 2022 and accept pull requests fixing bugs and publishing new service releases. New features and APIs will only be added to .NET MAUI Essentials going forward and pull-requests are welcome!<\/p>\n<h2>Summary<\/h2>\n<p>Please let us know about your experiences using .NET MAUI Essentials in .NET MAUI Preview 6 to create new applications by engaging with us on GitHub at <a href=\"https:\/\/github.com\/dotnet\/maui\">dotnet\/maui<\/a>.<\/p>\n<p>For a look at what is coming in future releases, visit the <a href=\"https:\/\/github.com\/dotnet\/maui\/wiki\/roadmap\">.NET MAUI product roadmap<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Xamarin.Essentials 1.7 is here with some great enhancements for your mobile and desktop apps. We also talk about the future of the library with .NET MAUI Essentials.<\/p>\n","protected":false},"author":544,"featured_media":40907,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5216,556,291,367],"tags":[8355,24],"class_list":["post-48840","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-integrations","category-xamarin-platform","category-xamarin-forms","tag-essentials","tag-xamarin-essentials"],"acf":[],"blog_post_summary":"<p>Xamarin.Essentials 1.7 is here with some great enhancements for your mobile and desktop apps. We also talk about the future of the library with .NET MAUI Essentials.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/48840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/544"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=48840"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/48840\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/40907"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=48840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=48840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=48840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}