Open chucker opened 2 years ago
IMO since MAUI itself doesn't support net6.0-macos, adding Essentials support to it wouldn't make sense here unless MAUI itself supports it, since the two complements each other.
Of course, you can use MAUI Essentials outside of MAUI proper, but in that case, maybe it would more useful for the Community Toolkit? The interfaces are in MAUI itself, and the Toolkit (or separate library) can host the implementation. And if net6.0-macos gets added to MAUI itself, then that work could be merged back into this repo.
I don't believe Essentials needs to be limited to the platforms Maui supports. Xamarin Essentials has pretty wide use beyond Forms and I don't see why apps that don't currently use Forms should need to suddenly take Maui as a dependency.
Community toolkit would not be the place to put it since it's at the wrong end of the dependency chain:
Community toolkit -> Maui -> Essentials
As a related precedent Microsoft.Maui.Graphics has wider platform support than Maui.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Hello there, There is a typo in both this thread and in https://devblogs.microsoft.com/xamarin/xamarin-essentials-1-7-and-introducing-net-maui-essentials/ ; which is not present in (the newer?) https://learn.microsoft.com/en-us/dotnet/maui/migration/native-essentials?tabs=ios#modify-your-project-file . One says UsingMauiEssentials
which does not pop an error; other says UseMauiEssentials
which is the correct one. Of course, gh code search results in confusing uses of both - please help fix the docs/code, the migration to net7.0-sdk-style is hard enough, let alone having to deal with the internal inconsistencies :( I stumbled into the 'right' version by accident, no idea how.
Also, having a safe deprecation warning in Xamarin.Essentials / upgrade-assistant gently lean into Maui Essentials would be even nicer (instead of Xamarin.Essentials failing randomly during runtime when using inside the new .net sdk style / net7.0 projects).
@mattleibow hello! Would a PR be reviewed/accepted, if I reintroduce macOS TFM support for the Essentials package?
From what I have checked, my plan is following:
MauiEssentialsPlatforms
msbuild property similarly to how it was done with MauiGraphicsPlatforms
. And include macOS there depending on IncludeMacOSTargetFrameworks
.Essentials.DeviceTests
looks a bit tricky, but it seems macOS should also be added there. At least some of the APIs should be covered.Let me know if I am missing any other steps.
I have started these changes in this branch: https://github.com/maxkatz6/maui/tree/macos-essentials Still doesn't compile
Description
MAUI Essentials is the quasi-successor to Xamarin Essentials, and like its predecessor provides useful APIs outside of MAUI itself as well, such as the
Preferences
abstraction; hence the<UsingMauiEssentials>true</UsingMauiEssentials>
property.Xamarin Essentials also worked with
Xamarin.Mac
. For example,Preferences
simply mapped to macOS'sNSUserDefaults
. I would like the equivalent support fornet6.0-macos
.Public API Changes
(not applicable — bindings already exist in https://github.com/xamarin/xamarin-macios; the project would add
net6.0-macos
as an additional TFM)Intended Use-Case
I have existing apps that currently target
Xamarin.Mac
(AppKit) and would migrate tonet6.0-macos
, and without this feature, I wouldn't be able to swap Xamarin Essentials for Maui Essentials.