Open logikonline opened 1 year ago
switch (UIDevice.CurrentDevice.UserInterfaceIdiom)
{
case UIUserInterfaceIdiom.Pad:
return DeviceIdiom.Tablet;
case UIUserInterfaceIdiom.Phone:
return DeviceIdiom.Phone;
case UIUserInterfaceIdiom.TV:
return DeviceIdiom.TV;
case UIUserInterfaceIdiom.CarPlay:
case UIUserInterfaceIdiom.Unspecified:
default:
return DeviceIdiom.Unknown;
}
Add
case UIUserInterfaceIdiom.Mac:
return DeviceIdiom.Desktop;
To this code section https://github.com/xamarin/Essentials/blob/25ceeea887c50e5194d746bd159be1f143e26157/Xamarin.Essentials/DeviceInfo/DeviceInfo.ios.tvos.watchos.cs#L51
Please fix this in Maui too
If additional helper routines are needed, these should assist the dev.
`//A Boolean value that indicates whether the process is an iPhone or iPad app running on a Mac.
Description
Essentials doesn't properly detect apps on the MacOS, mistaking them for Tablets
Steps to Reproduce
Expected Behavior
Should report Desktop
Actual Behavior
Reports Tablet