From 88eb6d02d703fe512dfb0a8091e54206d62f45e6 Mon Sep 17 00:00:00 2001 From: TJ Lambert <50846373+tj-devel709@users.noreply.github.com> Date: Wed, 8 Sep 2021 09:42:16 -0500 Subject: [PATCH] [CarPlay] Add Support for DotNet Attributes Co-authored-by: TJ Lambert --- src/CarPlay/CPCompat.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CarPlay/CPCompat.cs b/src/CarPlay/CPCompat.cs index 4dc5f6d576..0d3d82d312 100644 --- a/src/CarPlay/CPCompat.cs +++ b/src/CarPlay/CPCompat.cs @@ -11,12 +11,18 @@ using System; using Foundation; using ObjCRuntime; using System.ComponentModel; +using System.Runtime.Versioning; #if !XAMCORE_4_0 namespace CarPlay { [Register (SkipRegistration = true)] +#if !NET [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] [Obsolete ("This API has been removed from the native SDK.")] +#else + [UnsupportedOSPlatform ("ios")] + [Obsolete ("This API has been removed from the native SDK.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif [EditorBrowsable (EditorBrowsableState.Never)] public class CPEntity : NSObject, INSSecureCoding {