diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 02c8b32afbba..0f94ada4dbe1 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -1371,4 +1371,16 @@ public enum NSUrlSessionDelayedRequestDisposition : long { public enum NSXpcConnectionOptions : ulong { Privileged = (1 << 12), } + + [Mac (11, 0), MacCatalyst (13, 1)] + public enum NSFileProtectionType { + [Field ("NSFileProtectionComplete")] + Complete, + [Field ("NSFileProtectionCompleteUnlessOpen")] + CompleteUnlessOpen, + [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] + CompleteUntilFirstUserAuthentication, + [Field ("NSFileProtectionNone")] + None, + } } diff --git a/src/corespotlight.cs b/src/corespotlight.cs index c5299b0c89c3..3ffd4adb4df8 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -74,6 +74,15 @@ interface CSSearchableIndex { [Export ("initWithName:protectionClass:")] NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass); + [EditorBrowsable (EditorBrowsableState.Advanced)] + [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV, NoWatch] + [Export ("initWithName:protectionClass:bundleIdentifier:options:")] + NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass, string bundleIdentifier, nint options); + + [Wrap ("this (name, protectionClass.GetConstant (), bundleIdentifier, options)")] + [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV, NoWatch] + NativeHandle Constructor (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options); + [Export ("indexSearchableItems:completionHandler:")] [Async] void Index (CSSearchableItem [] items, [NullAllowed] Action completionHandler); @@ -1190,6 +1199,14 @@ interface CSSuggestion : NSSecureCoding, NSCopying { [Export ("compareByRank:")] NSComparisonResult CompareByRank (CSSuggestion other); + + [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch] + [Export ("score")] + NSNumber Score { get; } + + [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch] + [Export ("suggestionDataSources")] + NSObject [] SuggestionDataSources { get; } } [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] diff --git a/src/foundation.cs b/src/foundation.cs index 2cfd6c625750..467bcd410b64 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -13444,21 +13444,25 @@ partial interface NSFileManager { [Field ("NSFileProtectionKey")] NSString FileProtectionKey { get; } + [Obsolete ("Use the 'NSFileProtectionType' instead.")] [Mac (11, 0)] [MacCatalyst (13, 1)] [Field ("NSFileProtectionNone")] NSString FileProtectionNone { get; } + [Obsolete ("Use the 'NSFileProtectionType' instead.")] [Mac (11, 0)] [MacCatalyst (13, 1)] [Field ("NSFileProtectionComplete")] NSString FileProtectionComplete { get; } + [Obsolete ("Use the 'NSFileProtectionType' instead.")] [Mac (11, 0)] [MacCatalyst (13, 1)] [Field ("NSFileProtectionCompleteUnlessOpen")] NSString FileProtectionCompleteUnlessOpen { get; } + [Obsolete ("Use the 'NSFileProtectionType' instead.")] [Mac (11, 0)] [MacCatalyst (13, 1)] [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication")] 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 f52d4dafac27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreSpotlight.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! CSSuggestion::score not bound -!missing-selector! CSSuggestion::suggestionDataSources not bound -!missing-selector! CSSearchableIndex::initWithName:protectionClass:bundleIdentifier:options: 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 f52d4dafac27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreSpotlight.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! CSSuggestion::score not bound -!missing-selector! CSSuggestion::suggestionDataSources not bound -!missing-selector! CSSearchableIndex::initWithName:protectionClass:bundleIdentifier:options: not bound diff --git a/tests/xtro-sharpie/iOS-CoreSpotlight.todo b/tests/xtro-sharpie/iOS-CoreSpotlight.todo deleted file mode 100644 index f52d4dafac27..000000000000 --- a/tests/xtro-sharpie/iOS-CoreSpotlight.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! CSSuggestion::score not bound -!missing-selector! CSSuggestion::suggestionDataSources not bound -!missing-selector! CSSearchableIndex::initWithName:protectionClass:bundleIdentifier:options: not bound diff --git a/tests/xtro-sharpie/macOS-CoreSpotlight.todo b/tests/xtro-sharpie/macOS-CoreSpotlight.todo deleted file mode 100644 index f52d4dafac27..000000000000 --- a/tests/xtro-sharpie/macOS-CoreSpotlight.todo +++ /dev/null @@ -1,3 +0,0 @@ -!missing-selector! CSSuggestion::score not bound -!missing-selector! CSSuggestion::suggestionDataSources not bound -!missing-selector! CSSearchableIndex::initWithName:protectionClass:bundleIdentifier:options: not bound