CSSearchableIndex offers API that can't be called on macOS

Originator:steipete
Number:rdar://33745002 Date Originated:06-Aug-2017 08:38 PM
Status:Open Resolved:
Product:macOS + SDK Product Version:macOS 10.13
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
CoreSpotlight on macOS 10.13 has following API:

//Apps can set a default protection class for items in their entitlements.  You can alternately create an instance with a custom protection class to use on iOS.  It should be one of NSFileProtectionComplete, NSFileProtectionCompleteUnlessOpen, or NSFileProtectionCompleteUntilFirstUserAuthentication.
- (instancetype)initWithName:(NSString *)name protectionClass:(nullable NSFileProtectionType)protectionClass;

However, NSFileProtectionType is unavailable on macOS. I would expect to at least have NSFileProtectionNone available on macOS. Or else make this call unavailable as I can’t call it right now.

Steps to Reproduce:
See API. Try to create a CSSearchableIndex.

Expected Results:
Some way to use NSFileProtection on macOS or API being unavailable.

Actual Results:
Things are weird. Should I just pass an empty string? :)

Version:
macOS 10.13

Notes:
Oversight?

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!