From 076edfe7067c966690df4c41d0780d185332e916 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 27 Apr 2026 18:26:04 +0200 Subject: [PATCH 1/2] [QuartzComposer] Replace RSS-related field bindings with manual code that returns null. These fields (QCCompositionInputRSSArticleDurationKey, QCCompositionInputRSSFeedURLKey, QCCompositionProtocolRSSVisualizer) have not been available at runtime since macOS 10.13 (which we no longer support), so remove them with manual code (that returns null) and obsolete them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/QuartzComposer/QCComposition.cs | 52 ++++++++++++++++++++++++++ src/frameworks.sources | 5 +++ src/quartzcomposer.cs | 26 ++++--------- tests/introspection/MacApiFieldTest.cs | 6 --- 4 files changed, 64 insertions(+), 25 deletions(-) create mode 100644 src/QuartzComposer/QCComposition.cs diff --git a/src/QuartzComposer/QCComposition.cs b/src/QuartzComposer/QCComposition.cs new file mode 100644 index 000000000000..c55c4ab56a05 --- /dev/null +++ b/src/QuartzComposer/QCComposition.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.ComponentModel; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace QuartzComposer; + +partial class QCComposition { +#if !XAMCORE_5_0 + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [Field ("QCCompositionInputRSSArticleDurationKey", "QuartzComposer")] + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("This field is always null.")] + public static NSString? InputRSSArticleDurationKey { + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + get => null; + } + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [Field ("QCCompositionInputRSSFeedURLKey", "QuartzComposer")] + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("This field is always null.")] + public static NSString? InputRSSFeedURLKey { + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + get => null; + } + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [Field ("QCCompositionProtocolRSSVisualizer", "QuartzComposer")] + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("This field is always null.")] + public static NSString? ProtocolRSSVisualizer { + [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] + [SupportedOSPlatform ("macos")] + get => null; + } +#endif // !XAMCORE_5_0 +} diff --git a/src/frameworks.sources b/src/frameworks.sources index 6573e8e10f1b..58f1561da60a 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1478,6 +1478,11 @@ PRINTCORE_SOURCES = \ PUSHTOTALK_SOURCES = \ PushToTalk/Compat.cs \ +# QuartzComposer + +QUARTZCOMPOSER_SOURCES = \ + QuartzComposer/QCComposition.cs \ + # QuickLook QUICKLOOK_SOURCES = \ diff --git a/src/quartzcomposer.cs b/src/quartzcomposer.cs index ffc4192e1e00..f514f6e6bcce 100644 --- a/src/quartzcomposer.cs +++ b/src/quartzcomposer.cs @@ -158,19 +158,10 @@ interface QCComposition : NSCopying { [Field ("QCCompositionInputDestinationImageKey")] NSString InputDestinationImageKey { get; } - /// To be added. - /// To be added. - /// To be added. - [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")] - [Field ("QCCompositionInputRSSFeedURLKey")] - NSString InputRSSFeedURLKey { get; } - - /// To be added. - /// To be added. - /// To be added. - [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")] - [Field ("QCCompositionInputRSSArticleDurationKey")] - NSString InputRSSArticleDurationKey { get; } +#if !XAMCORE_5_0 + // The 'InputRSSFeedURLKey' property has manual bindings. + // The 'InputRSSArticleDurationKey' property has manual bindings. +#endif /// To be added. /// To be added. @@ -280,12 +271,9 @@ interface QCComposition : NSCopying { [Field ("QCCompositionProtocolScreenSaver")] NSString ProtocolScreenSaver { get; } - /// To be added. - /// To be added. - /// To be added. - [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")] - [Field ("QCCompositionProtocolRSSVisualizer")] - NSString ProtocolRSSVisualizer { get; } +#if !XAMCORE_5_0 + // The 'ProtocolRSSVisualizer' property has manual bindings. +#endif /// To be added. /// To be added. diff --git a/tests/introspection/MacApiFieldTest.cs b/tests/introspection/MacApiFieldTest.cs index a43e7949c80f..b9457f61779f 100644 --- a/tests/introspection/MacApiFieldTest.cs +++ b/tests/introspection/MacApiFieldTest.cs @@ -159,12 +159,6 @@ protected override bool Skip (string constantName, string? libraryName) // kCLErrorUserInfoAlternateRegionKey also returns null on iOS case "kCLErrorUserInfoAlternateRegionKey": return true; - case "QCCompositionInputRSSArticleDurationKey": - case "QCCompositionInputRSSFeedURLKey": - case "QCCompositionProtocolRSSVisualizer": - if (Mac.CheckSystemVersion (10, 14)) - return true; - goto default; default: return base.Skip (constantName, libraryName); } From 36adb7313e237e430642fffda31a05a5a8fba39a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 29 Apr 2026 10:05:35 +0200 Subject: [PATCH 2/2] Remove the [Field] attributes. --- src/QuartzComposer/QCComposition.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/QuartzComposer/QCComposition.cs b/src/QuartzComposer/QCComposition.cs index c55c4ab56a05..f3bbc93c425d 100644 --- a/src/QuartzComposer/QCComposition.cs +++ b/src/QuartzComposer/QCComposition.cs @@ -14,7 +14,6 @@ namespace QuartzComposer; partial class QCComposition { #if !XAMCORE_5_0 [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] - [Field ("QCCompositionInputRSSArticleDurationKey", "QuartzComposer")] [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [SupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] @@ -26,7 +25,6 @@ public static NSString? InputRSSArticleDurationKey { } [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] - [Field ("QCCompositionInputRSSFeedURLKey", "QuartzComposer")] [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [SupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)] @@ -38,7 +36,6 @@ public static NSString? InputRSSFeedURLKey { } [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] - [Field ("QCCompositionProtocolRSSVisualizer", "QuartzComposer")] [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [SupportedOSPlatform ("macos")] [EditorBrowsable (EditorBrowsableState.Never)]