diff --git a/src/SharedMauiCoreLibrary/Services/DeviceProviderService.cs b/src/SharedMauiCoreLibrary/Services/DeviceProviderService.cs index e287d74..f74c549 100644 --- a/src/SharedMauiCoreLibrary/Services/DeviceProviderService.cs +++ b/src/SharedMauiCoreLibrary/Services/DeviceProviderService.cs @@ -1,7 +1,15 @@ -namespace AndreasReitberger.Shared.Core.Services +#if ANDROID || IOS || MACCATALYST || WINDOWS +using System.Runtime.Versioning; +#endif + +namespace AndreasReitberger.Shared.Core.Services { // Somehow has trouble with .NET 6 #if ANDROID || IOS || MACCATALYST || WINDOWS + [SupportedOSPlatform(SPlatforms.AndroidVersion)] + [SupportedOSPlatform(SPlatforms.IOSVersion)] + [SupportedOSPlatform(SPlatforms.WindowsVersion)] + [SupportedOSPlatform(SPlatforms.MACCatalystVersion)] public partial class DeviceProviderService { public static partial string? GetDeviceId(); diff --git a/src/SharedMauiCoreLibrary/Services/ImageResizerService.cs b/src/SharedMauiCoreLibrary/Services/ImageResizerService.cs index 6624d99..225a2ba 100644 --- a/src/SharedMauiCoreLibrary/Services/ImageResizerService.cs +++ b/src/SharedMauiCoreLibrary/Services/ImageResizerService.cs @@ -1,7 +1,15 @@ -namespace AndreasReitberger.Shared.Core.Services +#if ANDROID || IOS || MACCATALYST || WINDOWS +using System.Runtime.Versioning; +#endif + +namespace AndreasReitberger.Shared.Core.Services { // Somehow has trouble with .NET 6 #if ANDROID || IOS || MACCATALYST || WINDOWS + [SupportedOSPlatform(SPlatforms.AndroidVersion)] + [SupportedOSPlatform(SPlatforms.IOSVersion)] + [SupportedOSPlatform(SPlatforms.WindowsVersion)] + [SupportedOSPlatform(SPlatforms.MACCatalystVersion)] public partial class ImageResizerService { public partial byte[] ResizeImage(byte[] imageData, float width, float height = -1);