forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
CoreSpotlight tvOS xcode9 beta1
Vincent Dondain edited this page Jun 5, 2017
·
2 revisions
#CoreSpotlight.framework
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h 2017-05-19 01:42:49.000000000 -0400
@@ -8,7 +8,7 @@
#import <CoreSpotlight/CSSearchableIndex.h>
#import <CoreSpotlight/CSBase.h>
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@interface CSIndexExtensionRequestHandler : NSObject <NSExtensionRequestHandling,CSSearchableIndexDelegate>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h 2017-05-19 01:42:49.000000000 -0400
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@interface CSPerson : NSObject <NSSecureCoding,NSCopying>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h 2017-05-19 01:42:49.000000000 -0400
@@ -9,18 +9,18 @@
NS_ASSUME_NONNULL_BEGIN
-CORESPOTLIGHT_EXPORT NSString * const CSSearchQueryErrorDomain CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSSearchQueryErrorDomain CS_AVAILABLE(10_12, 10_0) CS_TVOS_UNAVAILABLE;
typedef NS_ENUM(NSInteger, CSSearchQueryErrorCode) {
CSSearchQueryErrorCodeUnknown = -2000,
CSSearchQueryErrorCodeIndexUnreachable = -2001,
CSSearchQueryErrorCodeInvalidQuery = -2002,
CSSearchQueryErrorCodeCancelled = -2003,
-} CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
+} CS_AVAILABLE(10_12, 10_0) CS_TVOS_UNAVAILABLE;
@class CSSearchableItem;
-CS_CLASS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE
+CS_CLASS_AVAILABLE(10_12, 10_0) CS_TVOS_UNAVAILABLE
@interface CSSearchQuery : NSObject
- (instancetype)init NS_UNAVAILABLE;
@@ -46,7 +46,7 @@
// or NSFileProtectionCompleteUntilFirstUserAuthentication.
// By default the data protection will be read from the "com.apple.developer.default-data-protection"
// entitlement if any or NSFileProtectionCompleteUntilFirstUserAuthentication will be used otherwise.
-@property (copy) NSArray<NSString *> *protectionClasses;
+@property (copy) NSArray<NSFileProtectionType> *protectionClasses;
- (void)start;
- (void)cancel;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h 2017-05-19 01:42:49.000000000 -0400
@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
-CORESPOTLIGHT_EXPORT NSString * const CSIndexErrorDomain CS_AVAILABLE(NA, 9_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSIndexErrorDomain CS_AVAILABLE(10_13, 9_0) CS_TVOS_UNAVAILABLE;
typedef NS_ENUM(NSInteger, CSIndexErrorCode) {
CSIndexErrorCodeUnknownError = -1,
@@ -20,11 +20,11 @@
CSIndexErrorCodeRemoteConnectionError = -1003, //There was an error trying to communicate with the remote process
CSIndexErrorCodeQuotaExceeded = -1004, //Quota for bundle was exceeded
CSIndexErrorCodeIndexingUnsupported = -1005, //Indexing isn't supported on this device
-} CS_AVAILABLE(NA, 9_0) CS_TVOS_UNAVAILABLE;
+} CS_AVAILABLE(10_13, 9_0) CS_TVOS_UNAVAILABLE;
@protocol CSSearchableIndexDelegate;
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@interface CSSearchableIndex : NSObject
@@ -39,7 +39,7 @@
- (instancetype)initWithName:(NSString *)name;
//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 NSString *)protectionClass;
+- (instancetype)initWithName:(NSString *)name protectionClass:(nullable NSFileProtectionType)protectionClass;
// Call this method to add or update items in the index.
// Completion handlers will be called once the data has been journaled by the index. If the completion handler returns an error, the client should retry, as it was not journaled correctly.
@@ -86,7 +86,7 @@
//An application that is long running should provide a CSSearchableIndexDelegate conforming object to handle communication from the index.
//Alternatively, an app can provide an extension whose request handler conforms to this protocol and the extension will be called if the app isn't running.
-CS_AVAILABLE(NA, 9_0)
+CS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@protocol CSSearchableIndexDelegate <NSObject>
@@ -114,6 +114,13 @@
- (void)searchableIndexDidThrottle:(CSSearchableIndex *)searchableIndex;
- (void)searchableIndexDidFinishThrottle:(CSSearchableIndex *)searchableIndex;
+
+// The developer may provided a NSData representation if type was specified in providerDataTypeIdentifiers property.
+- (nullable NSData *)dataForSearchableIndex:(CSSearchableIndex *)searchableIndex itemIdentifier:(NSString *)itemIdentifier typeIdentifier:(NSString *)typeIdentifier error:(out NSError ** __nullable)outError CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+// The developer may provided a NSURL to file representation representation if type was specified from providerDataTypeIdentifiers or providerInPlaceFileTypeIdentifiers property.
+- (nullable NSURL *)fileURLForSearchableIndex:(CSSearchableIndex *)searchableIndex itemIdentifier:(NSString *)itemIdentifier typeIdentifier:(NSString *)typeIdentifier inPlace:(BOOL)inPlace error:(out NSError ** __nullable)outError CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h 2017-05-19 01:42:49.000000000 -0400
@@ -14,8 +14,8 @@
// method will get called with CSSearchableItemActionType, followed by application:continueUserActivity:restorationHandler:
// with an NSUserActivity where the userInfo dictionary has a key value pair where CSSearchableItemActivityIdentifier is the key
// and the value is the uniqueIdentifier used when creating the item.
-CORESPOTLIGHT_EXPORT NSString * const CSSearchableItemActionType CS_AVAILABLE(NA, 9_0) CS_TVOS_UNAVAILABLE;
-CORESPOTLIGHT_EXPORT NSString * const CSSearchableItemActivityIdentifier CS_AVAILABLE(NA, 9_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSSearchableItemActionType CS_AVAILABLE(10_13, 9_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSSearchableItemActivityIdentifier CS_AVAILABLE(10_13, 9_0) CS_TVOS_UNAVAILABLE;
// When continuing a query from Spotlight, the application's -application:willContinueUserActivityWithType:
// method will get called with CSQueryContinuationActionType, followed by -application:continueUserActivity:restorationHandler:
@@ -26,11 +26,11 @@
// <key>CoreSpotlightContinuation</key>
// <true/>
//
-CORESPOTLIGHT_EXPORT NSString * const CSQueryContinuationActionType CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
-CORESPOTLIGHT_EXPORT NSString * const CSSearchQueryString CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSQueryContinuationActionType CS_AVAILABLE(10_13, 10_0) CS_TVOS_UNAVAILABLE;
+CORESPOTLIGHT_EXPORT NSString * const CSSearchQueryString CS_AVAILABLE(10_13, 10_0) CS_TVOS_UNAVAILABLE;
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@interface CSSearchableItem : NSObject <NSSecureCoding, NSCopying>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h 2017-05-19 01:42:49.000000000 -0400
@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
// CSSearchableItemAttribute encapsulates a set of properties of an CSSearchableItem.
// CSSearchableItemAttribute set should only be mutated from one thread at a time. Concurrent access to properties has undefined behavior.
@@ -35,7 +35,7 @@
@end
//CSCustomAttributeKey allows you to specify a custom attribute as well as various other properties of that attribute.
-CS_CLASS_AVAILABLE(NA, 9_0)
+CS_CLASS_AVAILABLE(10_13, 9_0)
CS_TVOS_UNAVAILABLE
@interface CSCustomAttributeKey : NSObject <NSCopying,NSSecureCoding>
@@ -81,7 +81,7 @@
//Attributes to be indexed for a given NSUserActivity
@interface NSUserActivity (CSSearchableItemAttributeSet)
-@property (nullable, copy) CSSearchableItemAttributeSet *contentAttributeSet CS_AVAILABLE(NA, 9_0) CS_TVOS_UNAVAILABLE;
+@property (nullable, copy) CSSearchableItemAttributeSet *contentAttributeSet CS_AVAILABLE(10_13, 9_0) CS_TVOS_UNAVAILABLE;
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h 2016-07-28 17:12:44.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h 2017-05-18 22:27:16.000000000 -0400
@@ -34,7 +34,7 @@
@property(nullable, copy) NSString *relatedUniqueIdentifier;
//For activities, this is the unique identifier for an item this activity is related to. Unlike relatedUniqueIdentifier, this attribute does not link the life time of the items.
-@property(nullable, copy) NSString *weakRelatedUniqueIdentifier CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
+@property(nullable, copy) NSString *weakRelatedUniqueIdentifier CS_AVAILABLE(10_13, 10_0) CS_TVOS_UNAVAILABLE;
//This is the date that the last metadata attribute was changed.
@@ -56,10 +56,31 @@
//A version specifier for this item.
@property(nullable, copy) NSString *version;
+//This property is used to indicate if the indexed item was created by the user
+//It is used to distinguish pushed app content from content that required explicit user interaction
+//Example content that may set this field: user created notes, documents
+@property(nullable, strong, getter=isUserCreated) NSNumber *userCreated CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+//This property is used to indicate if the indexed item has been purchased or otherwise acquired by the user
+//Example content are songs bought by a user and made searchable
+@property(nullable, strong, getter=isUserOwned) NSNumber *userOwned CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+//This property is used to indicate if the indexed item was selected by the user
+//It is used to distinguish pushed app content from content that a user has chosen to add to a collection
+//Example content that may set this field: downloaded media content, bookmarked websites/news articles
+@property(nullable, strong, getter=isUserCurated) NSNumber *userCurated CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+//This property allows content donors to provide a ranking signal to each indexed item
+//It will inform the ranker, allowing it to distinguish more easily between otherwise similar items
+//This is query-independent and should be used to indicate the relative importance of an item w.r.t. all other items for the same application
+//Expected value ∈ [0-100]; preferably integral values
+//Monotonically increasing with larger values being considered better results
+@property(nullable, strong) NSNumber *rankingHint CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
// This property has the same semantics as -[CSSearchableItem domainIdentifier].
// It can be set on the contentAttributeSet property of a NSUserActivity instance and then used to delete the user activity
// by calling [[CSSearchableIndex defaultSearchableIndex] deleteSearchableItemsWithDomainIdentifiers:].
-@property(nullable, copy) NSString *domainIdentifier CS_AVAILABLE(NA, 10_0) CS_TVOS_UNAVAILABLE;
+@property(nullable, copy) NSString *domainIdentifier CS_AVAILABLE(10_13, 10_0) CS_TVOS_UNAVAILABLE;
@end
@@ -78,4 +99,17 @@
@property(nullable, strong) NSNumber *containerOrder;
@end
+@interface CSSearchableItemAttributeSet (CSItemProvider)
+// The string value of type identifer can only be used by one providerTypeIdentifier array.
+
+// An array of types identifiers that owner can provided a NSData representation.
+@property(nullable, copy) NSArray<NSString *> *providerDataTypeIdentifiers CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+// An array of types identifiers that owner can provided a NSURL to file representation.
+@property(nullable, copy) NSArray<NSString *> *providerFileTypeIdentifiers CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+// An array of types identifiers that owner can provided a NSURL to inplace file representation.
+@property(nullable, copy) NSArray<NSString *> *providerInPlaceFileTypeIdentifiers CS_AVAILABLE(10_13, 11_0) CS_TVOS_UNAVAILABLE;
+
+@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes 2017-05-19 01:42:49.000000000 -0400
@@ -0,0 +1,26 @@
+---
+Name: CoreSpotlight
+Tags:
+- Name: CSIndexErrorCode
+ NSErrorDomain: CSIndexErrorDomain
+- Name: CSSearchQueryErrorCode
+ NSErrorDomain: CSSearchQueryErrorDomain
+
+SwiftVersions:
+- Version: 3
+ Classes:
+ - Name: CSSearchableIndex
+ Methods:
+ - Selector: 'initWithName:protectionClass:'
+ MethodKind: Instance
+ ResultType: 'CSSearchableIndex * _Nonnull'
+ Parameters:
+ - Position: 0
+ Type: 'NSString * _Nonnull'
+ - Position: 1
+ Type: 'NSString * _Nullable'
+ - Name: CSSearchQuery
+ Properties:
+ - Name: protectionClasses
+ PropertyKind: Instance
+ Type: 'NSArray<NSString*> * _Nonnull'