From 3af69e74e09ba0a41bff912c4449089b2e98bb22 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 15 Jan 2025 10:10:58 +0100 Subject: [PATCH 1/3] [CoreSpotlight] Implement up to Xcode 16.3 beta 2. --- src/CoreSpotlight/CSEnums.cs | 2 +- src/corespotlight.cs | 65 +++++++++++++++++-- .../Documentation.KnownFailures.txt | 22 +++++++ .../MacCatalyst-CoreSpotlight.ignore | 5 -- .../MacCatalyst-CoreSpotlight.todo | 10 --- .../common-CoreSpotlight.ignore | 4 -- .../iOS-CoreSpotlight.todo | 10 --- .../macOS-CoreSpotlight.ignore | 2 - .../macOS-CoreSpotlight.todo | 10 --- .../tvOS-CoreSpotlight.ignore | 2 - .../tvOS-CoreSpotlight.todo | 2 - 11 files changed, 84 insertions(+), 50 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/common-CoreSpotlight.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.todo diff --git a/src/CoreSpotlight/CSEnums.cs b/src/CoreSpotlight/CSEnums.cs index 5683695d2d72..3273e9e783f6 100644 --- a/src/CoreSpotlight/CSEnums.cs +++ b/src/CoreSpotlight/CSEnums.cs @@ -70,7 +70,7 @@ public enum CSFileProtection { CompleteUntilFirstUserAuthentication, } - [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum CSUserInteraction : long { Select, diff --git a/src/corespotlight.cs b/src/corespotlight.cs index 595c9d1aa3a2..1d0f6edfe4ed 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -19,6 +19,23 @@ namespace CoreSpotlight { + [Partial] + interface CoreSpotlightConstants + { + [Field ("CoreSpotlightVersionNumber")] + double CoreSpotlightVersionNumber { get; } + + [Field ("CoreSpotlightVersionString")] + [Internal] + IntPtr _CoreSpotlightVersionString { get; } + + [Static] + string CoreSpotlightVersionString { + [Wrap ("Marshal.PtrToStringUTF8 (_CoreSpotlightVersionString)!")] + get; + } + } + /// Handler for communication between the application and the index on the device. The app does not need to be running for this communication to occur. /// /// Apple documentation for CSIndexExtensionRequestHandler @@ -110,7 +127,6 @@ interface CSSearchableIndex { [Export ("initWithName:")] NativeHandle Constructor (string name); - [NoMac] [MacCatalyst (13, 1)] [Export ("initWithName:protectionClass:")] NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass); @@ -221,8 +237,20 @@ interface CSSearchableIndexDelegate { [Export ("fileURLForSearchableIndex:itemIdentifier:typeIdentifier:inPlace:error:")] [return: NullAllowed] NSUrl GetFileUrl (CSSearchableIndex searchableIndex, string itemIdentifier, string typeIdentifier, bool inPlace, out NSError outError); + + [NoTV] + [iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)] + [Export ("searchableItemsForIdentifiers:searchableItemsHandler:")] + void GetSearchableItems (string[] identifiers, CSSearchableIndexDelegateGetSearchableItemsHandler searchableItemsHandler); + + [NoTV] + [iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)] + [Export ("searchableItemsDidUpdate:")] + void DidUpdate (CSSearchableItem[] items); } + delegate void CSSearchableIndexDelegateGetSearchableItemsHandler (CSSearchableItem[] items); + /// A uniquely identifiable, searchable object in a . /// /// Apple documentation for CSSearchableItem @@ -299,6 +327,10 @@ interface CSSearchableItem : NSSecureCoding, NSCopying { [NoTV] [Export ("isUpdate", ArgumentSemantic.Assign)] bool IsUpdate { get; set; } + + [NoTV, iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + [Export ("updateListenerOptions", ArgumentSemantic.Assign)] + CSSearchableItemUpdateListenerOptions UpdateListenerOptions { get; set; } } /// Represents a string-like object that returns a locale-specific version of a string. @@ -1447,13 +1479,11 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding { NSString ActionIdentifier { get; } [NoTV, NoMac, iOS (15, 0)] - [NoMacCatalyst] [Export ("actionIdentifiers", ArgumentSemantic.Copy)] string [] ActionIdentifiers { get; set; } [NullAllowed] [NoTV, NoMac, iOS (15, 0)] - [NoMacCatalyst] [Export ("sharedItemContentType", ArgumentSemantic.Copy)] UTType SharedItemContentType { get; set; } @@ -1551,6 +1581,26 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding { [MacCatalyst (13, 1)] [NullAllowed, Export ("providerInPlaceFileTypeIdentifiers", ArgumentSemantic.Copy)] string [] ProviderInPlaceFileTypeIdentifiers { get; set; } + + [NoTV] + [iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + [Export ("moveFrom:")] + void MoveFrom (CSSearchableItemAttributeSet sourceAttributeSet); + + [NoTV] + [iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + [Export ("isPriority", ArgumentSemantic.Strong), NullAllowed] + NSNumber IsPriority { get; } + + [NoTV] + [iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + [Export ("textContentSummary", ArgumentSemantic.Copy), NullAllowed] + string TextContentSummary { get; } + + [NoTV] + [iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + [Export ("transcribedTextContent", ArgumentSemantic.Strong), NullAllowed] + string TranscribedTextContent { get; set; } } /// @@ -1748,7 +1798,7 @@ public enum CSSearchQuerySourceOptions : long { AllowMail = 1L << 0, } - [NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum CSSuggestionKind : long { None, @@ -1756,4 +1806,11 @@ public enum CSSuggestionKind : long { Default, } + [Native] + [TV (18, 4), iOS (18, 4), MacCatalyst (18, 4), Mac (15, 4)] + public enum CSSearchableItemUpdateListenerOptions : ulong { + Default = 0, + Summarization = 1 << 1, + Priority = 1 << 2, + } } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 5d4d977486fe..11b8e6a22a01 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -6610,6 +6610,9 @@ F:CoreServices.LSRoles.None F:CoreServices.LSRoles.Shell F:CoreServices.LSRoles.Viewer F:CoreSpotlight.CSIndexErrorCode.MismatchedClientState +F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Default +F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Priority +F:CoreSpotlight.CSSearchableItemUpdateListenerOptions.Summarization F:CoreSpotlight.CSSearchQuerySourceOptions.AllowMail F:CoreSpotlight.CSSearchQuerySourceOptions.Default F:CoreSpotlight.CSSuggestionKind.Custom @@ -28868,6 +28871,7 @@ M:CoreServices.LaunchServices.Open(Foundation.NSUrl) M:CoreServices.LaunchServices.Register(Foundation.NSUrl,System.Boolean) M:CoreServices.LaunchServices.SetDefaultHandlerForUrlScheme(System.String,System.String) M:CoreServices.LaunchServices.SetDefaultRoleHandlerForContentType(System.String,System.String,CoreServices.LSRoles) +M:CoreSpotlight.CoreSpotlightConstants.#ctor M:CoreSpotlight.CSCustomAttributeKey.#ctor(System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean) M:CoreSpotlight.CSCustomAttributeKey.#ctor(System.String) M:CoreSpotlight.CSCustomAttributeKey.Copy(Foundation.NSZone) @@ -28877,8 +28881,10 @@ M:CoreSpotlight.CSImportExtension.Update(CoreSpotlight.CSSearchableItemAttribute M:CoreSpotlight.CSIndexExtensionRequestHandler.BeginRequestWithExtensionContext(Foundation.NSExtensionContext) M:CoreSpotlight.CSIndexExtensionRequestHandler.DidFinishThrottle(CoreSpotlight.CSSearchableIndex) M:CoreSpotlight.CSIndexExtensionRequestHandler.DidThrottle(CoreSpotlight.CSSearchableIndex) +M:CoreSpotlight.CSIndexExtensionRequestHandler.DidUpdate(CoreSpotlight.CSSearchableItem[]) M:CoreSpotlight.CSIndexExtensionRequestHandler.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@) M:CoreSpotlight.CSIndexExtensionRequestHandler.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@) +M:CoreSpotlight.CSIndexExtensionRequestHandler.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler) M:CoreSpotlight.CSIndexExtensionRequestHandler.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action) M:CoreSpotlight.CSIndexExtensionRequestHandler.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action) M:CoreSpotlight.CSLocalizedString.#ctor(Foundation.NSDictionary) @@ -28911,12 +28917,16 @@ M:CoreSpotlight.CSSearchableIndex.ProvideDataAsync(System.String,System.String,S M:CoreSpotlight.CSSearchableIndexBundleDataResult.#ctor(Foundation.NSData) M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidFinishThrottle(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex) M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidThrottle(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex) +M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.DidUpdate(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableItem[]) M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetData(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@) M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetFileUrl(CoreSpotlight.ICSSearchableIndexDelegate,CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@) +M:CoreSpotlight.CSSearchableIndexDelegate_Extensions.GetSearchableItems(CoreSpotlight.ICSSearchableIndexDelegate,System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler) M:CoreSpotlight.CSSearchableIndexDelegate.DidFinishThrottle(CoreSpotlight.CSSearchableIndex) M:CoreSpotlight.CSSearchableIndexDelegate.DidThrottle(CoreSpotlight.CSSearchableIndex) +M:CoreSpotlight.CSSearchableIndexDelegate.DidUpdate(CoreSpotlight.CSSearchableItem[]) M:CoreSpotlight.CSSearchableIndexDelegate.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@) M:CoreSpotlight.CSSearchableIndexDelegate.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@) +M:CoreSpotlight.CSSearchableIndexDelegate.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler) M:CoreSpotlight.CSSearchableIndexDelegate.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action) M:CoreSpotlight.CSSearchableIndexDelegate.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action) M:CoreSpotlight.CSSearchableItem.#ctor(System.String,System.String,CoreSpotlight.CSSearchableItemAttributeSet) @@ -28927,6 +28937,7 @@ M:CoreSpotlight.CSSearchableItemAttributeSet.#ctor(System.String) M:CoreSpotlight.CSSearchableItemAttributeSet.#ctor(UniformTypeIdentifiers.UTType) M:CoreSpotlight.CSSearchableItemAttributeSet.Copy(Foundation.NSZone) M:CoreSpotlight.CSSearchableItemAttributeSet.EncodeTo(Foundation.NSCoder) +M:CoreSpotlight.CSSearchableItemAttributeSet.MoveFrom(CoreSpotlight.CSSearchableItemAttributeSet) M:CoreSpotlight.CSSearchQuery.#ctor(System.String,CoreSpotlight.CSSearchQueryContext) M:CoreSpotlight.CSSearchQuery.#ctor(System.String,System.String[]) M:CoreSpotlight.CSSearchQuery.Cancel @@ -28948,8 +28959,10 @@ M:CoreSpotlight.CSUserQuery.UserEngaged(CoreSpotlight.CSSuggestion,CoreSpotlight M:CoreSpotlight.CSUserQueryContext.Create(CoreSpotlight.CSSuggestion) M:CoreSpotlight.ICSSearchableIndexDelegate.DidFinishThrottle(CoreSpotlight.CSSearchableIndex) M:CoreSpotlight.ICSSearchableIndexDelegate.DidThrottle(CoreSpotlight.CSSearchableIndex) +M:CoreSpotlight.ICSSearchableIndexDelegate.DidUpdate(CoreSpotlight.CSSearchableItem[]) M:CoreSpotlight.ICSSearchableIndexDelegate.GetData(CoreSpotlight.CSSearchableIndex,System.String,System.String,Foundation.NSError@) M:CoreSpotlight.ICSSearchableIndexDelegate.GetFileUrl(CoreSpotlight.CSSearchableIndex,System.String,System.String,System.Boolean,Foundation.NSError@) +M:CoreSpotlight.ICSSearchableIndexDelegate.GetSearchableItems(System.String[],CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler) M:CoreSpotlight.ICSSearchableIndexDelegate.ReindexAllSearchableItems(CoreSpotlight.CSSearchableIndex,System.Action) M:CoreSpotlight.ICSSearchableIndexDelegate.ReindexSearchableItems(CoreSpotlight.CSSearchableIndex,System.String[],System.Action) M:CoreTelephony.CTCellularPlanProvisioning.AddPlan(CoreTelephony.CTCellularPlanProvisioningRequest,System.Action{CoreTelephony.CTCellularPlanProvisioningAddPlanResult}) @@ -54419,9 +54432,12 @@ P:CoreServices.FSEventStream.DeviceBeingWatched P:CoreServices.FSEventStream.LatestEventId P:CoreServices.FSEventStream.PathsBeingWatched P:CoreServices.FSEventStreamEventsArgs.Events +P:CoreSpotlight.CoreSpotlightConstants.CoreSpotlightVersionNumber +P:CoreSpotlight.CoreSpotlightConstants.CoreSpotlightVersionString P:CoreSpotlight.CSSearchableIndex.IndexDelegate P:CoreSpotlight.CSSearchableIndexBundleDataResult.Arg1 P:CoreSpotlight.CSSearchableItem.IsUpdate +P:CoreSpotlight.CSSearchableItem.UpdateListenerOptions P:CoreSpotlight.CSSearchableItemAttributeSet.ActionIdentifier P:CoreSpotlight.CSSearchableItemAttributeSet.ActionIdentifiers P:CoreSpotlight.CSSearchableItemAttributeSet.DarkThumbnailUrl @@ -54470,6 +54486,7 @@ P:CoreSpotlight.CSSearchableItemAttributeSet.Information P:CoreSpotlight.CSSearchableItemAttributeSet.InstantMessageAddresses P:CoreSpotlight.CSSearchableItemAttributeSet.Instructions P:CoreSpotlight.CSSearchableItemAttributeSet.IsoSpeed +P:CoreSpotlight.CSSearchableItemAttributeSet.IsPriority P:CoreSpotlight.CSSearchableItemAttributeSet.Item(CoreSpotlight.CSCustomAttributeKey) P:CoreSpotlight.CSSearchableItemAttributeSet.KeySignature P:CoreSpotlight.CSSearchableItemAttributeSet.Keywords @@ -54541,6 +54558,7 @@ P:CoreSpotlight.CSSearchableItemAttributeSet.SupportsNavigation P:CoreSpotlight.CSSearchableItemAttributeSet.SupportsPhoneCall P:CoreSpotlight.CSSearchableItemAttributeSet.Tempo P:CoreSpotlight.CSSearchableItemAttributeSet.TextContent +P:CoreSpotlight.CSSearchableItemAttributeSet.TextContentSummary P:CoreSpotlight.CSSearchableItemAttributeSet.Theme P:CoreSpotlight.CSSearchableItemAttributeSet.Thoroughfare P:CoreSpotlight.CSSearchableItemAttributeSet.ThumbnailData @@ -54549,6 +54567,7 @@ P:CoreSpotlight.CSSearchableItemAttributeSet.TimeSignature P:CoreSpotlight.CSSearchableItemAttributeSet.Timestamp P:CoreSpotlight.CSSearchableItemAttributeSet.Title P:CoreSpotlight.CSSearchableItemAttributeSet.TotalBitRate +P:CoreSpotlight.CSSearchableItemAttributeSet.TranscribedTextContent P:CoreSpotlight.CSSearchableItemAttributeSet.Url P:CoreSpotlight.CSSearchableItemAttributeSet.Version P:CoreSpotlight.CSSearchableItemAttributeSet.VideoBitRate @@ -69220,9 +69239,12 @@ T:CoreServices.LaunchServices T:CoreServices.LSAcceptanceFlags T:CoreServices.LSResult T:CoreServices.LSRoles +T:CoreSpotlight.CoreSpotlightConstants T:CoreSpotlight.CSImportExtension T:CoreSpotlight.CSSearchableIndexBundleDataResult +T:CoreSpotlight.CSSearchableIndexDelegateGetSearchableItemsHandler T:CoreSpotlight.CSSearchableIndexEndIndexHandler +T:CoreSpotlight.CSSearchableItemUpdateListenerOptions T:CoreSpotlight.CSSearchQueryContext T:CoreSpotlight.CSSearchQuerySourceOptions T:CoreSpotlight.CSSuggestion diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.ignore deleted file mode 100644 index 288ce16eac59..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.ignore +++ /dev/null @@ -1,5 +0,0 @@ -## not annotated for catalyst and not responding on macOS 12 beta 3 -!missing-selector! CSSearchableItemAttributeSet::actionIdentifiers not bound -!missing-selector! CSSearchableItemAttributeSet::setActionIdentifiers: not bound -!missing-selector! CSSearchableItemAttributeSet::setSharedItemContentType: not bound -!missing-selector! CSSearchableItemAttributeSet::sharedItemContentType not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.todo deleted file mode 100644 index 5525c6cf02a4..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-CoreSpotlight.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-enum! CSSearchableItemUpdateListenerOptions not bound -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsDidUpdate: not found -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsForIdentifiers:searchableItemsHandler: not found -!missing-selector! CSSearchableItem::setUpdateListenerOptions: not bound -!missing-selector! CSSearchableItem::updateListenerOptions not bound -!missing-selector! CSSearchableItemAttributeSet::isPriority not bound -!missing-selector! CSSearchableItemAttributeSet::moveFrom: not bound -!missing-selector! CSSearchableItemAttributeSet::setTranscribedTextContent: not bound -!missing-selector! CSSearchableItemAttributeSet::textContentSummary not bound -!missing-selector! CSSearchableItemAttributeSet::transcribedTextContent not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreSpotlight.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreSpotlight.ignore deleted file mode 100644 index b68e9824067d..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreSpotlight.ignore +++ /dev/null @@ -1,4 +0,0 @@ -# note: framework not available on watchOS - -!missing-field! CoreSpotlightVersionNumber not bound -!missing-field! CoreSpotlightVersionString not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo deleted file mode 100644 index 5525c6cf02a4..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-enum! CSSearchableItemUpdateListenerOptions not bound -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsDidUpdate: not found -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsForIdentifiers:searchableItemsHandler: not found -!missing-selector! CSSearchableItem::setUpdateListenerOptions: not bound -!missing-selector! CSSearchableItem::updateListenerOptions not bound -!missing-selector! CSSearchableItemAttributeSet::isPriority not bound -!missing-selector! CSSearchableItemAttributeSet::moveFrom: not bound -!missing-selector! CSSearchableItemAttributeSet::setTranscribedTextContent: not bound -!missing-selector! CSSearchableItemAttributeSet::textContentSummary not bound -!missing-selector! CSSearchableItemAttributeSet::transcribedTextContent not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.ignore deleted file mode 100644 index d44c95c83cf7..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.ignore +++ /dev/null @@ -1,2 +0,0 @@ -## protectionClass is a `NSFileProtectionType` which is not available on macOS -!missing-selector! CSSearchableIndex::initWithName:protectionClass: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo deleted file mode 100644 index 5525c6cf02a4..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo +++ /dev/null @@ -1,10 +0,0 @@ -!missing-enum! CSSearchableItemUpdateListenerOptions not bound -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsDidUpdate: not found -!missing-protocol-member! CSSearchableIndexDelegate::searchableItemsForIdentifiers:searchableItemsHandler: not found -!missing-selector! CSSearchableItem::setUpdateListenerOptions: not bound -!missing-selector! CSSearchableItem::updateListenerOptions not bound -!missing-selector! CSSearchableItemAttributeSet::isPriority not bound -!missing-selector! CSSearchableItemAttributeSet::moveFrom: not bound -!missing-selector! CSSearchableItemAttributeSet::setTranscribedTextContent: not bound -!missing-selector! CSSearchableItemAttributeSet::textContentSummary not bound -!missing-selector! CSSearchableItemAttributeSet::transcribedTextContent not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.ignore deleted file mode 100644 index 05ccc03b6f3f..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.ignore +++ /dev/null @@ -1,2 +0,0 @@ -# framework is not present on tvOS as of xcode 14.0 -!missing-enum! CSSuggestionKind not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.todo deleted file mode 100644 index 84d262c442c4..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreSpotlight.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-enum! CSUserInteraction not bound -!missing-enum! CSSearchableItemUpdateListenerOptions not bound From 8805057ebd330149aedb66b795a0fb83616ccec9 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Fri, 7 Mar 2025 10:49:12 +0000 Subject: [PATCH 2/3] Auto-format source code --- src/corespotlight.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/corespotlight.cs b/src/corespotlight.cs index 1d0f6edfe4ed..6f00e638b2fa 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -20,8 +20,7 @@ namespace CoreSpotlight { [Partial] - interface CoreSpotlightConstants - { + interface CoreSpotlightConstants { [Field ("CoreSpotlightVersionNumber")] double CoreSpotlightVersionNumber { get; } @@ -241,15 +240,15 @@ interface CSSearchableIndexDelegate { [NoTV] [iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)] [Export ("searchableItemsForIdentifiers:searchableItemsHandler:")] - void GetSearchableItems (string[] identifiers, CSSearchableIndexDelegateGetSearchableItemsHandler searchableItemsHandler); + void GetSearchableItems (string [] identifiers, CSSearchableIndexDelegateGetSearchableItemsHandler searchableItemsHandler); [NoTV] [iOS (18, 4), Mac (15, 4), MacCatalyst (18, 4)] [Export ("searchableItemsDidUpdate:")] - void DidUpdate (CSSearchableItem[] items); + void DidUpdate (CSSearchableItem [] items); } - delegate void CSSearchableIndexDelegateGetSearchableItemsHandler (CSSearchableItem[] items); + delegate void CSSearchableIndexDelegateGetSearchableItemsHandler (CSSearchableItem [] items); /// A uniquely identifiable, searchable object in a . /// From 0fec529f0a93c7edf07ba3b26db5a7a54d460218 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 7 Mar 2025 14:48:17 +0100 Subject: [PATCH 3/3] Adjust availability attributes --- src/corespotlight.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corespotlight.cs b/src/corespotlight.cs index 6f00e638b2fa..1cc18ee8e069 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -1477,12 +1477,12 @@ interface CSSearchableItemAttributeSet : NSCopying, NSSecureCoding { [Field ("CSActionIdentifier")] NSString ActionIdentifier { get; } - [NoTV, NoMac, iOS (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (18, 0)] [Export ("actionIdentifiers", ArgumentSemantic.Copy)] string [] ActionIdentifiers { get; set; } [NullAllowed] - [NoTV, NoMac, iOS (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (18, 0)] [Export ("sharedItemContentType", ArgumentSemantic.Copy)] UTType SharedItemContentType { get; set; }