From 3b8112dc5d0cc753585e424a332b8841c6479b0a Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 18 Aug 2022 18:58:49 -0400 Subject: [PATCH 1/2] [FSEvents] Add support for Xcode 14 beta 5. --- src/CoreServices/FSEvents.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/CoreServices/FSEvents.cs b/src/CoreServices/FSEvents.cs index 3c62e9cfea4e..fe47a28fdc10 100644 --- a/src/CoreServices/FSEvents.cs +++ b/src/CoreServices/FSEvents.cs @@ -504,6 +504,11 @@ public void Stop () static extern void FSEventStreamScheduleWithRunLoop (IntPtr handle, IntPtr runLoop, IntPtr runLoopMode); +#if NET + [Obsolete ("Starting with macOS13.0 use 'SetDispatchQueue' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#else + [Deprecated (PlatformName.MacOSX, 13,0, message: "Use 'SetDispatchQueue' instead.")] +#endif public void ScheduleWithRunLoop (CFRunLoop runLoop, NSString runLoopMode) { FSEventStreamScheduleWithRunLoop (GetCheckedHandle (), runLoop.Handle, runLoopMode.Handle); @@ -528,6 +533,11 @@ public void ScheduleWithRunLoop (NSRunLoop runLoop) static extern void FSEventStreamUnscheduleFromRunLoop (IntPtr handle, IntPtr runLoop, IntPtr runLoopMode); +#if NET + [Obsolete ("Starting with macOS13.0 use 'SetDispatchQueue' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#else + [Deprecated (PlatformName.MacOSX, 13,0, message: "Use 'SetDispatchQueue' instead.")] +#endif public void UnscheduleFromRunLoop (CFRunLoop runLoop, NSString runLoopMode) { FSEventStreamScheduleWithRunLoop (GetCheckedHandle (), runLoop.Handle, runLoopMode.Handle); From e5cbac2134dc7d06f155cbf742e85c0ab5c42547 Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Tue, 23 Aug 2022 21:25:48 -0400 Subject: [PATCH 2/2] Add UnsupportedOSPlatform attribute --- src/CoreServices/FSEvents.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CoreServices/FSEvents.cs b/src/CoreServices/FSEvents.cs index fe47a28fdc10..bc25293f44b1 100644 --- a/src/CoreServices/FSEvents.cs +++ b/src/CoreServices/FSEvents.cs @@ -506,6 +506,7 @@ static extern void FSEventStreamScheduleWithRunLoop (IntPtr handle, #if NET [Obsolete ("Starting with macOS13.0 use 'SetDispatchQueue' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] + [UnsupportedOSPlatform ("macos13.0")] #else [Deprecated (PlatformName.MacOSX, 13,0, message: "Use 'SetDispatchQueue' instead.")] #endif @@ -535,6 +536,7 @@ static extern void FSEventStreamUnscheduleFromRunLoop (IntPtr handle, #if NET [Obsolete ("Starting with macOS13.0 use 'SetDispatchQueue' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] + [UnsupportedOSPlatform ("macos13.0")] #else [Deprecated (PlatformName.MacOSX, 13,0, message: "Use 'SetDispatchQueue' instead.")] #endif