corespotlight

package
v0.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package corespotlight provides Go bindings for the CoreSpotlight framework.

Add search capabilities to your app, and index your content so people can find it from Spotlight and Safari.

Help people access activities and items within your app by adding details about those items to a Core Spotlight index. The framework provides APIs to add your content to an index, and search for items in that index. You decide what content makes sense to index, but typically you index anything that someone might look for in your app. For example, you might index photos, contacts, the items someone purchased, or data they see in your interface. You can then use Core Spotlight to search for your indexed content and display those results in your app.

Essentials

Searchable items

  • CSSearchableItem: The details of your app-specific content that someone might search for on their devices.
  • CSSearchableItemAttributeSet: The detailed metadata for a searchable item.
  • CSCustomAttributeKey: A key associated with a custom attribute for a searchable item.
  • CSLocalizedString: An object that displays localized text in search results related to your app.
  • CSPerson: An object that represents a person in the context of search results.

Indexes

Spotlight app extensions

Queries

Errors

Version

Variables

Key Types

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// CSIndexErrorDomain is the error domain for the index.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSIndexErrorDomain
	CSIndexErrorDomain string
	// CSMailboxArchive is an archive mailbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxArchive
	CSMailboxArchive string
	// CSMailboxDrafts is a drafts mailbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxDrafts
	CSMailboxDrafts string
	// CSMailboxInbox is an inbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxInbox
	CSMailboxInbox string
	// CSMailboxJunk is a junk mailbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxJunk
	CSMailboxJunk string
	// CSMailboxSent is a sent mailbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxSent
	CSMailboxSent string
	// CSMailboxTrash is a trash mailbox.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSMailboxTrash
	CSMailboxTrash string
	// CSQueryContinuationActionType is indicates that the activity type to continue is a search or query.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSQueryContinuationActionType
	CSQueryContinuationActionType string
	// CSSearchQueryString is provides the key for the current query in the info dictionary of the user activity object.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryString
	CSSearchQueryString string
	// CSSearchableItemActionType is indicates that the activity type to continue is related to a searchable item.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemActionType
	CSSearchableItemActionType string
	// CSSearchableItemActivityIdentifier is the key you use to access a searchable item in a user activity object.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemActivityIdentifier
	CSSearchableItemActivityIdentifier string
)
View Source
var (
	// CSSearchQueryErrorDomain is the error domain for search queries.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryErrorDomain
	CSSearchQueryErrorDomain foundation.NSErrorDomain
)
View Source
var (
	// CoreSpotlightVersionNumber is the project version number for Core Spotlight.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CoreSpotlightVersionNumber
	CoreSpotlightVersionNumber float64
)
View Source
var (
	// CoreSpotlightVersionString is the project version string for Core Spotlight.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CoreSpotlightVersionString
	CoreSpotlightVersionString uint8
)

Functions

func NewCSSearchableItemArrayBlock

func NewCSSearchableItemArrayBlock(handler CSSearchableItemArrayHandler) (objc.ID, func())

NewCSSearchableItemArrayBlock wraps a Go CSSearchableItemArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewCSSuggestionArrayBlock

func NewCSSuggestionArrayBlock(handler CSSuggestionArrayHandler) (objc.ID, func())

NewCSSuggestionArrayBlock wraps a Go CSSuggestionArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewDataErrorBlock

func NewDataErrorBlock(handler DataErrorHandler) (objc.ID, func())

NewDataErrorBlock wraps a Go DataErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

Types

type CSCustomAttributeKey

type CSCustomAttributeKey struct {
	objectivec.Object
}

A key associated with a custom attribute for a searchable item.

Overview

The CSCustomAttributeKey class defines a key that you can associate with a custom attribute for a searchable item. Item attributes provide metadata about the item that can be indexed and displayed to users in search results.

Although the Core Spotlight framework provides several predefined attributes, such as title and description, you can create a CSCustomAttributeKey object to specify a custom attribute that makes sense in your domain.

Creating a custom attribute

Getting the attribute details

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey

func CSCustomAttributeKeyFromID

func CSCustomAttributeKeyFromID(id objc.ID) CSCustomAttributeKey

CSCustomAttributeKeyFromID constructs a CSCustomAttributeKey from an objc.ID.

A key associated with a custom attribute for a searchable item.

func NewCSCustomAttributeKey

func NewCSCustomAttributeKey() CSCustomAttributeKey

NewCSCustomAttributeKey creates a new CSCustomAttributeKey instance.

func NewCSCustomAttributeKeyWithKeyName

func NewCSCustomAttributeKeyWithKeyName(keyName string) CSCustomAttributeKey

Returns a new custom attribute key with the specified name.

keyName: The name of the custom attribute for use as a key in a CSSearchableItemAttributeSet. The key name must be a string that contains only ASCII characters and no punctuation other than the underscore (that is “_”). The prefix `kMD` is reserved.

Return Value

A new custom attribute key.

Discussion

To create custom attribute key names, use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form `com_mycompany_myapp_mykeyname` works well.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/init(keyName:)

func NewCSCustomAttributeKeyWithKeyNameSearchableSearchableByDefaultUniqueMultiValued

func NewCSCustomAttributeKeyWithKeyNameSearchableSearchableByDefaultUniqueMultiValued(keyName string, searchable bool, searchableByDefault bool, unique bool, multiValued bool) CSCustomAttributeKey

Returns a new custom attribute key with the specified name and properties.

keyName: The name of the custom attribute for use as a key in a CSSearchableItemAttributeSet. The key name must be a string that contains only ASCII characters and no punctuation other than the underscore (that is, “_”). The prefix `kMD` is reserved.

searchable: A Boolean value that indicates if the attribute can be specified as a search term.

searchableByDefault: A Boolean value that indicates if the attribute should be searchable by default.

unique: A Boolean value that indicates if duplicate values should be treated as the same value to save storage space.

multiValued: A Boolean value that indicates if the attribute is likely to have multiple values, such as arrays, associated with it.

Return Value

A new custom attribute key with the specified name and properties.

Discussion

To create custom attribute key names, it’s recommended that you use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form `com_mycompany_myapp_mykeyname` works well.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/init(keyName:searchable:searchableByDefault:unique:multiValued:)

func (CSCustomAttributeKey) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CSCustomAttributeKey) EncodeWithCoder

func (c CSCustomAttributeKey) EncodeWithCoder(coder foundation.INSCoder)

func (CSCustomAttributeKey) Init

Init initializes the instance.

func (CSCustomAttributeKey) InitWithKeyName

func (c CSCustomAttributeKey) InitWithKeyName(keyName string) CSCustomAttributeKey

Returns a new custom attribute key with the specified name.

keyName: The name of the custom attribute for use as a key in a CSSearchableItemAttributeSet. The key name must be a string that contains only ASCII characters and no punctuation other than the underscore (that is “_”). The prefix `kMD` is reserved.

Return Value

A new custom attribute key.

Discussion

To create custom attribute key names, use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form `com_mycompany_myapp_mykeyname` works well.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/init(keyName:)

func (CSCustomAttributeKey) InitWithKeyNameSearchableSearchableByDefaultUniqueMultiValued

func (c CSCustomAttributeKey) InitWithKeyNameSearchableSearchableByDefaultUniqueMultiValued(keyName string, searchable bool, searchableByDefault bool, unique bool, multiValued bool) CSCustomAttributeKey

Returns a new custom attribute key with the specified name and properties.

keyName: The name of the custom attribute for use as a key in a CSSearchableItemAttributeSet. The key name must be a string that contains only ASCII characters and no punctuation other than the underscore (that is, “_”). The prefix `kMD` is reserved.

searchable: A Boolean value that indicates if the attribute can be specified as a search term.

searchableByDefault: A Boolean value that indicates if the attribute should be searchable by default.

unique: A Boolean value that indicates if duplicate values should be treated as the same value to save storage space.

multiValued: A Boolean value that indicates if the attribute is likely to have multiple values, such as arrays, associated with it.

Return Value

A new custom attribute key with the specified name and properties.

Discussion

To create custom attribute key names, it’s recommended that you use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form `com_mycompany_myapp_mykeyname` works well.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/init(keyName:searchable:searchableByDefault:unique:multiValued:)

func (CSCustomAttributeKey) IsMultiValued

func (c CSCustomAttributeKey) IsMultiValued() bool

A Boolean value that indicates if the custom attribute is likely to have multiple values, such as arrays, associated with it.

Discussion

The default value of this property is `false`.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/isMultiValued

func (CSCustomAttributeKey) IsSearchable

func (c CSCustomAttributeKey) IsSearchable() bool

A Boolean value that indicates if the custom attribute can be specified as a search term.

Discussion

The default value of this property is `true`.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/isSearchable

func (CSCustomAttributeKey) IsSearchableByDefault

func (c CSCustomAttributeKey) IsSearchableByDefault() bool

A Boolean value that indicates if the custom attribute should be searchable by default.

Discussion

The default value of this property is `false`.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/isSearchableByDefault

func (CSCustomAttributeKey) IsUnique

func (c CSCustomAttributeKey) IsUnique() bool

A Boolean value that indicates if duplicate custom attribute values should be treated as the same value to save storage space.

Discussion

The default value of this property is `false`.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/isUnique

func (CSCustomAttributeKey) KeyName

func (c CSCustomAttributeKey) KeyName() string

The name of the custom attribute key.

Discussion

The key name is a string that contains only ASCII characters and no punctuation other than the underscore (that is “_”). The prefix `kMD` is reserved. To create a custom attribute key name, it’s recommended that you use a reverse DNS format that includes your company name and does not include the period character (”.”). For example, a key name of the form `com_mycompany_myapp_mykeyname` works well.

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey/keyName

type CSCustomAttributeKeyClass

type CSCustomAttributeKeyClass struct {
	// contains filtered or unexported fields
}

func GetCSCustomAttributeKeyClass

func GetCSCustomAttributeKeyClass() CSCustomAttributeKeyClass

GetCSCustomAttributeKeyClass returns the class object for CSCustomAttributeKey.

func (CSCustomAttributeKeyClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSCustomAttributeKeyClass) Class

Class returns the underlying Objective-C class pointer.

type CSImportExtension

type CSImportExtension struct {
	objectivec.Object
}

An object that provides searchable attributes for file types that the app supports.

Overview

To create a Spotlight File Import extension, add a target to your app using the Spotlight File Import extension template in Xcode. The template project contains a subclass of CSImportExtension. To index content on a user’s device, Core Spotlight loads your extension and invokes the CSImportExtension.UpdateAttributesForFileAtURLError method. Core Spotlight passes a CSSearchableItemAttributeSet and URL of a file to the extension, and you set properties that are relevant for the file.

Typically, your extension loads details about the file and uses that information to set properties of the attribute set. For example, if your app contains files that are notes the user creates, it does the following:

To specify the file types your app supports, set the value of CSSupportedContentTypes in your extension’s `Info.Plist()` file to an array of file type identifiers. For more information about file type identifiers, see Uniform Type Identifiers. The app in the previous example configures the extension’s `Info.Plist()` as follows:

Providing searchable attributes

See: https://developer.apple.com/documentation/CoreSpotlight/CSImportExtension

func CSImportExtensionFromID

func CSImportExtensionFromID(id objc.ID) CSImportExtension

CSImportExtensionFromID constructs a CSImportExtension from an objc.ID.

An object that provides searchable attributes for file types that the app supports.

func NewCSImportExtension

func NewCSImportExtension() CSImportExtension

NewCSImportExtension creates a new CSImportExtension instance.

func (CSImportExtension) Autorelease

func (c CSImportExtension) Autorelease() CSImportExtension

Autorelease adds the receiver to the current autorelease pool.

func (CSImportExtension) Init

Init initializes the instance.

func (CSImportExtension) UpdateAttributesForFileAtURLError

func (c CSImportExtension) UpdateAttributesForFileAtURLError(attributes ICSSearchableItemAttributeSet, contentURL foundation.NSURL) (bool, error)

Provides searchable attributes for a file at the specified URL.

attributes: The attribute set for the file at `contentURL`.

contentURL: The URL of the file to provide attributes for.

Discussion

When Core Spotlight invokes this method, update the properties of the attribute set according to the content in the specified file. For a complete list of properties available, see CSSearchableItemAttributeSet.

See: https://developer.apple.com/documentation/CoreSpotlight/CSImportExtension/update(_:forFileAt:)

type CSImportExtensionClass

type CSImportExtensionClass struct {
	// contains filtered or unexported fields
}

func GetCSImportExtensionClass

func GetCSImportExtensionClass() CSImportExtensionClass

GetCSImportExtensionClass returns the class object for CSImportExtension.

func (CSImportExtensionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSImportExtensionClass) Class

func (cc CSImportExtensionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSIndexErrorCode

type CSIndexErrorCode int

See: https://developer.apple.com/documentation/CoreSpotlight/CSIndexError/Code

const (
	// CSIndexErrorCodeIndexUnavailableError: The indexer is unavailable.
	CSIndexErrorCodeIndexUnavailableError CSIndexErrorCode = -1000
	// CSIndexErrorCodeIndexingUnsupported: Indexing isn’t supported on the device.
	CSIndexErrorCodeIndexingUnsupported CSIndexErrorCode = -1005
	// CSIndexErrorCodeInvalidClientStateError: The provided client state data is invalid.
	CSIndexErrorCodeInvalidClientStateError CSIndexErrorCode = -1002
	// CSIndexErrorCodeInvalidItemError: The searchable item object is invalid.
	CSIndexErrorCodeInvalidItemError CSIndexErrorCode = -1001
	// CSIndexErrorCodeMismatchedClientState: The provided client state did not match the information in the index.
	CSIndexErrorCodeMismatchedClientState CSIndexErrorCode = -1006
	// CSIndexErrorCodeQuotaExceeded: The quota for the bundle has been exceeded.
	CSIndexErrorCodeQuotaExceeded CSIndexErrorCode = -1004
	// CSIndexErrorCodeRemoteConnectionError: An error occurred while communicating with the remote process.
	CSIndexErrorCodeRemoteConnectionError CSIndexErrorCode = -1003
	// CSIndexErrorCodeUnknownError: An unknown error occurred.
	CSIndexErrorCodeUnknownError CSIndexErrorCode = -1
)

func (CSIndexErrorCode) String

func (e CSIndexErrorCode) String() string

type CSIndexExtensionRequestHandler

type CSIndexExtensionRequestHandler struct {
	objectivec.Object
}

An interface that implements an index-maintenance app extension.

Overview

The CSIndexExtensionRequestHandler class provides the main entry point for an index-maintenance app extension. If any issues arise with your app’s indexes and your app isn’t running, the system loads your app extension and looks for an implementation of this class. It instantiates the class it finds and uses it to perform any index-related maintenance.

Define a custom subclass of CSIndexExtensionRequestHandler in your app extension and implement methods of the CSSearchableIndexDelegate protocol in it. Use those methods to perform any required updates to your app’s index files. For example, use the CSIndexExtensionRequestHandler.SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler method to reindex all items in your app.

See: https://developer.apple.com/documentation/CoreSpotlight/CSIndexExtensionRequestHandler

func CSIndexExtensionRequestHandlerFromID

func CSIndexExtensionRequestHandlerFromID(id objc.ID) CSIndexExtensionRequestHandler

CSIndexExtensionRequestHandlerFromID constructs a CSIndexExtensionRequestHandler from an objc.ID.

An interface that implements an index-maintenance app extension.

func NewCSIndexExtensionRequestHandler

func NewCSIndexExtensionRequestHandler() CSIndexExtensionRequestHandler

NewCSIndexExtensionRequestHandler creates a new CSIndexExtensionRequestHandler instance.

func (CSIndexExtensionRequestHandler) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CSIndexExtensionRequestHandler) FileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError

func (c CSIndexExtensionRequestHandler) FileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(searchableIndex ICSSearchableIndex, itemIdentifier string, typeIdentifier string, inPlace bool) (foundation.NSURL, error)

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/fileURL(for:itemIdentifier:typeIdentifier:inPlace:)

func (CSIndexExtensionRequestHandler) Init

Init initializes the instance.

func (CSIndexExtensionRequestHandler) SearchableIndexDidFinishThrottle

func (c CSIndexExtensionRequestHandler) SearchableIndexDidFinishThrottle(searchableIndex ICSSearchableIndex)

Tells the delegate that the index throttling has finished.

searchableIndex: The index that was throttled.

Discussion

In some situations, such as when the device is using battery only, the system may throttle indexing to save power. You can implement this method to be notified when throttling is finished so that your app can resume its standard indexing behavior.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndexDidFinishThrottle(_:)

func (CSIndexExtensionRequestHandler) SearchableIndexDidThrottle

func (c CSIndexExtensionRequestHandler) SearchableIndexDidThrottle(searchableIndex ICSSearchableIndex)

Tells the delegate that indexing is being throttled.

searchableIndex: The indexing that’s being throttled.

Discussion

In some situations, such as when the device is using battery only, the system may throttle indexing to save power. You can implement this method to be notified of this situation so that you can respond by, for example, prioritizing the items to index.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndexDidThrottle(_:)

func (CSIndexExtensionRequestHandler) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler

func (c CSIndexExtensionRequestHandler) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(searchableIndex ICSSearchableIndex, acknowledgementHandler VoidHandler)

Tells the delegate to reindex all searchable data and clear all local state information.

searchableIndex: The index in which to reindex the searchable data. The delegate or app extension should pass `searchableIndex` to CSSearchableIndex.IndexSearchableItemsCompletionHandler.

acknowledgementHandler: The handler to call after all client state has been saved. Note that if the app passes client state information in a batch (for example, by calling CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler), the acknowledgement handler can be called immediately.

The delegate or app extension must call the acknowledgement handler after all client state information has been saved, so that the indexer can call this method again in case of a crash.

Discussion

Typically, the index tells the delegate to reindex its searchable data and clear local state when the index has been lost. An app extension should not use the index passed in `searchableIndex` when a custom data protection class is needed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexAllSearchableItemsWithAcknowledgementHandler:)

func (CSIndexExtensionRequestHandler) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandlerSync

func (c CSIndexExtensionRequestHandler) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandlerSync(ctx context.Context, searchableIndex ICSSearchableIndex) error

SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandlerSync is a synchronous wrapper around CSIndexExtensionRequestHandler.SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSIndexExtensionRequestHandler) SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler

func (c CSIndexExtensionRequestHandler) SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(searchableIndex ICSSearchableIndex, identifiers []string, acknowledgementHandler VoidHandler)

Tells the delegate to reindex the searchable items associated with the specified identifiers.

searchableIndex: The index in which to reindex the specified searchable data. To update the state of the items, the delegate or app extension should call CSSearchableIndex.IndexSearchableItemsCompletionHandler passing in `searchableIndex`.

identifiers: An array of identifiers that specify searchable items.

acknowledgementHandler: The handler to call after all client state has been saved. Note that if the app passes client state information in a batch (for example, by calling CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler), the acknowledgement handler can be called immediately.

The delegate or app extension must call the acknowledgement handler after all client state information has been saved, so that the indexer can call this method again in case of a crash.

Discussion

An app extension should not use the index passed in `searchableIndex` when a custom data protection class is needed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)

func (CSIndexExtensionRequestHandler) SearchableItemsDidUpdate

func (c CSIndexExtensionRequestHandler) SearchableItemsDidUpdate(items []CSSearchableItem)

Tells the delegate that the framework updated the list of searchable items.

items: The items the framework updated.

Discussion

The framework calls this method when it updates an item with specific attributes; see CSSearchableItem.UpdateListenerOptions for Apple Intelligence attributes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableItemsDidUpdate(_:)

func (CSIndexExtensionRequestHandler) SearchableItemsForIdentifiersSearchableItemsHandler

func (c CSIndexExtensionRequestHandler) SearchableItemsForIdentifiersSearchableItemsHandler(identifiers []string, searchableItemsHandler CSSearchableItemArrayHandler)

Requests that the delegate provide searchable items for the provided identifiers.

identifiers: An array of strings that represent the identifiers.

searchableItemsHandler: A method the framework calls that provides an array of CSSearchableItem objects.

Discussion

Use this method to provide the framework with a list of identifiers to search for.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableItems(forIdentifiers:searchableItemsHandler:)

type CSIndexExtensionRequestHandlerClass

type CSIndexExtensionRequestHandlerClass struct {
	// contains filtered or unexported fields
}

func GetCSIndexExtensionRequestHandlerClass

func GetCSIndexExtensionRequestHandlerClass() CSIndexExtensionRequestHandlerClass

GetCSIndexExtensionRequestHandlerClass returns the class object for CSIndexExtensionRequestHandler.

func (CSIndexExtensionRequestHandlerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSIndexExtensionRequestHandlerClass) Class

Class returns the underlying Objective-C class pointer.

type CSLocalizedString

type CSLocalizedString struct {
	foundation.NSString
}

An object that displays localized text in search results related to your app.

Overview

The CSLocalizedString class helps you localize text in searchable items. You can use a CSLocalizedString object in place of an NSString object to display localized text in search results related to your app.

For example, you might use the following code to define a CSLocalizedString object for a searchable item you want to identify as “Song” in English:

Specifying localized strings

Getting a localized string

See: https://developer.apple.com/documentation/CoreSpotlight/CSLocalizedString

func CSLocalizedStringFromID

func CSLocalizedStringFromID(id objc.ID) CSLocalizedString

CSLocalizedStringFromID constructs a CSLocalizedString from an objc.ID.

An object that displays localized text in search results related to your app.

func NewCSLocalizedString

func NewCSLocalizedString() CSLocalizedString

NewCSLocalizedString creates a new CSLocalizedString instance.

func NewCSLocalizedStringWithLocalizedStrings

func NewCSLocalizedStringWithLocalizedStrings(localizedStrings foundation.INSDictionary) CSLocalizedString

Initializes a CSLocalizedString object with the specified dictionary of localized strings.

localizedStrings: A dictionary in which each key-value pair consists of a language designator and a localized string. For example, you might pass in a dictionary like `@{@"en":@"Email Message"}`.

Return Value

An object that contains the localized versions for a specific string.

See: https://developer.apple.com/documentation/CoreSpotlight/CSLocalizedString/init(localizedStrings:)

func (CSLocalizedString) Autorelease

func (c CSLocalizedString) Autorelease() CSLocalizedString

Autorelease adds the receiver to the current autorelease pool.

func (CSLocalizedString) Init

Init initializes the instance.

func (CSLocalizedString) InitWithLocalizedStrings

func (c CSLocalizedString) InitWithLocalizedStrings(localizedStrings foundation.INSDictionary) CSLocalizedString

Initializes a CSLocalizedString object with the specified dictionary of localized strings.

localizedStrings: A dictionary in which each key-value pair consists of a language designator and a localized string. For example, you might pass in a dictionary like `@{@"en":@"Email Message"}`.

Return Value

An object that contains the localized versions for a specific string.

See: https://developer.apple.com/documentation/CoreSpotlight/CSLocalizedString/init(localizedStrings:)

func (CSLocalizedString) LocalizedString

func (c CSLocalizedString) LocalizedString() string

Returns the localized string for the current language.

Return Value

The localized string for the current language.

See: https://developer.apple.com/documentation/CoreSpotlight/CSLocalizedString/localizedString()

type CSLocalizedStringClass

type CSLocalizedStringClass struct {
	// contains filtered or unexported fields
}

func GetCSLocalizedStringClass

func GetCSLocalizedStringClass() CSLocalizedStringClass

GetCSLocalizedStringClass returns the class object for CSLocalizedString.

func (CSLocalizedStringClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSLocalizedStringClass) Class

func (cc CSLocalizedStringClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSPerson

type CSPerson struct {
	objectivec.Object
}

An object that represents a person in the context of search results.

Overview

A CSPerson object represents a person in the context of search results. You can create a CSPerson object when you have a display name and a contact handle of some kind, such as an email address or phone number.

If you create a CSPerson object to represent a specific contact, you can use the value of the contact’s identifier property for the person object’s CSPerson.ContactIdentifier property. Using the same value lets you avoid using names or phone numbers to look up the contact that’s associated with a person.

Initializing a person object

Accessing person properties

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson

func CSPersonFromID

func CSPersonFromID(id objc.ID) CSPerson

CSPersonFromID constructs a CSPerson from an objc.ID.

An object that represents a person in the context of search results.

func NewCSPerson

func NewCSPerson() CSPerson

NewCSPerson creates a new CSPerson instance.

func NewCSPersonWithDisplayNameHandlesHandleIdentifier

func NewCSPersonWithDisplayNameHandlesHandleIdentifier(displayName string, handles []string, handleIdentifier string) CSPerson

Returns a new CSPerson object initialized with the specified display name and contact attributes.

displayName: The name of the person in a user-displayable string.

handles: An array of contact handles, such as phone number or email address.

handleIdentifier: A property key that specifies a handle type, such as CNContactEmailAddressesKey.

Return Value

An initialized person object that represents a user’s contact.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/init(displayName:handles:handleIdentifier:)

func (CSPerson) Autorelease

func (c CSPerson) Autorelease() CSPerson

Autorelease adds the receiver to the current autorelease pool.

func (CSPerson) ContactIdentifier

func (c CSPerson) ContactIdentifier() string

The identifier for the contact associated with the person.

Discussion

When you use the contact’s identifier value for the optional CSPerson.ContactIdentifier property, it enables a direct way to look up the associated contact.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/contactIdentifier

func (CSPerson) DisplayName

func (c CSPerson) DisplayName() string

A display name for the person.

Discussion

Use this optional property to provide a name for the person object that can be displayed to users.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/displayName

func (CSPerson) EncodeWithCoder

func (c CSPerson) EncodeWithCoder(coder foundation.INSCoder)

func (CSPerson) HandleIdentifier

func (c CSPerson) HandleIdentifier() string

A key that identifies the type of contact property represented by the person object’s handle.

Discussion

The value of this property is a CNContact property key, such as CNContactPhoneNumbersKey or CNContactEmailAddressesKey.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/handleIdentifier

func (CSPerson) Handles

func (c CSPerson) Handles() []string

An array of contact handles related to the person.

Discussion

Contact handles can include phone numbers, email addresses, and URLs. For additional contact handles, see Metadata Keys in CNContact.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/handles

func (CSPerson) Init

func (c CSPerson) Init() CSPerson

Init initializes the instance.

func (CSPerson) InitWithDisplayNameHandlesHandleIdentifier

func (c CSPerson) InitWithDisplayNameHandlesHandleIdentifier(displayName string, handles []string, handleIdentifier string) CSPerson

Returns a new CSPerson object initialized with the specified display name and contact attributes.

displayName: The name of the person in a user-displayable string.

handles: An array of contact handles, such as phone number or email address.

handleIdentifier: A property key that specifies a handle type, such as CNContactEmailAddressesKey.

Return Value

An initialized person object that represents a user’s contact.

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson/init(displayName:handles:handleIdentifier:)

func (CSPerson) SetContactIdentifier

func (c CSPerson) SetContactIdentifier(value string)

type CSPersonClass

type CSPersonClass struct {
	// contains filtered or unexported fields
}

func GetCSPersonClass

func GetCSPersonClass() CSPersonClass

GetCSPersonClass returns the class object for CSPerson.

func (CSPersonClass) Alloc

func (cc CSPersonClass) Alloc() CSPerson

Alloc allocates memory for a new instance of the class.

func (CSPersonClass) Class

func (cc CSPersonClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSSearchQuery

type CSSearchQuery struct {
	objectivec.Object
}

A type you use to programmatically search the indexed app content.

Overview

Use a CSSearchQuery object to search your app’s indexed content using a formatted search string. To perform a search, build a predicate string to specify the indexed attributes you want to search and the value you want them to match. After you start the query, you receive batches of results in the handlers you provide.

Each CSSearchQuery object you create performs a single search operation and delivers the results back to your code. Build each predicate with an attribute name, one or more values, and either a comparison operator or the [InRange] operator. Your predicate string takes one of the following forms:

- `attributeName operator value[modifiers]` - `InRange(attributeName, minValue, maxValue)`

Queries search all of your app’s indexes by default. If your app encrypts some of its indexed data, you can limit your search to one or more of the encrypted indexes by updating the query’s CSSearchQuery.ProtectionClasses property. The query must have access to the protected index to search it.

For more information about how to construct predicate strings for your query, see Searching for information in your app.

Creating a query object

Specifying the indexes to search

Executing the query automatically

Executing the query with handler blocks

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery

func CSSearchQueryFromID

func CSSearchQueryFromID(id objc.ID) CSSearchQuery

CSSearchQueryFromID constructs a CSSearchQuery from an objc.ID.

A type you use to programmatically search the indexed app content.

func NewCSSearchQuery

func NewCSSearchQuery() CSSearchQuery

NewCSSearchQuery creates a new CSSearchQuery instance.

func NewCSSearchQueryWithQueryStringQueryContext

func NewCSSearchQueryWithQueryStringQueryContext(queryString string, queryContext ICSSearchQueryContext) CSSearchQuery

Initializes and returns a query object with the specified query string and query context.

Return Value

An initialized query object.

Discussion

- queryString: A formatted string that defines the matching criteria to apply to indexed items. To learn how to construct a query string, see Create a query string for your search. - This parameter must not be `nil`. - - queryContext: A CSSearchQueryContext object that focuses the query results.

Discussion

After you create and initialize a query object, and call CSSearchQuery.Start to begin the query, you can’t update or reuse the query object for a new query.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/init(queryString:queryContext:)

func (CSSearchQuery) Autorelease

func (c CSSearchQuery) Autorelease() CSSearchQuery

Autorelease adds the receiver to the current autorelease pool.

func (CSSearchQuery) Cancel

func (c CSSearchQuery) Cancel()

Cancels the current query operation.

Discussion

Cancel a query operation when you no longer need the results. You can use this method to cancel a query you started, by using either the CSSearchQuery.Start method or by accessing the CSSearchQuery.Results property. After you cancel a query operation, you can’t restart it. To perform a new query, create a new query object. For example, you might cancel one query and start a new one when the text in your app’s search control changes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/cancel()

func (CSSearchQuery) CompletionHandler

func (c CSSearchQuery) CompletionHandler() ErrorHandler

The block to execute when the query finishes delivering all results.

Discussion

Specify a value for this property only if you start your query with the CSSearchQuery.Start method. When the query finishes, the query object executes the provided closure once to let you know the search is complete. Use your handler to perform any related cleanup. The block you assign to this property returns no parameters and takes the following parameter:

error: An error object with details about a problem that occurred, or `nil` if the query completed successfully.

If you start the query by accessing the CSSearchQuery.Results property of CSSearchQuery or the CSUserQuery.Responses property of CSUserQuery, the query object doesn’t execute the block in this property.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/completionHandler

func (CSSearchQuery) FoundItemCount

func (c CSSearchQuery) FoundItemCount() uint

The number of matching items found for the given query string.

Discussion

As Spotlight finds matches to the query string, it updates the value of this property and delivers the new results to the handler in the CSSearchQuery.FoundItemsHandler property. This value reflects the total number of matching items, including the number of items the query delivered to your handler block previously.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/foundItemCount

func (CSSearchQuery) FoundItemsHandler

func (c CSSearchQuery) FoundItemsHandler() CSSearchableItemArrayHandler

The block to execute when the query delivers a new batch of matching items.

Discussion

Assign a block to this property that has no return value and takes the following parameter:

items: An array of items that match the specified query.

Specify a value for this property only if you start your query with the CSSearchQuery.Start method. While the query runs, the query object executes the provided closure one or more times to deliver suggested search results for the current search term. Use your handler to retrieve the those results and display them. The query object stops delivering matching items when it reaches the maximum number found in the CSUserQueryContext.MaxResultCount property of the query configuration parameters.

Each time the query object calls your handler, it delivers only the new items that it found since the last time it called your handler. However, the query object updates the value of the CSSearchQuery.FoundItemCount property with the total number of items before it calls your handler.

If you start the query by accessing the CSSearchQuery.Results property of CSSearchQuery or the CSUserQuery.Responses property of CSUserQuery, the query object doesn’t execute the block in this property. property of CSUserQuery, the query object doesn’t execute the block in this property.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/foundItemsHandler

func (CSSearchQuery) Init

func (c CSSearchQuery) Init() CSSearchQuery

Init initializes the instance.

func (CSSearchQuery) InitWithQueryStringQueryContext

func (c CSSearchQuery) InitWithQueryStringQueryContext(queryString string, queryContext ICSSearchQueryContext) CSSearchQuery

Initializes and returns a query object with the specified query string and query context.

Return Value

An initialized query object.

Discussion

- queryString: A formatted string that defines the matching criteria to apply to indexed items. To learn how to construct a query string, see Create a query string for your search. - This parameter must not be `nil`. - - queryContext: A CSSearchQueryContext object that focuses the query results.

Discussion

After you create and initialize a query object, and call CSSearchQuery.Start to begin the query, you can’t update or reuse the query object for a new query.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/init(queryString:queryContext:)

func (CSSearchQuery) IsCancelled

func (c CSSearchQuery) IsCancelled() bool

A Boolean value that indicates whether the current query is no longer running.

Discussion

The value of this property is `true` if you canceled it, and `false` if it’s still running or able to run.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/isCancelled

func (CSSearchQuery) ProtectionClasses

func (c CSSearchQuery) ProtectionClasses() []string

The protection types of the indexes you want to search.

Discussion

When creating an index to store your app’s data, you can associate a file protection type with that index to encrypt the data it contains. File protections prevent access to the data unless specific conditions occur. For example, you can make the data available only when the device is unlocked, or make it available after the first successful unlocking of the device. This property indicates which of your app’s protected indexes you want to search.

Possible values for this property are complete, completeUnlessOpen, and completeUntilFirstUserAuthentication. By default, the system retrives the data protection class from the `com.AppleXCUIElementTypeDeveloperXCUIElementTypeDefault()-data-protection` entitlement, if it exists; otherwise, the default value is completeUntilFirstUserAuthentication.

For more information on how to configure file protection types with an index, see Adding your app’s content to Spotlight indexes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/protectionClasses

func (CSSearchQuery) Results

func (c CSSearchQuery) Results() unsafe.Pointer

The results that match the current query string.

See: https://developer.apple.com/documentation/corespotlight/cssearchquery/results-swift.property

func (CSSearchQuery) SetCompletionHandler

func (c CSSearchQuery) SetCompletionHandler(value ErrorHandler)

func (CSSearchQuery) SetFoundItemsHandler

func (c CSSearchQuery) SetFoundItemsHandler(value CSSearchableItemArrayHandler)

func (CSSearchQuery) SetProtectionClasses

func (c CSSearchQuery) SetProtectionClasses(value []string)

func (CSSearchQuery) SetResults

func (c CSSearchQuery) SetResults(value unsafe.Pointer)

func (CSSearchQuery) Start

func (c CSSearchQuery) Start()

Starts searching the index for items that match the current query string and parameters.

Discussion

This method uses the configured search parameters and query string to begin a search of the index. It then delivers the results of that search to the closures in the CSSearchQuery.FoundItemsHandler and CSSearchQuery.CompletionHandler properties of the query object.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/start()

type CSSearchQueryClass

type CSSearchQueryClass struct {
	// contains filtered or unexported fields
}

func GetCSSearchQueryClass

func GetCSSearchQueryClass() CSSearchQueryClass

GetCSSearchQueryClass returns the class object for CSSearchQuery.

func (CSSearchQueryClass) Alloc

func (cc CSSearchQueryClass) Alloc() CSSearchQuery

Alloc allocates memory for a new instance of the class.

func (CSSearchQueryClass) Class

func (cc CSSearchQueryClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSSearchQueryContext

type CSSearchQueryContext struct {
	objectivec.Object
}

The behavior configuration to use for a search query.

Configuring search behavior

Filtering the results

Initializers

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext

func CSSearchQueryContextFromID

func CSSearchQueryContextFromID(id objc.ID) CSSearchQueryContext

CSSearchQueryContextFromID constructs a CSSearchQueryContext from an objc.ID.

The behavior configuration to use for a search query.

func NewCSSearchQueryContext

func NewCSSearchQueryContext() CSSearchQueryContext

NewCSSearchQueryContext creates a new CSSearchQueryContext instance.

func (CSSearchQueryContext) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CSSearchQueryContext) EncodeWithCoder

func (c CSSearchQueryContext) EncodeWithCoder(coder foundation.INSCoder)

func (CSSearchQueryContext) FetchAttributes

func (c CSSearchQueryContext) FetchAttributes() []string

The attributes the system fetches for the searchable items.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext/fetchAttributes

func (CSSearchQueryContext) FilterQueries

func (c CSSearchQueryContext) FilterQueries() []string

The query string used to filter the results.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext/filterQueries

func (CSSearchQueryContext) Init

Init initializes the instance.

func (CSSearchQueryContext) KeyboardLanguage

func (c CSSearchQueryContext) KeyboardLanguage() string

The language used for the query.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext/keyboardLanguage

func (CSSearchQueryContext) SetFetchAttributes

func (c CSSearchQueryContext) SetFetchAttributes(value []string)

func (CSSearchQueryContext) SetFilterQueries

func (c CSSearchQueryContext) SetFilterQueries(value []string)

func (CSSearchQueryContext) SetKeyboardLanguage

func (c CSSearchQueryContext) SetKeyboardLanguage(value string)

func (CSSearchQueryContext) SetSourceOptions

func (c CSSearchQueryContext) SetSourceOptions(value CSSearchQuerySourceOptions)

func (CSSearchQueryContext) SourceOptions

The query source options to allow or deny Mail messages in the search.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext/sourceOptions-swift.property

type CSSearchQueryContextClass

type CSSearchQueryContextClass struct {
	// contains filtered or unexported fields
}

func GetCSSearchQueryContextClass

func GetCSSearchQueryContextClass() CSSearchQueryContextClass

GetCSSearchQueryContextClass returns the class object for CSSearchQueryContext.

func (CSSearchQueryContextClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSSearchQueryContextClass) Class

Class returns the underlying Objective-C class pointer.

type CSSearchQueryErrorCode

type CSSearchQueryErrorCode int

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryError/Code

const (
	// CSSearchQueryErrorCodeCancelled: The query stopped because someone canceled it.
	CSSearchQueryErrorCodeCancelled CSSearchQueryErrorCode = -2003
	// CSSearchQueryErrorCodeIndexUnreachable: The index is unreachable.
	CSSearchQueryErrorCodeIndexUnreachable CSSearchQueryErrorCode = -2001
	// CSSearchQueryErrorCodeInvalidQuery: The query is syntactically invalid or specifies items that your app doesn’t have access to.
	CSSearchQueryErrorCodeInvalidQuery CSSearchQueryErrorCode = -2002
	// CSSearchQueryErrorCodeUnknown: An unknown error occurred.
	CSSearchQueryErrorCodeUnknown CSSearchQueryErrorCode = -2000
)

func (CSSearchQueryErrorCode) String

func (e CSSearchQueryErrorCode) String() string

type CSSearchQuerySourceOptions

type CSSearchQuerySourceOptions uint

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext/SourceOptions-swift.struct

const (
	// CSSearchQuerySourceOptionAllowMail: The query allows Mail messages in the search.
	CSSearchQuerySourceOptionAllowMail CSSearchQuerySourceOptions = 1
	// CSSearchQuerySourceOptionDefault: The query uses the default search option that excludes Mail messages.
	CSSearchQuerySourceOptionDefault CSSearchQuerySourceOptions = 0
)

func (CSSearchQuerySourceOptions) String

type CSSearchableIndex

type CSSearchableIndex struct {
	objectivec.Object
}

An on-device index for your app’s searchable content.

Overview

A CSSearchableIndex object manages an on-device index for your app’s searchable content. To make your app’s content searchable, create one or more CSSearchableItem objects for your content and add those items to the index. If your app defines AppEntity types, you can also index those types directly or associate them with your CSSearchableItem objects. When you execute a query, Core Spotlight searches your indexes for the requested information and returns the results to your code.

Create custom CSSearchableIndex objects in your production code to store your app’s content, instead of using the default index. Custom indexes support data protection, which allows you to encrypt your data and protect it from unauthorized access. Custom indexes also support batch operations, which allow you to index large amounts of data more efficiently and with less risk. For example, you can add custom state information to each batch operation to make it easier to restart the indexing process if your app or app extension crashes. Use the default index only during testing or prototyping of your features.

Modify a CSSearchableIndex object from only one thread or task at a time, and modify it only from your signed app or app extension. It’s a programming error to access a custom index from multiple threads simultaneously or from an unsigned bundle. When performing batch updates on an index, start each new batch operation only after calling the CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler or CSSearchableIndex.EndIndexBatchWithExpectedClientStateNewClientStateCompletionHandler method of the previous batch operation.

Creating an index

Managing items in an index

Batching index updates

Handling drag and drop content

Getting the protection class

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex

func CSSearchableIndexFromID

func CSSearchableIndexFromID(id objc.ID) CSSearchableIndex

CSSearchableIndexFromID constructs a CSSearchableIndex from an objc.ID.

An on-device index for your app’s searchable content.

func NewCSSearchableIndex

func NewCSSearchableIndex() CSSearchableIndex

NewCSSearchableIndex creates a new CSSearchableIndex instance.

func NewCSSearchableIndexWithName

func NewCSSearchableIndexWithName(name string) CSSearchableIndex

Returns an on-device index with the specified name.

name: A name that pertains to your custom organization.

Return Value

An on-device index.

Discussion

If you want to use batching or you want to index items in a specific protection class, you need to use your own index (you can’t perform batch updates on the default index).

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/init(name:)

func NewCSSearchableIndexWithNameProtectionClass

func NewCSSearchableIndexWithNameProtectionClass(name string, protectionClass foundation.NSFileProtectionType) CSSearchableIndex

Returns an on-device index with the specified name and data protection class.

name: A name that pertains to your custom organization.

protectionClass: The file protection class. Acceptable values are none, complete, completeUnlessOpen, or completeUntilFirstUserAuthentication.

Return Value

An index that can handle items within the specified protection class.

Discussion

Use this method to specify a protection class for an index. You can specify a default protection class for index items in the entitlements for your app.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/init(name:protectionClass:)

func (CSSearchableIndex) Autorelease

func (c CSSearchableIndex) Autorelease() CSSearchableIndex

Autorelease adds the receiver to the current autorelease pool.

func (CSSearchableIndex) BeginIndexBatch

func (c CSSearchableIndex) BeginIndexBatch()

Begins a batch of updates to an index.

Discussion

Don’t call this method again before CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler has returned. (You can call it again before the completion handler passed to CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler has been called.)

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/beginBatch()

func (CSSearchableIndex) DeleteAllSearchableItems

func (c CSSearchableIndex) DeleteAllSearchableItems(ctx context.Context) error

DeleteAllSearchableItems is a synchronous wrapper around CSSearchableIndex.DeleteAllSearchableItemsWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSSearchableIndex) DeleteAllSearchableItemsWithCompletionHandler

func (c CSSearchableIndex) DeleteAllSearchableItemsWithCompletionHandler(completionHandler ErrorHandler)

Deletes all searchable items from the index.

completionHandler: The block that’s called when the request has been journaled by the index (“journaled” means that the index makes a note that it has to perform this operation). Note that the request may not have completed.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/deleteAllSearchableItems(completionHandler:)

func (CSSearchableIndex) DeleteSearchableItemsWithDomainIdentifiersCompletionHandler

func (c CSSearchableIndex) DeleteSearchableItemsWithDomainIdentifiersCompletionHandler(domainIdentifiers []string, completionHandler ErrorHandler)

Removes from the index all searchable items associated with the specified domain.

domainIdentifiers: The domain identifier that describes the group of items to delete. To learn more about domain identifiers, see CSSearchableItem.DomainIdentifier.

completionHandler: The block that’s called when the request has been journaled by the index (“journaled” means that the index makes a note that it has to perform this operation). Note that the request may not have completed.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

Use this method to delete groups of items. Note that the delete operation is recursive. For example, if domain identifiers are of the form `.`, calling this method and specifying “ deletes items with the specified account and any mailbox.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/deleteSearchableItems(withDomainIdentifiers:completionHandler:)

func (CSSearchableIndex) DeleteSearchableItemsWithIdentifiersCompletionHandler

func (c CSSearchableIndex) DeleteSearchableItemsWithIdentifiersCompletionHandler(identifiers []string, completionHandler ErrorHandler)

Removes from the index all items with the specified identifiers.

identifiers: An array of identifiers that specify the items to delete.

completionHandler: The block that’s called when the data has been journaled by the index, which means that the index makes a note that it has to perform this operation. If the completion handler returns an error, it means that the data wasn’t journaled correctly and the client should retry the request.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

The [SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler] protocol method is called in the case that the journaling completed successfully, but the data was not able to be indexed for some reason.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/deleteSearchableItems(withIdentifiers:completionHandler:)

func (CSSearchableIndex) EndIndexBatchWithClientState

func (c CSSearchableIndex) EndIndexBatchWithClientState(ctx context.Context, clientState foundation.NSData) error

EndIndexBatchWithClientState is a synchronous wrapper around CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSSearchableIndex) EndIndexBatchWithClientStateCompletionHandler

func (c CSSearchableIndex) EndIndexBatchWithClientStateCompletionHandler(clientState foundation.NSData, completionHandler ErrorHandler)

Ends a batch of index updates and stores the specified state information.

clientState: Up to 250 bytes of information that can help you recover from a crash and resume indexing.

completionHandler: The block that’s called after the client state has been stored.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/endBatch(withClientState:completionHandler:)

func (CSSearchableIndex) EndIndexBatchWithExpectedClientStateNewClientState

func (c CSSearchableIndex) EndIndexBatchWithExpectedClientStateNewClientState(ctx context.Context, expectedClientState foundation.NSData, newClientState foundation.NSData) error

EndIndexBatchWithExpectedClientStateNewClientState is a synchronous wrapper around CSSearchableIndex.EndIndexBatchWithExpectedClientStateNewClientStateCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSSearchableIndex) EndIndexBatchWithExpectedClientStateNewClientStateCompletionHandler

func (c CSSearchableIndex) EndIndexBatchWithExpectedClientStateNewClientStateCompletionHandler(expectedClientState foundation.NSData, newClientState foundation.NSData, completionHandler ErrorHandler)

Ends a batch of index updates and stores the specified state information.

expectedClientState: The client state data from the previous batch.

newClientState: Up to 250 bytes of app-specific data that can help you recover from a crash and resume indexing.

completionHandler: The block to call with the results. The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/endIndexBatch(expectedClientState:newClientState:completionHandler:)

func (CSSearchableIndex) FetchDataForBundleIdentifierItemIdentifierContentType

func (c CSSearchableIndex) FetchDataForBundleIdentifierItemIdentifierContentType(ctx context.Context, bundleIdentifier string, itemIdentifier string, contentType uniformtypeidentifiers.UTType) (*foundation.NSData, error)

FetchDataForBundleIdentifierItemIdentifierContentType is a synchronous wrapper around CSSearchableIndex.FetchDataForBundleIdentifierItemIdentifierContentTypeCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSSearchableIndex) FetchDataForBundleIdentifierItemIdentifierContentTypeCompletionHandler

func (c CSSearchableIndex) FetchDataForBundleIdentifierItemIdentifierContentTypeCompletionHandler(bundleIdentifier string, itemIdentifier string, contentType uniformtypeidentifiers.UTType, completionHandler DataErrorHandler)

Fetches data from an external provider.

bundleIdentifier: The bundle identifier of the app to search.

itemIdentifier: The app-specific identifier of the item you want.

contentType: The type of data to fetch.

completionHandler: The block to execute with the results. The block has no return value and takes the following parameters:

data: The data for the specified item, if successful. error: An error object, or `nil` if the method retrieved the data successfully.

Discussion

Clients with the appropriate entitlements can use this method to fetch data from an external app such as Mail.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/fetchData(forBundleIdentifier:itemIdentifier:contentType:completionHandler:)

func (CSSearchableIndex) FetchLastClientState

func (c CSSearchableIndex) FetchLastClientState(ctx context.Context) (*foundation.NSData, error)

FetchLastClientState is a synchronous wrapper around CSSearchableIndex.FetchLastClientStateWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.

func (CSSearchableIndex) FetchLastClientStateWithCompletionHandler

func (c CSSearchableIndex) FetchLastClientStateWithCompletionHandler(completionHandler DataErrorHandler)

Fetches the app’s most recent client state information asynchronously.

completionHandler: The block to call when the request has been journaled by the index, which means that the index makes a note that it has to perform this operation. Note that the request may not have completed.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/fetchLastClientState(completionHandler:)

func (CSSearchableIndex) IndexDelegate

func (c CSSearchableIndex) IndexDelegate() CSSearchableIndexDelegate

The delegate object that can handle index-management tasks.

Discussion

The delegate should conform to the CSSearchableIndexDelegate protocol. Set this property to handle communication with the index and perform index-management tasks for your app. In particular, long-running apps should set a delegate so that the index can be updated while the app is in the background. Alternatively, you can create an extension with a request handler that conforms to the CSSearchableIndexDelegate protocol and let the extension perform index updates when your app isn’t running.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/indexDelegate

func (CSSearchableIndex) IndexSearchableItemsCompletionHandler

func (c CSSearchableIndex) IndexSearchableItemsCompletionHandler(items []CSSearchableItem, completionHandler ErrorHandler)

Adds or updates items in the index.

items: An array of searchable items to add or update.

completionHandler: The block that’s called when the data has been journaled by the index, which means that the index makes a note that it has to perform this operation. If the completion handler returns an error, it means that the data wasn’t journaled correctly and the client should retry the request.

The block receives the following parameter:

error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

Discussion

The [SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler] protocol method is called in the case that the journaling completed successfully but the data was not able to be indexed for some reason.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/indexSearchableItems(_:completionHandler:)

func (CSSearchableIndex) Init

Init initializes the instance.

func (CSSearchableIndex) InitWithName

func (c CSSearchableIndex) InitWithName(name string) CSSearchableIndex

Returns an on-device index with the specified name.

name: A name that pertains to your custom organization.

Return Value

An on-device index.

Discussion

If you want to use batching or you want to index items in a specific protection class, you need to use your own index (you can’t perform batch updates on the default index).

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/init(name:)

func (CSSearchableIndex) InitWithNameProtectionClass

func (c CSSearchableIndex) InitWithNameProtectionClass(name string, protectionClass foundation.NSFileProtectionType) CSSearchableIndex

Returns an on-device index with the specified name and data protection class.

name: A name that pertains to your custom organization.

protectionClass: The file protection class. Acceptable values are none, complete, completeUnlessOpen, or completeUntilFirstUserAuthentication.

Return Value

An index that can handle items within the specified protection class.

Discussion

Use this method to specify a protection class for an index. You can specify a default protection class for index items in the entitlements for your app.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/init(name:protectionClass:)

func (CSSearchableIndex) SetIndexDelegate

func (c CSSearchableIndex) SetIndexDelegate(value CSSearchableIndexDelegate)

type CSSearchableIndexClass

type CSSearchableIndexClass struct {
	// contains filtered or unexported fields
}

func GetCSSearchableIndexClass

func GetCSSearchableIndexClass() CSSearchableIndexClass

GetCSSearchableIndexClass returns the class object for CSSearchableIndex.

func (CSSearchableIndexClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSSearchableIndexClass) Class

func (cc CSSearchableIndexClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (CSSearchableIndexClass) DefaultSearchableIndex

func (_CSSearchableIndexClass CSSearchableIndexClass) DefaultSearchableIndex() CSSearchableIndex

Returns the default on-device index.

Return Value

The default on-device index.

Discussion

If you want to use batching or you want to index items in a specific protection class, you need to use your own index (you can’t perform batch updates on the default index).

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/default()

func (CSSearchableIndexClass) IsIndexingAvailable

func (_CSSearchableIndexClass CSSearchableIndexClass) IsIndexingAvailable() bool

Returns a Boolean value that indicates whether indexing is available on the current device.

Return Value

`true` if indexing is available on the current device, or `false` if it isn’t.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex/isIndexingAvailable()

type CSSearchableIndexDelegate

type CSSearchableIndexDelegate interface {
	objectivec.IObject

	// Tells the delegate to reindex all searchable data and clear all local state information.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexAllSearchableItemsWithAcknowledgementHandler:)
	SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(searchableIndex ICSSearchableIndex, acknowledgementHandler VoidHandler)

	// Tells the delegate to reindex the searchable items associated with the specified identifiers.
	//
	// See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)
	SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(searchableIndex ICSSearchableIndex, identifiers []string, acknowledgementHandler VoidHandler)
}

A protocol that defines methods a delegate object or app extension uses to handle communication from the on-device index.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate

type CSSearchableIndexDelegateConfig

type CSSearchableIndexDelegateConfig struct {

	// Monitoring Spotlight status
	// SearchableIndexDidThrottle — Tells the delegate that indexing is being throttled.
	SearchableIndexDidThrottle func(searchableIndex CSSearchableIndex)
	// SearchableIndexDidFinishThrottle — Tells the delegate that the index throttling has finished.
	SearchableIndexDidFinishThrottle func(searchableIndex CSSearchableIndex)
}

CSSearchableIndexDelegateConfig holds optional typed callbacks for CSSearchableIndexDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type CSSearchableIndexDelegateObject

type CSSearchableIndexDelegateObject struct {
	objectivec.Object
}

CSSearchableIndexDelegateObject wraps an existing Objective-C object that conforms to the CSSearchableIndexDelegate protocol.

func CSSearchableIndexDelegateObjectFromID

func CSSearchableIndexDelegateObjectFromID(id objc.ID) CSSearchableIndexDelegateObject

CSSearchableIndexDelegateObjectFromID constructs a CSSearchableIndexDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func NewCSSearchableIndexDelegate

func NewCSSearchableIndexDelegate(config CSSearchableIndexDelegateConfig) CSSearchableIndexDelegateObject

NewCSSearchableIndexDelegate creates an Objective-C object implementing the CSSearchableIndexDelegate protocol.

Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.

The returned CSSearchableIndexDelegateObject satisfies the CSSearchableIndexDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func (CSSearchableIndexDelegateObject) BaseObject

func (CSSearchableIndexDelegateObject) FileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError

func (o CSSearchableIndexDelegateObject) FileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(searchableIndex ICSSearchableIndex, itemIdentifier string, typeIdentifier string, inPlace bool) (foundation.NSURL, error)

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/fileURL(for:itemIdentifier:typeIdentifier:inPlace:)

func (CSSearchableIndexDelegateObject) SearchableIndexDidFinishThrottle

func (o CSSearchableIndexDelegateObject) SearchableIndexDidFinishThrottle(searchableIndex ICSSearchableIndex)

Tells the delegate that the index throttling has finished.

searchableIndex: The index that was throttled.

Discussion

In some situations, such as when the device is using battery only, the system may throttle indexing to save power. You can implement this method to be notified when throttling is finished so that your app can resume its standard indexing behavior.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndexDidFinishThrottle(_:)

func (CSSearchableIndexDelegateObject) SearchableIndexDidThrottle

func (o CSSearchableIndexDelegateObject) SearchableIndexDidThrottle(searchableIndex ICSSearchableIndex)

Tells the delegate that indexing is being throttled.

searchableIndex: The indexing that’s being throttled.

Discussion

In some situations, such as when the device is using battery only, the system may throttle indexing to save power. You can implement this method to be notified of this situation so that you can respond by, for example, prioritizing the items to index.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndexDidThrottle(_:)

func (CSSearchableIndexDelegateObject) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler

func (o CSSearchableIndexDelegateObject) SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(searchableIndex ICSSearchableIndex, acknowledgementHandler VoidHandler)

Tells the delegate to reindex all searchable data and clear all local state information.

searchableIndex: The index in which to reindex the searchable data. The delegate or app extension should pass `searchableIndex` to CSSearchableIndex.IndexSearchableItemsCompletionHandler.

acknowledgementHandler: The handler to call after all client state has been saved. Note that if the app passes client state information in a batch (for example, by calling CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler), the acknowledgement handler can be called immediately.

The delegate or app extension must call the acknowledgement handler after all client state information has been saved, so that the indexer can call this method again in case of a crash.

Discussion

Typically, the index tells the delegate to reindex its searchable data and clear local state when the index has been lost. An app extension should not use the index passed in `searchableIndex` when a custom data protection class is needed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexAllSearchableItemsWithAcknowledgementHandler:)

func (CSSearchableIndexDelegateObject) SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler

func (o CSSearchableIndexDelegateObject) SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(searchableIndex ICSSearchableIndex, identifiers []string, acknowledgementHandler VoidHandler)

Tells the delegate to reindex the searchable items associated with the specified identifiers.

searchableIndex: The index in which to reindex the specified searchable data. To update the state of the items, the delegate or app extension should call CSSearchableIndex.IndexSearchableItemsCompletionHandler passing in `searchableIndex`.

identifiers: An array of identifiers that specify searchable items.

acknowledgementHandler: The handler to call after all client state has been saved. Note that if the app passes client state information in a batch (for example, by calling CSSearchableIndex.EndIndexBatchWithClientStateCompletionHandler), the acknowledgement handler can be called immediately.

The delegate or app extension must call the acknowledgement handler after all client state information has been saved, so that the indexer can call this method again in case of a crash.

Discussion

An app extension should not use the index passed in `searchableIndex` when a custom data protection class is needed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableIndex(_:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)

func (CSSearchableIndexDelegateObject) SearchableItemsDidUpdate

func (o CSSearchableIndexDelegateObject) SearchableItemsDidUpdate(items []CSSearchableItem)

Tells the delegate that the framework updated the list of searchable items.

items: The items the framework updated.

Discussion

The framework calls this method when it updates an item with specific attributes; see CSSearchableItem.UpdateListenerOptions for Apple Intelligence attributes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableItemsDidUpdate(_:)

func (CSSearchableIndexDelegateObject) SearchableItemsForIdentifiersSearchableItemsHandler

func (o CSSearchableIndexDelegateObject) SearchableItemsForIdentifiersSearchableItemsHandler(identifiers []string, searchableItemsHandler CSSearchableItemArrayHandler)

Requests that the delegate provide searchable items for the provided identifiers.

identifiers: An array of strings that represent the identifiers.

searchableItemsHandler: A method the framework calls that provides an array of CSSearchableItem objects.

Discussion

Use this method to provide the framework with a list of identifiers to search for.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndexDelegate/searchableItems(forIdentifiers:searchableItemsHandler:)

type CSSearchableItem

type CSSearchableItem struct {
	objectivec.Object
}

The details of your app-specific content that someone might search for on their devices.

Overview

A CSSearchableItem uniquely identifies a part of your app’s content, and provides the metadata that Spotlight indexes and uses to find that content later. As part of indexing your app’s content, you create searchable items and fill them with details about your app’s content and where to find it. After indexing the content, you can then execute queries using the Core Spotlight APIs to find the items you indexed. People can also use the system’s Spotlight search interface to find your app’s content.

When you create or update content in your app, create a CSSearchableItem for that content if you want it to be searchable. A searchable item contains identification strings you use to locate that item in your content and a CSSearchableItemAttributeSet object with details about the item. For the metadata, you typically want to provide values for the CSSearchableItemAttributeSet.Title, CSSearchableItemAttributeSet.DisplayName, and CSSearchableItemAttributeSet.ContentType attributes at a minimum. If you’re indexing a file on disk, provide a value for the CSSearchableItemAttributeSet.ContentURL attribute. Fill in as many other attributes as makes sense for the content you’re indexing.

After creating a searchable item, index it using a CSSearchableIndex object. As you update your app’s content, update your CSSearchableItem objects for that content and index them right away. If you delete content, similarly delete the searchable items from the index. Keeping your app’s indexes current ensures that searches return valid information. For more information on indexing your content, see Adding your app’s content to Spotlight indexes.

Getting a searchable item

Setting attributes on a searchable item

Comparing items

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem

func CSSearchableItemFromID

func CSSearchableItemFromID(id objc.ID) CSSearchableItem

CSSearchableItemFromID constructs a CSSearchableItem from an objc.ID.

The details of your app-specific content that someone might search for on their devices.

func NewCSSearchableItem

func NewCSSearchableItem() CSSearchableItem

NewCSSearchableItem creates a new CSSearchableItem instance.

func NewCSSearchableItemWithUniqueIdentifierDomainIdentifierAttributeSet

func NewCSSearchableItemWithUniqueIdentifierDomainIdentifierAttributeSet(uniqueIdentifier string, domainIdentifier string, attributeSet ICSSearchableItemAttributeSet) CSSearchableItem

Returns a searchable item associated with the specified identifier, domain identifier, and attribute set.

uniqueIdentifier: The unique identifier for the item. If you specify [NULL], an identifier is generated automatically.

domainIdentifier: An identifier for a domain, such as an album, that helps you group items together in a way that makes sense.

attributeSet: A set of properties that specify the metadata you want to display about an item in a search result. See CSSearchableItemAttributeSet for the types of properties you can use.

Return Value

A searchable item that’s associated with the specified identifier, domain identifier, and attribute set.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/init(uniqueIdentifier:domainIdentifier:attributeSet:)

func (CSSearchableItem) AttributeSet

The set of attributes that contain metadata associated with the item in a CSSearchableItemAttributeSet object.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/attributeSet

func (CSSearchableItem) Autorelease

func (c CSSearchableItem) Autorelease() CSSearchableItem

Autorelease adds the receiver to the current autorelease pool.

func (CSSearchableItem) CompareByRank

Compares two items by rank and returns the result.

other: The other item to compare against the current one.

Return Value

A comparison result that indicates the ranked order of the items.

Discussion

Call this function when you want to compare the current item with the one you specify. The method compares the ranks of the items.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/compare(byRank:)

func (CSSearchableItem) DomainIdentifier

func (c CSSearchableItem) DomainIdentifier() string

An optional identifier that represents the domain or owner of the item.

Discussion

Specify a domain identifier to group items together and to make it easy to delete groups of items from the index. For example, you might specify an identifier for a mailbox in an account whose indexed data you want to remove when the account is deleted. In this example, CSSearchableItem.DomainIdentifier should be of the form `.`, where neither “ nor “ contain periods. To delete all items associated with the specified account and mailbox, you can call CSSearchableIndex.DeleteSearchableItemsWithDomainIdentifiersCompletionHandler with a CSSearchableItem.DomainIdentifier of `.`. Or to delete all items associated with all mailboxes in the specified account, you can call CSSearchableIndex.DeleteSearchableItemsWithDomainIdentifiersCompletionHandler with a CSSearchableItem.DomainIdentifier of “.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/domainIdentifier

func (CSSearchableItem) EncodeWithCoder

func (c CSSearchableItem) EncodeWithCoder(coder foundation.INSCoder)

func (CSSearchableItem) ExpirationDate

func (c CSSearchableItem) ExpirationDate() foundation.NSDate

The date after which the searchable item should no longer exist.

Discussion

If you don’t set the CSSearchableItem.ExpirationDate property appropriately, the system automatically expires the item after a period of time.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/expirationDate

func (CSSearchableItem) Init

Init initializes the instance.

func (CSSearchableItem) InitWithUniqueIdentifierDomainIdentifierAttributeSet

func (c CSSearchableItem) InitWithUniqueIdentifierDomainIdentifierAttributeSet(uniqueIdentifier string, domainIdentifier string, attributeSet ICSSearchableItemAttributeSet) CSSearchableItem

Returns a searchable item associated with the specified identifier, domain identifier, and attribute set.

uniqueIdentifier: The unique identifier for the item. If you specify [NULL], an identifier is generated automatically.

domainIdentifier: An identifier for a domain, such as an album, that helps you group items together in a way that makes sense.

attributeSet: A set of properties that specify the metadata you want to display about an item in a search result. See CSSearchableItemAttributeSet for the types of properties you can use.

Return Value

A searchable item that’s associated with the specified identifier, domain identifier, and attribute set.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/init(uniqueIdentifier:domainIdentifier:attributeSet:)

func (CSSearchableItem) IsUpdate

func (c CSSearchableItem) IsUpdate() bool

A Boolean value that indicates whether to treat the item as an update instead of a new item.

Discussion

Set the value of this property to `true` if the item represents an update to information already in the index. Marking an item as an update makes the indexing process more efficient. If this property is `false` and the system encounters an item with the same identifier in the index, it deletes the old item and then inserts the new one. When the property is `true`, it updates the existing item, which saves time. If this property is `true` and the item doesn’t exist in the index, the system ignores the request to index the item and doesn’t create a new item.

When configuring the attributes for the item, set an attribute to `nil` to remove its value.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/isUpdate

func (CSSearchableItem) SetAttributeSet

func (c CSSearchableItem) SetAttributeSet(value ICSSearchableItemAttributeSet)

func (CSSearchableItem) SetDomainIdentifier

func (c CSSearchableItem) SetDomainIdentifier(value string)

func (CSSearchableItem) SetExpirationDate

func (c CSSearchableItem) SetExpirationDate(value foundation.NSDate)

func (CSSearchableItem) SetIsUpdate

func (c CSSearchableItem) SetIsUpdate(value bool)

func (CSSearchableItem) SetUniqueIdentifier

func (c CSSearchableItem) SetUniqueIdentifier(value string)

func (CSSearchableItem) SetUpdateListenerOptions

func (c CSSearchableItem) SetUpdateListenerOptions(value CSSearchableItemUpdateListenerOptions)

func (CSSearchableItem) UniqueIdentifier

func (c CSSearchableItem) UniqueIdentifier() string

The value that uniquely identifies the searchable item within your app.

Discussion

This property is required because it’s the only way to identify searchable items in the index when you need to access or delete them. When you create a searchable item, the system generates a UUID by default, but you can replace the default value with a unique identifier that makes sense in the context of your app. If you want to use a custom value for CSSearchableItem.UniqueIdentifier, be sure to set it before the item is indexed for the first time.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/uniqueIdentifier

type CSSearchableItemArrayHandler

type CSSearchableItemArrayHandler = func(*[]CSSearchableItem)

CSSearchableItemArrayHandler handles A method the framework calls that provides an array of CSSearchableItem objects.

Used by:

type CSSearchableItemAttributeSet

type CSSearchableItemAttributeSet struct {
	objectivec.Object
}

The detailed metadata for a searchable item.

Overview

A CSSearchableItemAttributeSet contains an extensive set of attributes that describe your app’s content. Attributes include information such as its title and a brief description. They can also refer to who created the item, what kind of data it represents, when someone created it, and more. During the indexing process, you create CSSearchableItem objects and use a CSSearchableItemAttributeSet to fill in the attributes for that item. During a search, you can query the index for items with attributes that match specific values.

When creating a CSSearchableItem, it’s important to fill out as much information in the accompanying CSSearchableItemAttributeSet object as possible. You don’t have to provide values for every attribute. Instead, choose attributes that match the domain of your content. This type divides attributes into groups such as media, documents, events, places, music, images, and more. You can also add custom attributes to describe new types of content. When defining custom attributes, be as specific as possible in your definition, and provide a value for the CSSearchableItemAttributeSet.ContentTypeTree property so your custom attribute inherits from a known type.

Creating an attribute set

Accessing custom attributes

Handling Apple Intelligence prioritization and summarization

Providing item representations

Describing general attributes

Describing document content

Describing user involvement

Describing events

Describing places

Describing media

Describing music

Describing images

Describing messages

Describing containment

Describing supporting actions

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet

func CSSearchableItemAttributeSetFromID

func CSSearchableItemAttributeSetFromID(id objc.ID) CSSearchableItemAttributeSet

CSSearchableItemAttributeSetFromID constructs a CSSearchableItemAttributeSet from an objc.ID.

The detailed metadata for a searchable item.

func NewCSSearchableItemAttributeSet

func NewCSSearchableItemAttributeSet() CSSearchableItemAttributeSet

NewCSSearchableItemAttributeSet creates a new CSSearchableItemAttributeSet instance.

func NewCSSearchableItemAttributeSetWithContentType

func NewCSSearchableItemAttributeSetWithContentType(contentType uniformtypeidentifiers.UTType) CSSearchableItemAttributeSet

Creates an attribute set for the specified content type.

contentType: The type of the content. For example, png or movie.

Return Value

An attribute set that represents an item of the specified content type.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/init(contentType:)

func (CSSearchableItemAttributeSet) AccountHandles

func (c CSSearchableItemAttributeSet) AccountHandles() []string

An array of the canonical handles for the account with which the message is associated.

Discussion

Account handles can include chat handles, email addresses, phone numbers, and so on.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/accountHandles

func (CSSearchableItemAttributeSet) AccountIdentifier

func (c CSSearchableItemAttributeSet) AccountIdentifier() string

The unique identifier for the account with which the message is associated, if any.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/accountIdentifier

func (CSSearchableItemAttributeSet) AcquisitionMake

func (c CSSearchableItemAttributeSet) AcquisitionMake() string

The manufacturer of the device that captured the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/acquisitionMake

func (CSSearchableItemAttributeSet) AcquisitionModel

func (c CSSearchableItemAttributeSet) AcquisitionModel() string

The model of the device that captured the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/acquisitionModel

func (CSSearchableItemAttributeSet) AddedDate

The date on which the item was moved into its current location.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/addedDate

func (CSSearchableItemAttributeSet) AdditionalRecipients

func (c CSSearchableItemAttributeSet) AdditionalRecipients() []CSPerson

An array of CSPerson objects representing the content of the Cc: field in an email message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/additionalRecipients

func (CSSearchableItemAttributeSet) Album

The title for a collection of audio media.

Discussion

The value of this property is analogous to the title of a record album or photo album.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/album

func (CSSearchableItemAttributeSet) AllDay

A value that indicates if the event covers an entire day.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/allDay

func (CSSearchableItemAttributeSet) AlternateNames

func (c CSSearchableItemAttributeSet) AlternateNames() []string

An array of localized strings that represent alternate display names for the item.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/alternateNames

func (CSSearchableItemAttributeSet) Altitude

The altitude of the item in meters above sea level, expressed using the WGS84 datum.

Discussion

Negative values lie below sea level.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/altitude

func (CSSearchableItemAttributeSet) Aperture

The size of the lens aperture at the time the camera captured the image, as a log-scale APEX value.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/aperture

func (CSSearchableItemAttributeSet) Artist

The artist associated with the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/artist

func (CSSearchableItemAttributeSet) Audiences

func (c CSSearchableItemAttributeSet) Audiences() []string

A class of entity for which the item is intended or useful.

Discussion

A class of entity may be determined by the creator or the publisher of the item or by a third party.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audiences

func (CSSearchableItemAttributeSet) AudioBitRate

The audio bit rate of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audioBitRate

func (CSSearchableItemAttributeSet) AudioChannelCount

func (c CSSearchableItemAttributeSet) AudioChannelCount() foundation.NSNumber

The number of channels in the audio data that the file contains.

Discussion

The value of this property represents only the number of discreet channels of audio data found in the file. It does not indicate any audio data configuration related to a user’s speaker setup.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audioChannelCount

func (CSSearchableItemAttributeSet) AudioEncodingApplication

func (c CSSearchableItemAttributeSet) AudioEncodingApplication() string

The name of the application that encoded the data the audio file contains.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audioEncodingApplication

func (CSSearchableItemAttributeSet) AudioSampleRate

func (c CSSearchableItemAttributeSet) AudioSampleRate() foundation.NSNumber

The sample rate of the audio data the file contains, as a float value representing Hz (audio frames per second), such as 44100.0 or 22254.54.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audioSampleRate

func (CSSearchableItemAttributeSet) AudioTrackNumber

func (c CSSearchableItemAttributeSet) AudioTrackNumber() foundation.NSNumber

The track number of a song or audio composition when part of an album.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/audioTrackNumber

func (CSSearchableItemAttributeSet) AuthorAddresses

func (c CSSearchableItemAttributeSet) AuthorAddresses() []string

An array of addresses associated with the author of the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/authorAddresses

func (CSSearchableItemAttributeSet) AuthorEmailAddresses

func (c CSSearchableItemAttributeSet) AuthorEmailAddresses() []string

An array of email addresses associated with the author of the message.

Discussion

The contents of this property is not human-readable.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/authorEmailAddresses

func (CSSearchableItemAttributeSet) AuthorNames

func (c CSSearchableItemAttributeSet) AuthorNames() []string

An array of names representing the authors who have worked on the message.

Discussion

A message may have zero or more authors. Although the array preserves the order of authors, it is not intended to identify the main author or represent the relative importance of authors.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/authorNames

func (CSSearchableItemAttributeSet) Authors

func (c CSSearchableItemAttributeSet) Authors() []CSPerson

An array of CSPerson objects representing the content of the From: field in an item.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/authors

func (CSSearchableItemAttributeSet) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (CSSearchableItemAttributeSet) BitsPerSample

The number of bits per sample.

Discussion

The value of this property can represent the bit depth of an image (such as 8-bit or 16-bit) or the bit depth per audio sample of uncompressed audio data (such as 8, 16, 24, 32, 64, and so on).

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/bitsPerSample

func (CSSearchableItemAttributeSet) CameraOwner

func (c CSSearchableItemAttributeSet) CameraOwner() string

The owner of the camera that captured the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/cameraOwner

func (CSSearchableItemAttributeSet) City

The city of the item’s origin according to guidelines that the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/city

func (CSSearchableItemAttributeSet) Codecs

func (c CSSearchableItemAttributeSet) Codecs() []string

The codecs used to encode/decode the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/codecs

func (CSSearchableItemAttributeSet) ColorSpace

func (c CSSearchableItemAttributeSet) ColorSpace() string

The color space model the image uses, such as RGB, CMYK, YUV, or YCbCr.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/colorSpace

func (CSSearchableItemAttributeSet) Comment

A comment related to the media file.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/comment

func (CSSearchableItemAttributeSet) CompletionDate

func (c CSSearchableItemAttributeSet) CompletionDate() foundation.NSDate

The date on which the item was completed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/completionDate

func (CSSearchableItemAttributeSet) Composer

func (c CSSearchableItemAttributeSet) Composer() string

The composer of the song or audio composition that the audio file contains.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/composer

func (CSSearchableItemAttributeSet) ContactKeywords

func (c CSSearchableItemAttributeSet) ContactKeywords() []string

A list of contacts who are associated with the content in some way, not including the author.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contactKeywords

func (CSSearchableItemAttributeSet) ContainerDisplayName

func (c CSSearchableItemAttributeSet) ContainerDisplayName() string

A localized string that specifies the name of a container to which the item belongs, suitable to display in the user interface.

Discussion

For example, a container display name might be the title of a series of books. When you specify the containment properties, Spotlight can treat individual items as part of an ordered set.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/containerDisplayName

func (CSSearchableItemAttributeSet) ContainerIdentifier

func (c CSSearchableItemAttributeSet) ContainerIdentifier() string

The identifier of the container to which the item belongs.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/containerIdentifier

func (CSSearchableItemAttributeSet) ContainerOrder

The order of the item within the container.

Discussion

For example, if the container represents a series of books, this property specifies the order in which the books should be read.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/containerOrder

func (CSSearchableItemAttributeSet) ContainerTitle

func (c CSSearchableItemAttributeSet) ContainerTitle() string

The title of the container to which the item belongs.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/containerTitle

func (CSSearchableItemAttributeSet) ContentCreationDate

func (c CSSearchableItemAttributeSet) ContentCreationDate() foundation.NSDate

The creation date of an edited or optimized version of the song or composition.

Discussion

This property is supplementary to CSSearchableItemAttributeSet.RecordingDate, which indicates the original recording date of the song or composition.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentCreationDate

func (CSSearchableItemAttributeSet) ContentDescription

func (c CSSearchableItemAttributeSet) ContentDescription() string

A description of the item’s content.

Discussion

A description may consist of an abstract, table of contents, reference to a graphical representation of content, a free-text account of the content, or other matter.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentDescription

func (CSSearchableItemAttributeSet) ContentModificationDate

func (c CSSearchableItemAttributeSet) ContentModificationDate() foundation.NSDate

The date on which the contents of the file was last modified.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentModificationDate

func (CSSearchableItemAttributeSet) ContentRating

A value that indicates if the media contains explicit content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentRating

func (CSSearchableItemAttributeSet) ContentSources

func (c CSSearchableItemAttributeSet) ContentSources() []string

An array of sources from which the media was obtained.

Discussion

The string values in this property might include the URL of the website from which the file was downloaded or information that describes the email to which the file was attached.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentSources

func (CSSearchableItemAttributeSet) ContentType

func (c CSSearchableItemAttributeSet) ContentType() string

The uniform type identifier (UTI) of the item.

Discussion

To learn more about UTIs, see [UTType].

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentType

func (CSSearchableItemAttributeSet) ContentTypeTree

func (c CSSearchableItemAttributeSet) ContentTypeTree() []string

An attribute type that identifies a custom hierarchy of types to describe the attributes of your item.

Discussion

For example, the CSSearchableItemAttributeSet.ContentTypeTree for an item whose CSSearchableItemAttributeSet.ContentType is `public.M3u()-playlist` should include `public.M3u()-playlist` and `public.Playlist()`.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentTypeTree

func (CSSearchableItemAttributeSet) ContentURL

The file URL of the content to index.

Discussion

This is an optional property. An app that is also a client of iCloud Drive can set this property to allow Spotlight to deduplicate its searchable items against the iCloud Drive items. In this scenario, Spotlight does not display searchable items from iCloud Drive that have the same CSSearchableItemAttributeSet.ContentURL property.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contentURL

func (CSSearchableItemAttributeSet) Contributors

func (c CSSearchableItemAttributeSet) Contributors() []string

A list of people, organizations, or services that made contributions to the media content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/contributors

func (CSSearchableItemAttributeSet) Copyright

func (c CSSearchableItemAttributeSet) Copyright() string

The copyright date of the content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/copyright

func (CSSearchableItemAttributeSet) Country

The full, publishable name of the country or region in which the intellectual property of the item was created, according to guidelines the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/country

func (CSSearchableItemAttributeSet) Coverage

func (c CSSearchableItemAttributeSet) Coverage() []string

A list of descriptors that specify the extent or scope of the media.

Discussion

The string values in this property typically include a location (such as a place name or geographic coordinates), a temporal period (such as a period label, date, or date range), or a jurisdiction (such as a named administrative entity).

It’s recommended that you select a value from a controlled vocabulary, and that when you need to specify a place or time period, you use a name instead of a numeric identifier, such as a set of coordinates or a date range.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/coverage

func (CSSearchableItemAttributeSet) Creator

The name of the app that created the content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/creator

func (CSSearchableItemAttributeSet) DarkThumbnailURL

func (c CSSearchableItemAttributeSet) DarkThumbnailURL() foundation.NSURL

The local file URL of the thumbnail image for the item when Dark Mode is active.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/darkThumbnailURL

func (CSSearchableItemAttributeSet) DeliveryType

The delivery type of the file.

Discussion

The value of this property is 0 for fast start and 1 for RTSP.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/deliveryType

func (CSSearchableItemAttributeSet) Director

func (c CSSearchableItemAttributeSet) Director() string

The name of the director of the media (for example, a movie director).

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/director

func (CSSearchableItemAttributeSet) DisplayName

func (c CSSearchableItemAttributeSet) DisplayName() string

A localized string that contains the name of the item, suitable to display in the user interface.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/displayName

func (CSSearchableItemAttributeSet) DomainIdentifier

func (c CSSearchableItemAttributeSet) DomainIdentifier() string

An identifier that represents the domain or owner of the item.

Discussion

Specify a domain identifier to group items together and make it easier to delete them from the index. For example, to delete a user activity, set this property on the contentAttributeSet property of the NSUserActivity object and then call CSSearchableIndex.DeleteSearchableItemsWithDomainIdentifiersCompletionHandler on your app’s index.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/domainIdentifier

func (CSSearchableItemAttributeSet) DownloadedDate

func (c CSSearchableItemAttributeSet) DownloadedDate() foundation.NSDate

The most recent date on which the file was downloaded or received.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/downloadedDate

func (CSSearchableItemAttributeSet) DueDate

The date on which the item is due.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/dueDate

func (CSSearchableItemAttributeSet) Duration

The duration (if appropriate) of the content of the file, in seconds.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/duration

func (CSSearchableItemAttributeSet) EXIFGPSVersion

func (c CSSearchableItemAttributeSet) EXIFGPSVersion() string

The version of GPS Info IFD header that was used to generate the metadata for the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exifgpsVersion

func (CSSearchableItemAttributeSet) EXIFVersion

func (c CSSearchableItemAttributeSet) EXIFVersion() string

The version of the EXIF header that was used to generate the metadata for the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exifVersion

func (CSSearchableItemAttributeSet) Editors

func (c CSSearchableItemAttributeSet) Editors() []string

A list of editors who have worked on the file.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/editors

func (CSSearchableItemAttributeSet) EmailAddresses

func (c CSSearchableItemAttributeSet) EmailAddresses() []string

An array of email addresses associated with the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/emailAddresses

func (CSSearchableItemAttributeSet) EmailHeaders

A dictionary that contains all the headers of the message.

Discussion

Dictionary keys are header names and the values are arrays of strings, because one header can occur more than once in an email message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/emailHeaders

func (CSSearchableItemAttributeSet) EncodeWithCoder

func (c CSSearchableItemAttributeSet) EncodeWithCoder(coder foundation.INSCoder)

func (CSSearchableItemAttributeSet) EncodingApplications

func (c CSSearchableItemAttributeSet) EncodingApplications() []string

The name of the apps that converted the original content into a PDF stream.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/encodingApplications

func (CSSearchableItemAttributeSet) ExposureMode

The mode the camera used for the exposure of the image.

Discussion

This property can have the following values:

- 0 — auto exposure - 1 — manual - 2 — auto bracket

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exposureMode

func (CSSearchableItemAttributeSet) ExposureProgram

func (c CSSearchableItemAttributeSet) ExposureProgram() string

The class of the program the camera used to set exposure when capturing the image.

Discussion

Can include manual, normal, aperture priority, and so on.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exposureProgram

func (CSSearchableItemAttributeSet) ExposureTime

The time that the lens was open during exposure, in seconds.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exposureTime

func (CSSearchableItemAttributeSet) ExposureTimeString

func (c CSSearchableItemAttributeSet) ExposureTimeString() string

The time that the lens was open during exposure, in a string, such as “1/250 seconds”.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/exposureTimeString

func (CSSearchableItemAttributeSet) FNumber

The focal length of the lens, divided by the diameter of the aperture when the camera captured the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/fNumber

func (CSSearchableItemAttributeSet) FlashOn

A value that indicates if the camera used a flash to capture the image.

Discussion

The value of this property is 1 if the flash is on; otherwise, 0.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/flashOn

func (CSSearchableItemAttributeSet) FocalLength

The actual focal length of the lens, in millimeters.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/focalLength

func (CSSearchableItemAttributeSet) FocalLength35mm

func (c CSSearchableItemAttributeSet) FocalLength35mm() foundation.NSNumber

A value that indicates if the focal length is 35mm.

Discussion

The value of this property is 1 if the focal length is 35mm; otherwise, 0.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/focalLength35mm

func (CSSearchableItemAttributeSet) FontNames

func (c CSSearchableItemAttributeSet) FontNames() []string

An array of font names the document uses.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/fontNames

func (CSSearchableItemAttributeSet) FullyFormattedAddress

func (c CSSearchableItemAttributeSet) FullyFormattedAddress() string

The fully formatted address of the item, received from MapKit.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/fullyFormattedAddress

func (CSSearchableItemAttributeSet) GPSAreaInformation

func (c CSSearchableItemAttributeSet) GPSAreaInformation() string

Information about the GPS area.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsAreaInformation

func (CSSearchableItemAttributeSet) GPSDOP

The GPS dilution of precision value.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsdop

func (CSSearchableItemAttributeSet) GPSDateStamp

The date and time related to the GPS value.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDateStamp

func (CSSearchableItemAttributeSet) GPSDestBearing

The bearing to the destination point.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDestBearing

func (CSSearchableItemAttributeSet) GPSDestDistance

func (c CSSearchableItemAttributeSet) GPSDestDistance() foundation.NSNumber

The distance to the destination point.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDestDistance

func (CSSearchableItemAttributeSet) GPSDestLatitude

func (c CSSearchableItemAttributeSet) GPSDestLatitude() foundation.NSNumber

The latitude of the destination point.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDestLatitude

func (CSSearchableItemAttributeSet) GPSDestLongitude

func (c CSSearchableItemAttributeSet) GPSDestLongitude() foundation.NSNumber

The longitude of the destination point.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDestLongitude

func (CSSearchableItemAttributeSet) GPSDifferental

The differential correction applied to the GPS receiver.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsDifferental

func (CSSearchableItemAttributeSet) GPSMapDatum

func (c CSSearchableItemAttributeSet) GPSMapDatum() string

The geodetic data that the GPS receiver uses.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsMapDatum

func (CSSearchableItemAttributeSet) GPSMeasureMode

func (c CSSearchableItemAttributeSet) GPSMeasureMode() string

The measurement precision mode in use by the GPS receiver.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsMeasureMode

func (CSSearchableItemAttributeSet) GPSProcessingMethod

func (c CSSearchableItemAttributeSet) GPSProcessingMethod() string

The location finding method that the GPS receiver uses.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsProcessingMethod

func (CSSearchableItemAttributeSet) GPSStatus

func (c CSSearchableItemAttributeSet) GPSStatus() string

The status of the GPS receiver.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsStatus

func (CSSearchableItemAttributeSet) GPSTrack

The direction of travel of the item in degrees from true north.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/gpsTrack

func (CSSearchableItemAttributeSet) GeneralMIDISequence

func (c CSSearchableItemAttributeSet) GeneralMIDISequence() foundation.NSNumber

A value that indicates whether the MIDI sequence the file contains is set up for use with a general MIDI device.

Discussion

When the value of this property is 1, the MIDI sequence in the file is set up for use with a general MIDI device; when the value is 0, it is not.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/generalMIDISequence

func (CSSearchableItemAttributeSet) Genre

The genre of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/genre

func (CSSearchableItemAttributeSet) HTMLContentData

func (c CSSearchableItemAttributeSet) HTMLContentData() foundation.NSData

The HTML content of the document encoded as an NSData object representing a UTF-8 encoded string.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/htmlContentData

func (CSSearchableItemAttributeSet) HasAlphaChannel

func (c CSSearchableItemAttributeSet) HasAlphaChannel() foundation.NSNumber

Indicates if the image file has an alpha channel.

Discussion

When the value of this property is 0, no alpha channel is used; when the value is 1, an alpha channel is used.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/hasAlphaChannel

func (CSSearchableItemAttributeSet) Headline

func (c CSSearchableItemAttributeSet) Headline() string

A publishable string that provides a synopsis of the contents of the item.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/headline

func (CSSearchableItemAttributeSet) HiddenAdditionalRecipients

func (c CSSearchableItemAttributeSet) HiddenAdditionalRecipients() []CSPerson

An array of CSPerson objects representing the content of the Bcc: field in an email message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/hiddenAdditionalRecipients

func (CSSearchableItemAttributeSet) ISOSpeed

The ISO speed setting at the time the camera captured the image.

Discussion

Typical ISO speed values are 100, 200, 400, and so on.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/isoSpeed

func (CSSearchableItemAttributeSet) Identifier

func (c CSSearchableItemAttributeSet) Identifier() string

A formal identifier that references the document the item represents.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/identifier

func (CSSearchableItemAttributeSet) ImageDirection

The direction of the item’s image in degrees from true north.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/imageDirection

func (CSSearchableItemAttributeSet) ImportantDates

func (c CSSearchableItemAttributeSet) ImportantDates() []foundation.NSDate

An array of important dates associated with the item.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/importantDates

func (CSSearchableItemAttributeSet) Information

func (c CSSearchableItemAttributeSet) Information() string

Information about the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/information

func (CSSearchableItemAttributeSet) Init

Init initializes the instance.

func (CSSearchableItemAttributeSet) InitWithContentType

Creates an attribute set for the specified content type.

contentType: The type of the content. For example, png or movie.

Return Value

An attribute set that represents an item of the specified content type.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/init(contentType:)

func (CSSearchableItemAttributeSet) InstantMessageAddresses

func (c CSSearchableItemAttributeSet) InstantMessageAddresses() []string

An array of instant message addresses for the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/instantMessageAddresses

func (CSSearchableItemAttributeSet) Instructions

func (c CSSearchableItemAttributeSet) Instructions() string

Instructions that concern the use of the item, such as an embargo or warning.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/instructions

func (CSSearchableItemAttributeSet) IsPriority

A Boolean value that indicates whether the mail or messages content represents a prioritized item.

Discussion

When the value of this property is `1`, Apple Intelligence identified this email or message content as needing priority classification.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/isPriority

func (CSSearchableItemAttributeSet) KeySignature

func (c CSSearchableItemAttributeSet) KeySignature() string

The musical key of the song or audio composition that the file contains, such as C, Dm, or F#m.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/keySignature

func (CSSearchableItemAttributeSet) Keywords

func (c CSSearchableItemAttributeSet) Keywords() []string

An array of keywords associated with the item, such as work, birthday, important, and so on.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/keywords

func (CSSearchableItemAttributeSet) Kind

A description of the kind of document the item represents.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/kind

func (CSSearchableItemAttributeSet) Languages

func (c CSSearchableItemAttributeSet) Languages() []string

A list of the included languages for the intellectual content of the media.

Discussion

See BCP 47 for best practices in using language tags.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/languages

func (CSSearchableItemAttributeSet) LastUsedDate

The date on which the file was last used.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/lastUsedDate

func (CSSearchableItemAttributeSet) Latitude

The latitude of the item, in degrees north of the equator, expressed using the WGS84 datum.

Discussion

Negative values lie south of the equator.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/latitude

func (CSSearchableItemAttributeSet) LayerNames

func (c CSSearchableItemAttributeSet) LayerNames() []string

An array that contains the names of the various layers in the file.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/layerNames

func (CSSearchableItemAttributeSet) LensModel

func (c CSSearchableItemAttributeSet) LensModel() string

The model of the lens that captured the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/lensModel

func (CSSearchableItemAttributeSet) LikelyJunk

A value that indicates if the message is likely to be considered junk.

Discussion

When the value of this property is 1, the message is likely to be considered junk; when the value is 0, the message is not likely to be considered junk.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/likelyJunk

func (CSSearchableItemAttributeSet) Local

A value that indicates if the media is local.

Discussion

When the value of this property is 1, the media is local; when the value is 0, the media is not local.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/local

func (CSSearchableItemAttributeSet) Longitude

The longitude of the item, in degrees east of the prime meridian, expressed using the WGS84 datum.

Discussion

Negative values lie west of the prime meridian.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/longitude

func (CSSearchableItemAttributeSet) Lyricist

func (c CSSearchableItemAttributeSet) Lyricist() string

The lyricist or text writer for the song or audio composition that the file contains.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/lyricist

func (CSSearchableItemAttributeSet) MailboxIdentifiers

func (c CSSearchableItemAttributeSet) MailboxIdentifiers() []string

An array of mailbox identifiers associated with the message.

Discussion

Can include CSMailboxInbox, CSMailboxDrafts, CSMailboxSent, or a custom identifier.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/mailboxIdentifiers

func (CSSearchableItemAttributeSet) MaxAperture

The smallest F number of the lens.

Discussion

The unit of the F number is the APEX value, which is typically in the range of 00.00 to 99.99.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/maxAperture

func (CSSearchableItemAttributeSet) MediaTypes

func (c CSSearchableItemAttributeSet) MediaTypes() []string

The media types present in the content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/mediaTypes

func (CSSearchableItemAttributeSet) MetadataModificationDate

func (c CSSearchableItemAttributeSet) MetadataModificationDate() foundation.NSDate

The date on which the last metadata attribute was changed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/metadataModificationDate

func (CSSearchableItemAttributeSet) MusicalGenre

func (c CSSearchableItemAttributeSet) MusicalGenre() string

The musical genre of the song or audio composition that the file contains, such as jazz, pop, rock, or classical.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/musicalGenre

func (CSSearchableItemAttributeSet) MusicalInstrumentCategory

func (c CSSearchableItemAttributeSet) MusicalInstrumentCategory() string

The category of the instrument associated with the audio file.

Discussion

A file should specify an associated instrument (note that you can use “Other Instrument” to specify an unknown instrument). In some categories, you can use instrument names to provide a more detailed instrument definition. For example, the Keyboards category lets you include instrument names such as Piano or Organ.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/musicalInstrumentCategory

func (CSSearchableItemAttributeSet) MusicalInstrumentName

func (c CSSearchableItemAttributeSet) MusicalInstrumentName() string

The name of an instrument within the context of an instrument category.

Discussion

For some instrument categories, such as Percussion and Keyboards, you can specify an instrument name.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/musicalInstrumentName

func (CSSearchableItemAttributeSet) NamedLocation

func (c CSSearchableItemAttributeSet) NamedLocation() string

The name of the location or point of interest associated with the item.

Discussion

The name may be user-provided.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/namedLocation

func (CSSearchableItemAttributeSet) Organizations

func (c CSSearchableItemAttributeSet) Organizations() []string

A list of companies or organizations that created the content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/organizations

func (CSSearchableItemAttributeSet) Orientation

The orientation of the data.

Discussion

When the value of this property is 1, the orientation is portrait; when the value is 0, the orientation is landscape.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/orientation

func (CSSearchableItemAttributeSet) OriginalFormat

func (c CSSearchableItemAttributeSet) OriginalFormat() string

The original format of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/originalFormat

func (CSSearchableItemAttributeSet) OriginalSource

func (c CSSearchableItemAttributeSet) OriginalSource() string

The original source of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/originalSource

func (CSSearchableItemAttributeSet) PageCount

The number of pages in the document.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pageCount

func (CSSearchableItemAttributeSet) PageHeight

The height of the document page, in points (72 points per inch).

Discussion

For a PDF document, this property specifies the height of the first page only; other pages in a PDF document may have different heights.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pageHeight

func (CSSearchableItemAttributeSet) PageWidth

The width of the document page, in points (72 points per inch).

Discussion

For a PDF document, this property specifies the width of the first page only; other pages in a PDF document may have different widths.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pageWidth

func (CSSearchableItemAttributeSet) Participants

func (c CSSearchableItemAttributeSet) Participants() []string

A list of people who are visible in an image or movie or written about in a document.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/participants

func (CSSearchableItemAttributeSet) Path

The complete path to the item.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/path

func (CSSearchableItemAttributeSet) Performers

func (c CSSearchableItemAttributeSet) Performers() []string

A list of performers in the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/performers

func (CSSearchableItemAttributeSet) PhoneNumbers

func (c CSSearchableItemAttributeSet) PhoneNumbers() []string

An array of phone numbers associated with the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/phoneNumbers

func (CSSearchableItemAttributeSet) PixelCount

The total number of pixels in the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pixelCount

func (CSSearchableItemAttributeSet) PixelHeight

The height of the item, such as image or video frame height, in pixels.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pixelHeight

func (CSSearchableItemAttributeSet) PixelWidth

The width of the item, such as image or video frame width, in pixels.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/pixelWidth

func (CSSearchableItemAttributeSet) PlayCount

A user-supplied play count for the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/playCount

func (CSSearchableItemAttributeSet) PostalCode

func (c CSSearchableItemAttributeSet) PostalCode() string

The postal code for the item according to guidelines the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/postalCode

func (CSSearchableItemAttributeSet) PrimaryRecipients

func (c CSSearchableItemAttributeSet) PrimaryRecipients() []CSPerson

An array of CSPerson objects representing the content of the To: field in an email message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/primaryRecipients

func (CSSearchableItemAttributeSet) Producer

func (c CSSearchableItemAttributeSet) Producer() string

The producer of the content.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/producer

func (CSSearchableItemAttributeSet) ProfileName

func (c CSSearchableItemAttributeSet) ProfileName() string

The name of the color profile the camera used for the image.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/profileName

func (CSSearchableItemAttributeSet) Projects

func (c CSSearchableItemAttributeSet) Projects() []string

A list of projects of which this file is a part.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/projects

func (CSSearchableItemAttributeSet) ProviderDataTypeIdentifiers

func (c CSSearchableItemAttributeSet) ProviderDataTypeIdentifiers() []string

An array of identifiers that corresponds to data representations the delegate provides.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/providerDataTypeIdentifiers

func (CSSearchableItemAttributeSet) ProviderFileTypeIdentifiers

func (c CSSearchableItemAttributeSet) ProviderFileTypeIdentifiers() []string

An array of identifiers that corresponds to file representations the delegate provides.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/providerFileTypeIdentifiers

func (CSSearchableItemAttributeSet) ProviderInPlaceFileTypeIdentifiers

func (c CSSearchableItemAttributeSet) ProviderInPlaceFileTypeIdentifiers() []string

An array of identifiers that corresponds to in-place file representations the delegate provides.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/providerInPlaceFileTypeIdentifiers

func (CSSearchableItemAttributeSet) Publishers

func (c CSSearchableItemAttributeSet) Publishers() []string

A list of people, organizations, services, or other entities responsible for making the media available.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/publishers

func (CSSearchableItemAttributeSet) RankingHint

A number that indicates the relative importance of the item among other items from the app.

Discussion

Core Spotlight uses this value to distinguish between similar items from an app’s indexed content. Set this property to an integer value between zero and one hundred. Higher values indicate an item is more relevant, and Spotlight may display it more prominently.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/rankingHint

func (CSSearchableItemAttributeSet) Rating

The user-supplied rating of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/rating

func (CSSearchableItemAttributeSet) RatingDescription

func (c CSSearchableItemAttributeSet) RatingDescription() string

A description of the rating.

Discussion

For example, the description might include the number of reviewers who provided ratings.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/ratingDescription

func (CSSearchableItemAttributeSet) RecipientAddresses

func (c CSSearchableItemAttributeSet) RecipientAddresses() []string

An array of addresses associated with the recipients of the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/recipientAddresses

func (CSSearchableItemAttributeSet) RecipientEmailAddresses

func (c CSSearchableItemAttributeSet) RecipientEmailAddresses() []string

An array of email addresses associated with the recipient.

Discussion

The contents of this property is not human readable.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/recipientEmailAddresses

func (CSSearchableItemAttributeSet) RecipientNames

func (c CSSearchableItemAttributeSet) RecipientNames() []string

An array of names representing the recipients of this message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/recipientNames

func (CSSearchableItemAttributeSet) RecordingDate

The recording date of the song or composition.

Discussion

This property contains the original recording date of the song or composition and is supplementary to CSSearchableItemAttributeSet.ContentCreationDate, which indicates the date of an edited or optimized version.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/recordingDate

func (CSSearchableItemAttributeSet) RedEyeOn

A value that indicates if the camera used red-eye reduction when capturing the image.

Discussion

When the value of this property is 0, no red-eye reduction was used; when the value is 1, red-eye reduction was used.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/redEyeOn

func (CSSearchableItemAttributeSet) RelatedUniqueIdentifier

func (c CSSearchableItemAttributeSet) RelatedUniqueIdentifier() string

The unique identifier for the item to which the activity is related.

Discussion

If you’re using both NSUserActivity and Core Spotlight APIs to index the same item, set this property in the activity to specify the unique identifier of the Core Spotlight item to which the activity is related, and to avoid displaying duplicate results in Spotlight.

If the unique identifier to which the activity is related hasn’t already been indexed with Core Spotlight, the activity won’t be indexed. Note that when the item is deleted, the related activity is also deleted, unlike the behavior of CSSearchableItemAttributeSet.WeakRelatedUniqueIdentifier.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/relatedUniqueIdentifier

func (CSSearchableItemAttributeSet) ResolutionHeightDPI

func (c CSSearchableItemAttributeSet) ResolutionHeightDPI() foundation.NSNumber

The resolution height of the image, in DPI.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/resolutionHeightDPI

func (CSSearchableItemAttributeSet) ResolutionWidthDPI

func (c CSSearchableItemAttributeSet) ResolutionWidthDPI() foundation.NSNumber

The resolution width of the image, in DPI.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/resolutionWidthDPI

func (CSSearchableItemAttributeSet) Rights

A link to information about the rights held in and over the media.

Discussion

Typically, this property contains a rights management statement for the media, or references a service that provides such information. Rights information often encompasses Intellectual Property Rights (IPR), copyright, and various property rights. If the `rights` property is absent, no assumptions can be made about the status of these and other rights with respect to the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/rights

func (CSSearchableItemAttributeSet) Role

Indicates the role of the content creator.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/role

func (CSSearchableItemAttributeSet) SecurityMethod

func (c CSSearchableItemAttributeSet) SecurityMethod() string

The security method (a type of encryption) that protects the document file.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/securityMethod

func (CSSearchableItemAttributeSet) SetAccountHandles

func (c CSSearchableItemAttributeSet) SetAccountHandles(value []string)

func (CSSearchableItemAttributeSet) SetAccountIdentifier

func (c CSSearchableItemAttributeSet) SetAccountIdentifier(value string)

func (CSSearchableItemAttributeSet) SetAcquisitionMake

func (c CSSearchableItemAttributeSet) SetAcquisitionMake(value string)

func (CSSearchableItemAttributeSet) SetAcquisitionModel

func (c CSSearchableItemAttributeSet) SetAcquisitionModel(value string)

func (CSSearchableItemAttributeSet) SetAddedDate

func (c CSSearchableItemAttributeSet) SetAddedDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetAdditionalRecipients

func (c CSSearchableItemAttributeSet) SetAdditionalRecipients(value []CSPerson)

func (CSSearchableItemAttributeSet) SetAlbum

func (c CSSearchableItemAttributeSet) SetAlbum(value string)

func (CSSearchableItemAttributeSet) SetAllDay

func (CSSearchableItemAttributeSet) SetAlternateNames

func (c CSSearchableItemAttributeSet) SetAlternateNames(value []string)

func (CSSearchableItemAttributeSet) SetAltitude

func (c CSSearchableItemAttributeSet) SetAltitude(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetAperture

func (c CSSearchableItemAttributeSet) SetAperture(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetArtist

func (c CSSearchableItemAttributeSet) SetArtist(value string)

func (CSSearchableItemAttributeSet) SetAudiences

func (c CSSearchableItemAttributeSet) SetAudiences(value []string)

func (CSSearchableItemAttributeSet) SetAudioBitRate

func (c CSSearchableItemAttributeSet) SetAudioBitRate(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetAudioChannelCount

func (c CSSearchableItemAttributeSet) SetAudioChannelCount(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetAudioEncodingApplication

func (c CSSearchableItemAttributeSet) SetAudioEncodingApplication(value string)

func (CSSearchableItemAttributeSet) SetAudioSampleRate

func (c CSSearchableItemAttributeSet) SetAudioSampleRate(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetAudioTrackNumber

func (c CSSearchableItemAttributeSet) SetAudioTrackNumber(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetAuthorAddresses

func (c CSSearchableItemAttributeSet) SetAuthorAddresses(value []string)

func (CSSearchableItemAttributeSet) SetAuthorEmailAddresses

func (c CSSearchableItemAttributeSet) SetAuthorEmailAddresses(value []string)

func (CSSearchableItemAttributeSet) SetAuthorNames

func (c CSSearchableItemAttributeSet) SetAuthorNames(value []string)

func (CSSearchableItemAttributeSet) SetAuthors

func (c CSSearchableItemAttributeSet) SetAuthors(value []CSPerson)

func (CSSearchableItemAttributeSet) SetBitsPerSample

func (c CSSearchableItemAttributeSet) SetBitsPerSample(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetCameraOwner

func (c CSSearchableItemAttributeSet) SetCameraOwner(value string)

func (CSSearchableItemAttributeSet) SetCity

func (c CSSearchableItemAttributeSet) SetCity(value string)

func (CSSearchableItemAttributeSet) SetCodecs

func (c CSSearchableItemAttributeSet) SetCodecs(value []string)

func (CSSearchableItemAttributeSet) SetColorSpace

func (c CSSearchableItemAttributeSet) SetColorSpace(value string)

func (CSSearchableItemAttributeSet) SetComment

func (c CSSearchableItemAttributeSet) SetComment(value string)

func (CSSearchableItemAttributeSet) SetCompletionDate

func (c CSSearchableItemAttributeSet) SetCompletionDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetComposer

func (c CSSearchableItemAttributeSet) SetComposer(value string)

func (CSSearchableItemAttributeSet) SetContactKeywords

func (c CSSearchableItemAttributeSet) SetContactKeywords(value []string)

func (CSSearchableItemAttributeSet) SetContainerDisplayName

func (c CSSearchableItemAttributeSet) SetContainerDisplayName(value string)

func (CSSearchableItemAttributeSet) SetContainerIdentifier

func (c CSSearchableItemAttributeSet) SetContainerIdentifier(value string)

func (CSSearchableItemAttributeSet) SetContainerOrder

func (c CSSearchableItemAttributeSet) SetContainerOrder(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetContainerTitle

func (c CSSearchableItemAttributeSet) SetContainerTitle(value string)

func (CSSearchableItemAttributeSet) SetContentCreationDate

func (c CSSearchableItemAttributeSet) SetContentCreationDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetContentDescription

func (c CSSearchableItemAttributeSet) SetContentDescription(value string)

func (CSSearchableItemAttributeSet) SetContentModificationDate

func (c CSSearchableItemAttributeSet) SetContentModificationDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetContentRating

func (c CSSearchableItemAttributeSet) SetContentRating(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetContentSources

func (c CSSearchableItemAttributeSet) SetContentSources(value []string)

func (CSSearchableItemAttributeSet) SetContentType

func (c CSSearchableItemAttributeSet) SetContentType(value string)

func (CSSearchableItemAttributeSet) SetContentTypeTree

func (c CSSearchableItemAttributeSet) SetContentTypeTree(value []string)

func (CSSearchableItemAttributeSet) SetContentURL

func (c CSSearchableItemAttributeSet) SetContentURL(value foundation.NSURL)

func (CSSearchableItemAttributeSet) SetContributors

func (c CSSearchableItemAttributeSet) SetContributors(value []string)

func (CSSearchableItemAttributeSet) SetCopyright

func (c CSSearchableItemAttributeSet) SetCopyright(value string)

func (CSSearchableItemAttributeSet) SetCountry

func (c CSSearchableItemAttributeSet) SetCountry(value string)

func (CSSearchableItemAttributeSet) SetCoverage

func (c CSSearchableItemAttributeSet) SetCoverage(value []string)

func (CSSearchableItemAttributeSet) SetCreator

func (c CSSearchableItemAttributeSet) SetCreator(value string)

func (CSSearchableItemAttributeSet) SetDarkThumbnailURL

func (c CSSearchableItemAttributeSet) SetDarkThumbnailURL(value foundation.NSURL)

func (CSSearchableItemAttributeSet) SetDeliveryType

func (c CSSearchableItemAttributeSet) SetDeliveryType(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetDirector

func (c CSSearchableItemAttributeSet) SetDirector(value string)

func (CSSearchableItemAttributeSet) SetDisplayName

func (c CSSearchableItemAttributeSet) SetDisplayName(value string)

func (CSSearchableItemAttributeSet) SetDomainIdentifier

func (c CSSearchableItemAttributeSet) SetDomainIdentifier(value string)

func (CSSearchableItemAttributeSet) SetDownloadedDate

func (c CSSearchableItemAttributeSet) SetDownloadedDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetDueDate

func (c CSSearchableItemAttributeSet) SetDueDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetDuration

func (c CSSearchableItemAttributeSet) SetDuration(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetEXIFGPSVersion

func (c CSSearchableItemAttributeSet) SetEXIFGPSVersion(value string)

func (CSSearchableItemAttributeSet) SetEXIFVersion

func (c CSSearchableItemAttributeSet) SetEXIFVersion(value string)

func (CSSearchableItemAttributeSet) SetEditors

func (c CSSearchableItemAttributeSet) SetEditors(value []string)

func (CSSearchableItemAttributeSet) SetEmailAddresses

func (c CSSearchableItemAttributeSet) SetEmailAddresses(value []string)

func (CSSearchableItemAttributeSet) SetEmailHeaders

func (c CSSearchableItemAttributeSet) SetEmailHeaders(value foundation.INSDictionary)

func (CSSearchableItemAttributeSet) SetEncodingApplications

func (c CSSearchableItemAttributeSet) SetEncodingApplications(value []string)

func (CSSearchableItemAttributeSet) SetEndDate

func (c CSSearchableItemAttributeSet) SetEndDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetExposureMode

func (c CSSearchableItemAttributeSet) SetExposureMode(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetExposureProgram

func (c CSSearchableItemAttributeSet) SetExposureProgram(value string)

func (CSSearchableItemAttributeSet) SetExposureTime

func (c CSSearchableItemAttributeSet) SetExposureTime(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetExposureTimeString

func (c CSSearchableItemAttributeSet) SetExposureTimeString(value string)

func (CSSearchableItemAttributeSet) SetFNumber

func (c CSSearchableItemAttributeSet) SetFNumber(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetFileSize

func (c CSSearchableItemAttributeSet) SetFileSize(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetFlashOn

func (c CSSearchableItemAttributeSet) SetFlashOn(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetFocalLength

func (c CSSearchableItemAttributeSet) SetFocalLength(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetFocalLength35mm

func (c CSSearchableItemAttributeSet) SetFocalLength35mm(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetFontNames

func (c CSSearchableItemAttributeSet) SetFontNames(value []string)

func (CSSearchableItemAttributeSet) SetFullyFormattedAddress

func (c CSSearchableItemAttributeSet) SetFullyFormattedAddress(value string)

func (CSSearchableItemAttributeSet) SetGPSAreaInformation

func (c CSSearchableItemAttributeSet) SetGPSAreaInformation(value string)

func (CSSearchableItemAttributeSet) SetGPSDOP

func (CSSearchableItemAttributeSet) SetGPSDateStamp

func (c CSSearchableItemAttributeSet) SetGPSDateStamp(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetGPSDestBearing

func (c CSSearchableItemAttributeSet) SetGPSDestBearing(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGPSDestDistance

func (c CSSearchableItemAttributeSet) SetGPSDestDistance(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGPSDestLatitude

func (c CSSearchableItemAttributeSet) SetGPSDestLatitude(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGPSDestLongitude

func (c CSSearchableItemAttributeSet) SetGPSDestLongitude(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGPSDifferental

func (c CSSearchableItemAttributeSet) SetGPSDifferental(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGPSMapDatum

func (c CSSearchableItemAttributeSet) SetGPSMapDatum(value string)

func (CSSearchableItemAttributeSet) SetGPSMeasureMode

func (c CSSearchableItemAttributeSet) SetGPSMeasureMode(value string)

func (CSSearchableItemAttributeSet) SetGPSProcessingMethod

func (c CSSearchableItemAttributeSet) SetGPSProcessingMethod(value string)

func (CSSearchableItemAttributeSet) SetGPSStatus

func (c CSSearchableItemAttributeSet) SetGPSStatus(value string)

func (CSSearchableItemAttributeSet) SetGPSTrack

func (c CSSearchableItemAttributeSet) SetGPSTrack(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGeneralMIDISequence

func (c CSSearchableItemAttributeSet) SetGeneralMIDISequence(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetGenre

func (c CSSearchableItemAttributeSet) SetGenre(value string)

func (CSSearchableItemAttributeSet) SetHTMLContentData

func (c CSSearchableItemAttributeSet) SetHTMLContentData(value foundation.NSData)

func (CSSearchableItemAttributeSet) SetHasAlphaChannel

func (c CSSearchableItemAttributeSet) SetHasAlphaChannel(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetHeadline

func (c CSSearchableItemAttributeSet) SetHeadline(value string)

func (CSSearchableItemAttributeSet) SetHiddenAdditionalRecipients

func (c CSSearchableItemAttributeSet) SetHiddenAdditionalRecipients(value []CSPerson)

func (CSSearchableItemAttributeSet) SetISOSpeed

func (c CSSearchableItemAttributeSet) SetISOSpeed(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetIdentifier

func (c CSSearchableItemAttributeSet) SetIdentifier(value string)

func (CSSearchableItemAttributeSet) SetImageDirection

func (c CSSearchableItemAttributeSet) SetImageDirection(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetImportantDates

func (c CSSearchableItemAttributeSet) SetImportantDates(value []foundation.NSDate)

func (CSSearchableItemAttributeSet) SetInformation

func (c CSSearchableItemAttributeSet) SetInformation(value string)

func (CSSearchableItemAttributeSet) SetInstantMessageAddresses

func (c CSSearchableItemAttributeSet) SetInstantMessageAddresses(value []string)

func (CSSearchableItemAttributeSet) SetInstructions

func (c CSSearchableItemAttributeSet) SetInstructions(value string)

func (CSSearchableItemAttributeSet) SetKeySignature

func (c CSSearchableItemAttributeSet) SetKeySignature(value string)

func (CSSearchableItemAttributeSet) SetKeywords

func (c CSSearchableItemAttributeSet) SetKeywords(value []string)

func (CSSearchableItemAttributeSet) SetKind

func (c CSSearchableItemAttributeSet) SetKind(value string)

func (CSSearchableItemAttributeSet) SetLanguages

func (c CSSearchableItemAttributeSet) SetLanguages(value []string)

func (CSSearchableItemAttributeSet) SetLastUsedDate

func (c CSSearchableItemAttributeSet) SetLastUsedDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetLatitude

func (c CSSearchableItemAttributeSet) SetLatitude(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetLayerNames

func (c CSSearchableItemAttributeSet) SetLayerNames(value []string)

func (CSSearchableItemAttributeSet) SetLensModel

func (c CSSearchableItemAttributeSet) SetLensModel(value string)

func (CSSearchableItemAttributeSet) SetLikelyJunk

func (c CSSearchableItemAttributeSet) SetLikelyJunk(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetLocal

func (CSSearchableItemAttributeSet) SetLongitude

func (c CSSearchableItemAttributeSet) SetLongitude(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetLyricist

func (c CSSearchableItemAttributeSet) SetLyricist(value string)

func (CSSearchableItemAttributeSet) SetMailboxIdentifiers

func (c CSSearchableItemAttributeSet) SetMailboxIdentifiers(value []string)

func (CSSearchableItemAttributeSet) SetMaxAperture

func (c CSSearchableItemAttributeSet) SetMaxAperture(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetMediaTypes

func (c CSSearchableItemAttributeSet) SetMediaTypes(value []string)

func (CSSearchableItemAttributeSet) SetMetadataModificationDate

func (c CSSearchableItemAttributeSet) SetMetadataModificationDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetMeteringMode

func (c CSSearchableItemAttributeSet) SetMeteringMode(value string)

func (CSSearchableItemAttributeSet) SetMusicalGenre

func (c CSSearchableItemAttributeSet) SetMusicalGenre(value string)

func (CSSearchableItemAttributeSet) SetMusicalInstrumentCategory

func (c CSSearchableItemAttributeSet) SetMusicalInstrumentCategory(value string)

func (CSSearchableItemAttributeSet) SetMusicalInstrumentName

func (c CSSearchableItemAttributeSet) SetMusicalInstrumentName(value string)

func (CSSearchableItemAttributeSet) SetNamedLocation

func (c CSSearchableItemAttributeSet) SetNamedLocation(value string)

func (CSSearchableItemAttributeSet) SetOrganizations

func (c CSSearchableItemAttributeSet) SetOrganizations(value []string)

func (CSSearchableItemAttributeSet) SetOrientation

func (c CSSearchableItemAttributeSet) SetOrientation(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetOriginalFormat

func (c CSSearchableItemAttributeSet) SetOriginalFormat(value string)

func (CSSearchableItemAttributeSet) SetOriginalSource

func (c CSSearchableItemAttributeSet) SetOriginalSource(value string)

func (CSSearchableItemAttributeSet) SetPageCount

func (c CSSearchableItemAttributeSet) SetPageCount(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPageHeight

func (c CSSearchableItemAttributeSet) SetPageHeight(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPageWidth

func (c CSSearchableItemAttributeSet) SetPageWidth(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetParticipants

func (c CSSearchableItemAttributeSet) SetParticipants(value []string)

func (CSSearchableItemAttributeSet) SetPath

func (c CSSearchableItemAttributeSet) SetPath(value string)

func (CSSearchableItemAttributeSet) SetPerformers

func (c CSSearchableItemAttributeSet) SetPerformers(value []string)

func (CSSearchableItemAttributeSet) SetPhoneNumbers

func (c CSSearchableItemAttributeSet) SetPhoneNumbers(value []string)

func (CSSearchableItemAttributeSet) SetPixelCount

func (c CSSearchableItemAttributeSet) SetPixelCount(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPixelHeight

func (c CSSearchableItemAttributeSet) SetPixelHeight(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPixelWidth

func (c CSSearchableItemAttributeSet) SetPixelWidth(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPlayCount

func (c CSSearchableItemAttributeSet) SetPlayCount(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetPostalCode

func (c CSSearchableItemAttributeSet) SetPostalCode(value string)

func (CSSearchableItemAttributeSet) SetPrimaryRecipients

func (c CSSearchableItemAttributeSet) SetPrimaryRecipients(value []CSPerson)

func (CSSearchableItemAttributeSet) SetProducer

func (c CSSearchableItemAttributeSet) SetProducer(value string)

func (CSSearchableItemAttributeSet) SetProfileName

func (c CSSearchableItemAttributeSet) SetProfileName(value string)

func (CSSearchableItemAttributeSet) SetProjects

func (c CSSearchableItemAttributeSet) SetProjects(value []string)

func (CSSearchableItemAttributeSet) SetProviderDataTypeIdentifiers

func (c CSSearchableItemAttributeSet) SetProviderDataTypeIdentifiers(value []string)

func (CSSearchableItemAttributeSet) SetProviderFileTypeIdentifiers

func (c CSSearchableItemAttributeSet) SetProviderFileTypeIdentifiers(value []string)

func (CSSearchableItemAttributeSet) SetProviderInPlaceFileTypeIdentifiers

func (c CSSearchableItemAttributeSet) SetProviderInPlaceFileTypeIdentifiers(value []string)

func (CSSearchableItemAttributeSet) SetPublishers

func (c CSSearchableItemAttributeSet) SetPublishers(value []string)

func (CSSearchableItemAttributeSet) SetRankingHint

func (c CSSearchableItemAttributeSet) SetRankingHint(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetRating

func (CSSearchableItemAttributeSet) SetRatingDescription

func (c CSSearchableItemAttributeSet) SetRatingDescription(value string)

func (CSSearchableItemAttributeSet) SetRecipientAddresses

func (c CSSearchableItemAttributeSet) SetRecipientAddresses(value []string)

func (CSSearchableItemAttributeSet) SetRecipientEmailAddresses

func (c CSSearchableItemAttributeSet) SetRecipientEmailAddresses(value []string)

func (CSSearchableItemAttributeSet) SetRecipientNames

func (c CSSearchableItemAttributeSet) SetRecipientNames(value []string)

func (CSSearchableItemAttributeSet) SetRecordingDate

func (c CSSearchableItemAttributeSet) SetRecordingDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetRedEyeOn

func (c CSSearchableItemAttributeSet) SetRedEyeOn(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetRelatedUniqueIdentifier

func (c CSSearchableItemAttributeSet) SetRelatedUniqueIdentifier(value string)

func (CSSearchableItemAttributeSet) SetResolutionHeightDPI

func (c CSSearchableItemAttributeSet) SetResolutionHeightDPI(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetResolutionWidthDPI

func (c CSSearchableItemAttributeSet) SetResolutionWidthDPI(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetRights

func (c CSSearchableItemAttributeSet) SetRights(value string)

func (CSSearchableItemAttributeSet) SetRole

func (c CSSearchableItemAttributeSet) SetRole(value string)

func (CSSearchableItemAttributeSet) SetSecurityMethod

func (c CSSearchableItemAttributeSet) SetSecurityMethod(value string)

func (CSSearchableItemAttributeSet) SetSpeed

func (CSSearchableItemAttributeSet) SetStartDate

func (c CSSearchableItemAttributeSet) SetStartDate(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetStateOrProvince

func (c CSSearchableItemAttributeSet) SetStateOrProvince(value string)

func (CSSearchableItemAttributeSet) SetStreamable

func (c CSSearchableItemAttributeSet) SetStreamable(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetSubThoroughfare

func (c CSSearchableItemAttributeSet) SetSubThoroughfare(value string)

func (CSSearchableItemAttributeSet) SetSubject

func (c CSSearchableItemAttributeSet) SetSubject(value string)

func (CSSearchableItemAttributeSet) SetSupportsNavigation

func (c CSSearchableItemAttributeSet) SetSupportsNavigation(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetSupportsPhoneCall

func (c CSSearchableItemAttributeSet) SetSupportsPhoneCall(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetTempo

func (CSSearchableItemAttributeSet) SetTextContent

func (c CSSearchableItemAttributeSet) SetTextContent(value string)

func (CSSearchableItemAttributeSet) SetTheme

func (c CSSearchableItemAttributeSet) SetTheme(value string)

func (CSSearchableItemAttributeSet) SetThoroughfare

func (c CSSearchableItemAttributeSet) SetThoroughfare(value string)

func (CSSearchableItemAttributeSet) SetThumbnailData

func (c CSSearchableItemAttributeSet) SetThumbnailData(value foundation.NSData)

func (CSSearchableItemAttributeSet) SetThumbnailURL

func (c CSSearchableItemAttributeSet) SetThumbnailURL(value foundation.NSURL)

func (CSSearchableItemAttributeSet) SetTimeSignature

func (c CSSearchableItemAttributeSet) SetTimeSignature(value string)

func (CSSearchableItemAttributeSet) SetTimestamp

func (c CSSearchableItemAttributeSet) SetTimestamp(value foundation.NSDate)

func (CSSearchableItemAttributeSet) SetTitle

func (c CSSearchableItemAttributeSet) SetTitle(value string)

func (CSSearchableItemAttributeSet) SetTotalBitRate

func (c CSSearchableItemAttributeSet) SetTotalBitRate(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetTranscribedTextContent

func (c CSSearchableItemAttributeSet) SetTranscribedTextContent(value string)

func (CSSearchableItemAttributeSet) SetURL

func (CSSearchableItemAttributeSet) SetUserCreated

func (c CSSearchableItemAttributeSet) SetUserCreated(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetUserCurated

func (c CSSearchableItemAttributeSet) SetUserCurated(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetUserOwned

func (c CSSearchableItemAttributeSet) SetUserOwned(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetValueForCustomKey

Sets the value for a custom attribute key.

value: The value of the custom attribute. Values must be common property list types, such as NSString, NSNumber, NSNull, NSData, or NSDate, or an array of property list types.

key: The custom attribute key.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/setValue(_:forCustomKey:)

func (CSSearchableItemAttributeSet) SetVersion

func (c CSSearchableItemAttributeSet) SetVersion(value string)

func (CSSearchableItemAttributeSet) SetVideoBitRate

func (c CSSearchableItemAttributeSet) SetVideoBitRate(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) SetWeakRelatedUniqueIdentifier

func (c CSSearchableItemAttributeSet) SetWeakRelatedUniqueIdentifier(value string)

func (CSSearchableItemAttributeSet) SetWhiteBalance

func (c CSSearchableItemAttributeSet) SetWhiteBalance(value foundation.NSNumber)

func (CSSearchableItemAttributeSet) Speed

The speed of the item, in kilometers per hour.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/speed

func (CSSearchableItemAttributeSet) StateOrProvince

func (c CSSearchableItemAttributeSet) StateOrProvince() string

The province or state of origin according to guidelines the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/stateOrProvince

func (CSSearchableItemAttributeSet) Streamable

A value that indicates if the content is prepared for streaming.

Discussion

When the value of this property is 0, the content is not prepared for streaming; when the value is 1, it is prepared for streaming.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/streamable

func (CSSearchableItemAttributeSet) SubThoroughfare

func (c CSSearchableItemAttributeSet) SubThoroughfare() string

The sublocation, such as a street number, for the item according to guidelines the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/subThoroughfare

func (CSSearchableItemAttributeSet) Subject

The subject of the document.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/subject

func (CSSearchableItemAttributeSet) SupportsNavigation

func (c CSSearchableItemAttributeSet) SupportsNavigation() foundation.NSNumber

A value that indicates whether the item contains information sufficient to provide navigation to the location it represents.

Discussion

When an item includes CSSearchableItemAttributeSet.Latitude and CSSearchableItemAttributeSet.Longitude properties, these properties can be used for navigation to the location represented by the item. For example, it makes sense to set CSSearchableItemAttributeSet.SupportsNavigation to `1` for an item that represents review for a specific restaurant, but not for an item that represents a photo of a person.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/supportsNavigation

func (CSSearchableItemAttributeSet) SupportsPhoneCall

func (c CSSearchableItemAttributeSet) SupportsPhoneCall() foundation.NSNumber

A value that indicates whether the item contains information sufficient to allow a phone call to a number associated with the item.

Discussion

When an item includes the CSSearchableItemAttributeSet.PhoneNumbers property, the phone number can be used to initiate phone calls. You can use the CSSearchableItemAttributeSet.SupportsPhoneCall property to indicate when making a phone call is appropriate and likely to be a primary action for the user. For example, you might set CSSearchableItemAttributeSet.SupportsPhoneCall to `1` for an item that represents a business, but not for an item that represents an academic paper that lists the phone numbers of the authors or the institution.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/supportsPhoneCall

func (CSSearchableItemAttributeSet) Tempo

The tempo of the music that the audio file contains, in beats per minute.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/tempo

func (CSSearchableItemAttributeSet) TextContent

func (c CSSearchableItemAttributeSet) TextContent() string

The textual content of the message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/textContent

func (CSSearchableItemAttributeSet) TextContentSummary

func (c CSSearchableItemAttributeSet) TextContentSummary() string

A string that presents the Apple Intelligence summarization of the item.

Discussion

This property represents the summary of the text that Apple Intelligence generated.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/textContentSummary

func (CSSearchableItemAttributeSet) Theme

The theme of the document.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/theme

func (CSSearchableItemAttributeSet) Thoroughfare

func (c CSSearchableItemAttributeSet) Thoroughfare() string

The thoroughfare, such as a street name, associated with the location for the item according to guidelines the provider establishes.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/thoroughfare

func (CSSearchableItemAttributeSet) ThumbnailData

Image data that represents the thumbnail of the item.

Discussion

This property is optional. For some guidance on creating a thumbnail image, see Enhance Your Search Results.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/thumbnailData

func (CSSearchableItemAttributeSet) ThumbnailURL

The local file URL of the thumbnail image for the item.

Discussion

This property is optional. Note that the URL needs to point to a local file; it is not a web URL.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/thumbnailURL

func (CSSearchableItemAttributeSet) TimeSignature

func (c CSSearchableItemAttributeSet) TimeSignature() string

The time signature of the musical composition that the audio or MIDI file contains, in a string, such as “4/4” or “7/8”.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/timeSignature

func (CSSearchableItemAttributeSet) Timestamp

The timestamp on the item.

Discussion

The value of this property is generally used to specify the time at which the event captured by the item took place.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/timestamp

func (CSSearchableItemAttributeSet) Title

The title of the item.

Discussion

An item title might be the title of a document or MP3 file or the subject of an email message.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/title

func (CSSearchableItemAttributeSet) TotalBitRate

The total bit rate of the media, combining audio and video.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/totalBitRate

func (CSSearchableItemAttributeSet) TranscribedTextContent

func (c CSSearchableItemAttributeSet) TranscribedTextContent() string

A string that represents the text the system transcribed.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/transcribedTextContent

func (CSSearchableItemAttributeSet) URL

The URL associated with the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/url

func (CSSearchableItemAttributeSet) UserCreated

A value that indicates the user created the item.

Discussion

Examples of items to set this property on include notes and documents that the user creates or modifies.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/userCreated

func (CSSearchableItemAttributeSet) UserCurated

A value that indicates the user selected the item.

Discussion

Examples of items to set this property on include media content the user downloads and websites or news articles the user bookmarks.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/userCurated

func (CSSearchableItemAttributeSet) UserOwned

A value that indicates the user purchased or owns the item.

Discussion

Examples of items to set this property on include songs and movies the user purchases.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/userOwned

func (CSSearchableItemAttributeSet) ValueForCustomKey

Returns the value associated with the specified custom attribute key.

key: The custom attribute key.

Return Value

The value associated with the custom attribute key.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/value(forCustomKey:)

func (CSSearchableItemAttributeSet) Version

A version string associated with the file.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/version

func (CSSearchableItemAttributeSet) VideoBitRate

The video bit rate of the media.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/videoBitRate

func (CSSearchableItemAttributeSet) WeakRelatedUniqueIdentifier

func (c CSSearchableItemAttributeSet) WeakRelatedUniqueIdentifier() string

The unique identifier for the item to which the activity is related, but not linked.

Discussion

Unlike the similar CSSearchableItemAttributeSet.RelatedUniqueIdentifier property, this property does not link the lifetime of the item to the lifetime of the activity. In particular, deleting the item does not delete the activity.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/weakRelatedUniqueIdentifier

func (CSSearchableItemAttributeSet) WhiteBalance

The white balance setting when the camera captured the image.

Discussion

The value of this property is 0 for auto and 1 for manual.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet/whiteBalance

type CSSearchableItemAttributeSetClass

type CSSearchableItemAttributeSetClass struct {
	// contains filtered or unexported fields
}

func GetCSSearchableItemAttributeSetClass

func GetCSSearchableItemAttributeSetClass() CSSearchableItemAttributeSetClass

GetCSSearchableItemAttributeSetClass returns the class object for CSSearchableItemAttributeSet.

func (CSSearchableItemAttributeSetClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSSearchableItemAttributeSetClass) Class

Class returns the underlying Objective-C class pointer.

type CSSearchableItemClass

type CSSearchableItemClass struct {
	// contains filtered or unexported fields
}

func GetCSSearchableItemClass

func GetCSSearchableItemClass() CSSearchableItemClass

GetCSSearchableItemClass returns the class object for CSSearchableItem.

func (CSSearchableItemClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSSearchableItemClass) Class

func (cc CSSearchableItemClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSSearchableItemUpdateListenerOptions

type CSSearchableItemUpdateListenerOptions uint

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem/UpdateListenerOptions-swift.struct

const (
	CSSearchableItemUpdateListenerOptionDefault CSSearchableItemUpdateListenerOptions = 0
	// CSSearchableItemUpdateListenerOptionPriority: A value that describes the listener priority options.
	CSSearchableItemUpdateListenerOptionPriority CSSearchableItemUpdateListenerOptions = 4
	// CSSearchableItemUpdateListenerOptionSummarization: A value that describes the listener summarization options.
	CSSearchableItemUpdateListenerOptionSummarization CSSearchableItemUpdateListenerOptions = 2
)

func (CSSearchableItemUpdateListenerOptions) String

type CSSuggestion

type CSSuggestion struct {
	objectivec.Object
}

The kind of suggestion to use in a query.

Overview

Your app uses CSSuggestion objects to populate a contextual menu of suggestions.

Setting suggestion attributes

Comparing suggestions

Initializers

See: https://developer.apple.com/documentation/CoreSpotlight/CSSuggestion

func CSSuggestionFromID

func CSSuggestionFromID(id objc.ID) CSSuggestion

CSSuggestionFromID constructs a CSSuggestion from an objc.ID.

The kind of suggestion to use in a query.

func NewCSSuggestion

func NewCSSuggestion() CSSuggestion

NewCSSuggestion creates a new CSSuggestion instance.

func (CSSuggestion) Autorelease

func (c CSSuggestion) Autorelease() CSSuggestion

Autorelease adds the receiver to the current autorelease pool.

func (CSSuggestion) Compare

Compares the suggestion with a second specified suggestion.

other: The suggestion to compare to this suggestion.

Return Value

Returns an [NSComparisonResult].

See: https://developer.apple.com/documentation/CoreSpotlight/CSSuggestion/compare(_:)

func (CSSuggestion) EncodeWithCoder

func (c CSSuggestion) EncodeWithCoder(coder foundation.INSCoder)

func (CSSuggestion) Init

func (c CSSuggestion) Init() CSSuggestion

Init initializes the instance.

func (CSSuggestion) LocalizedAttributedSuggestion

func (c CSSuggestion) LocalizedAttributedSuggestion() foundation.NSAttributedString

An attributed string for the localized suggestion.

See: https://developer.apple.com/documentation/corespotlight/cssuggestion/localizedattributedsuggestion-3ssly

func (CSSuggestion) SetLocalizedAttributedSuggestion

func (c CSSuggestion) SetLocalizedAttributedSuggestion(value foundation.NSAttributedString)

type CSSuggestionArrayHandler

type CSSuggestionArrayHandler = func(*[]CSSuggestion)

CSSuggestionArrayHandler is the signature for a completion handler block.

type CSSuggestionClass

type CSSuggestionClass struct {
	// contains filtered or unexported fields
}

func GetCSSuggestionClass

func GetCSSuggestionClass() CSSuggestionClass

GetCSSuggestionClass returns the class object for CSSuggestion.

func (CSSuggestionClass) Alloc

func (cc CSSuggestionClass) Alloc() CSSuggestion

Alloc allocates memory for a new instance of the class.

func (CSSuggestionClass) Class

func (cc CSSuggestionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type CSSuggestionKind

type CSSuggestionKind int

See: https://developer.apple.com/documentation/CoreSpotlight/CSSuggestion/SuggestionKind-swift.enum

const (
	// CSSuggestionKindCustom: Sorts the custom suggestions together.
	CSSuggestionKindCustom CSSuggestionKind = 1
	// CSSuggestionKindDefault: Displays the suggestion normally.
	CSSuggestionKindDefault CSSuggestionKind = 2
	// CSSuggestionKindNone: Blocks the system from displaying the suggestion.
	CSSuggestionKindNone CSSuggestionKind = 0
)

func (CSSuggestionKind) String

func (e CSSuggestionKind) String() string

type CSUserInteraction

type CSUserInteraction int

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/UserInteractionKind

const (
	CSUserInteractionDefault CSUserInteraction = 0
	CSUserInteractionFocus   CSUserInteraction = 1
	CSUserInteractionSelect  CSUserInteraction = 0
)

func (CSUserInteraction) String

func (e CSUserInteraction) String() string

type CSUserQuery

type CSUserQuery struct {
	CSSearchQuery
}

A type you use to initiate searches from your interface and offer suggested text completions.

Overview

A CSUserQuery object provides the back-end support for your app’s search features. Combine this object with your app’s search interface to perform lexical and semantic searches of human-entered search terms. You can configure a query object to return ranked or unranked results. You can also use it to get a list of suggestions to display from your search interface.

When the text in your search control changes, create a query object to begin searching for results based on the current text. You use a query object only once to perform a search. If the text changes again while a previous query is in progress, cancel the old query and execute the new one. For this reason, it’s a good idea to delay the start of each query until there is a sufficient gap between changes.

Configure the query parameters using a CSUserQueryContext object, which you can reuse for multiple queries. The context lets you configure the behavior for ranking results, specify the maximum number of results and suggestions, and filter the results using a predicate string. When you’re ready to start the query, choose one of the following options:

- Get the value of the CSUserQuery.Responses property and iterate over the results. - Configure the CSSearchQuery.FoundItemsHandler property and call [CSUserQuery.Start] to execute the query manually.

Each query runs until Spotlight returns the requested maximum number of results. If you don’t specify the maximum number of results, Spotlight runs until it returns all results. To end a search before you receive all the results, call the [CSUserQuery.Cancel] method. Cancelling a query is especially important if you’re about to start a new query with an updated search string.

For more information about configuring a CSUserQuery object, see Building a search interface for your app.

Creating a user query

Executing the query automatically

Executing the query with handler blocks

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery

func CSUserQueryFromID

func CSUserQueryFromID(id objc.ID) CSUserQuery

CSUserQueryFromID constructs a CSUserQuery from an objc.ID.

A type you use to initiate searches from your interface and offer suggested text completions.

func NewCSUserQuery

func NewCSUserQuery() CSUserQuery

NewCSUserQuery creates a new CSUserQuery instance.

func NewCSUserQueryWithQueryStringQueryContext

func NewCSUserQueryWithQueryStringQueryContext(queryString string, queryContext ICSSearchQueryContext) CSUserQuery

Initializes and returns a query object with the specified query string and query context.

Return Value

An initialized query object.

Discussion

- queryString: A formatted string that defines the matching criteria to apply to indexed items. To learn how to construct a query string, see Create a query string for your search. - This parameter must not be `nil`. - - queryContext: A CSSearchQueryContext object that focuses the query results.

Discussion

After you create and initialize a query object, and call CSSearchQuery.Start to begin the query, you can’t update or reuse the query object for a new query.

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery/init(queryString:queryContext:)

func NewCSUserQueryWithUserQueryStringUserQueryContext

func NewCSUserQueryWithUserQueryStringUserQueryContext(userQueryString string, userQueryContext ICSUserQueryContext) CSUserQuery

Creates a new user query that searches for the specified term.

userQueryString: The term to search for. You may specify an empty string for this parameter.

userQueryContext: A context object with options for how to run the query and generate results.

Return Value

An initialized query object.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/init(userQueryString:userQueryContext:)

func (CSUserQuery) Autorelease

func (c CSUserQuery) Autorelease() CSUserQuery

Autorelease adds the receiver to the current autorelease pool.

func (CSUserQuery) FoundSuggestionCount

func (c CSUserQuery) FoundSuggestionCount() int

The number of suggested items the query found so far.

Discussion

As the query runs, it updates the value in this property to reflect the total number of suggestions.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/foundSuggestionCount

func (CSUserQuery) FoundSuggestionsHandler

func (c CSUserQuery) FoundSuggestionsHandler() CSSuggestionArrayHandler

The block to execute when the query delivers a new batch of suggested items.

Discussion

Specify a value for this property only if you start your query with the [CSUserQuery.Start] method. While the query runs, the query object executes the provided closure one or more times to deliver suggested completions for the current search term. Use your handler to retrieve the suggested completions and update your app’s search interface. The query object stops delivering suggested items when it runs out of suggestions or reaches the maximum number found in the CSUserQueryContext.MaxSuggestionCount property of the query configuration parameters.

If you start the query by accessing the CSUserQuery.Responses property, the query object doesn’t execute the block in this property.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/foundSuggestionsHandler

func (CSUserQuery) Init

func (c CSUserQuery) Init() CSUserQuery

Init initializes the instance.

func (CSUserQuery) InitWithUserQueryStringUserQueryContext

func (c CSUserQuery) InitWithUserQueryStringUserQueryContext(userQueryString string, userQueryContext ICSUserQueryContext) CSUserQuery

Creates a new user query that searches for the specified term.

userQueryString: The term to search for. You may specify an empty string for this parameter.

userQueryContext: A context object with options for how to run the query and generate results.

Return Value

An initialized query object.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/init(userQueryString:userQueryContext:)

func (CSUserQuery) Responses

func (c CSUserQuery) Responses() unsafe.Pointer

The matching results and suggestions for the current query string.

See: https://developer.apple.com/documentation/corespotlight/csuserquery/responses-swift.property

func (CSUserQuery) SetFoundSuggestionsHandler

func (c CSUserQuery) SetFoundSuggestionsHandler(value CSSuggestionArrayHandler)

func (CSUserQuery) SetResponses

func (c CSUserQuery) SetResponses(value unsafe.Pointer)

func (CSUserQuery) SetSuggestions

func (c CSUserQuery) SetSuggestions(value unsafe.Pointer)

func (CSUserQuery) Suggestions

func (c CSUserQuery) Suggestions() unsafe.Pointer

An asynchronous sequence of suggested completions for the current query text.

See: https://developer.apple.com/documentation/corespotlight/csuserquery/suggestions-swift.property

type CSUserQueryClass

type CSUserQueryClass struct {
	// contains filtered or unexported fields
}

func GetCSUserQueryClass

func GetCSUserQueryClass() CSUserQueryClass

GetCSUserQueryClass returns the class object for CSUserQuery.

func (CSUserQueryClass) Alloc

func (cc CSUserQueryClass) Alloc() CSUserQuery

Alloc allocates memory for a new instance of the class.

func (CSUserQueryClass) Class

func (cc CSUserQueryClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (CSUserQueryClass) Prepare

func (_CSUserQueryClass CSUserQueryClass) Prepare()

Performs one-time tasks that prepare Spotlight to search for content in all search indexes.

Discussion

Call this method once during your app’s lifecycle to give Spotlight time to load the resources it needs for search. This preparation comes at a cost, so measure your app’s performance and determine an appropriate time to call it. For example, you might call it when you load an interface that includes search features.

You don’t need to call this method more than once during the lifetime of your app, but it’s safe to call the method multiple times.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/prepare()

func (CSUserQueryClass) PrepareProtectionClasses

func (_CSUserQueryClass CSUserQueryClass) PrepareProtectionClasses(protectionClasses []string)

Performs one-time tasks that prepare Spotlight to search for content in one or more protected search indexes.

protectionClasses: The file protection types associated with the indexes you plan to search.

Discussion

Call this method once during your app’s lifecycle to give Spotlight time to load the resources it needs for search. This method prepares only the indexes that have the specified protetction levels. This preparation comes at a cost, so measure your app’s performance and determine an appropriate time to call it. For example, you might call it when you load an interface that includes search features.

You don’t need to call this method more than once during the lifetime of your app, but it’s safe to call the method multiple times.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery/prepareProtectionClasses(_:)

type CSUserQueryContext

type CSUserQueryContext struct {
	CSSearchQueryContext
}

The configuration details to apply to a user query.

Overview

Use an instance of CSUserQueryContext to configure the search parameters for a CSUserQuery object. This object stores configuration details that the query uses to modify the search results it delivers. For example, use this object to specify the maximum number of results or suggestions you want the query to return. You can also use it to enable or disable the ranking of results by Spotlight.

For information about search filters and other configurable query parameters, see the parent class CSSearchQueryContext.

Configuring search options

Configuring the ranked results behavior

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext

func CSUserQueryContextFromID

func CSUserQueryContextFromID(id objc.ID) CSUserQueryContext

CSUserQueryContextFromID constructs a CSUserQueryContext from an objc.ID.

The configuration details to apply to a user query.

func NewCSUserQueryContext

func NewCSUserQueryContext() CSUserQueryContext

NewCSUserQueryContext creates a new CSUserQueryContext instance.

func NewCSUserQueryContextWithCurrentSuggestion

func NewCSUserQueryContextWithCurrentSuggestion(currentSuggestion ICSSuggestion) CSUserQueryContext

Creates a new query context object with an optional suggested search string.

currentSuggestion: The suggested text completion that the person selected in your interface. Specify `nil` if the person hasn’t chosen a suggestion.

Return Value

An initialized user query context object. Configure the properties of the returned object and use it to construct a CSUserQuery object.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/init(currentSuggestion:)

func (CSUserQueryContext) Autorelease

func (c CSUserQueryContext) Autorelease() CSUserQueryContext

Autorelease adds the receiver to the current autorelease pool.

func (CSUserQueryContext) DisableSemanticSearch

func (c CSUserQueryContext) DisableSemanticSearch() bool

A Boolean value that indicates whether to exclude semantic-based search results from the output.

Discussion

Semantic searching finds matches that are related to the original term, but not necessarily a lexical match. For example, a search for the string “Sun and Moon” might also return a result with a title like “Sol and Luna”. The default value of this property is `true`, which enables the delivery of semantic search results.

You might set this property to `false` when you want to perform only a lexical match. For example, you might disable semantic search when looking for a proper name.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/disableSemanticSearch

func (CSUserQueryContext) EnableRankedResults

func (c CSUserQueryContext) EnableRankedResults() bool

A Boolean value that indicates whether the query sorts results by their relevance.

Discussion

The default value of this property is `true`. Setting the property to `false` causes Spotlight to return results as it finds them instead of ordering them by their relevance or saliency to the search term.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/enableRankedResults

func (CSUserQueryContext) Init

Init initializes the instance.

func (CSUserQueryContext) MaxRankedResultCount

func (c CSUserQueryContext) MaxRankedResultCount() int

The maximum number of ranked results to return during the query.

Discussion

Spotlight ranks a limited number of results by default, but you can change the default value to improve performance or better suit your app’s interface. For example, you might want to return only the five most relevant results due to space constraints in your UI.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/maxRankedResultCount

func (CSUserQueryContext) MaxResultCount

func (c CSUserQueryContext) MaxResultCount() int

The maximum number of search results for the query to return.

Discussion

Spotlight returns all results that it finds by default. Set a maximum limit to terminate the search early, which can improve performance.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/maxResultCount

func (CSUserQueryContext) MaxSuggestionCount

func (c CSUserQueryContext) MaxSuggestionCount() int

The maximum number of suggested text completions for the query to return.

Discussion

You might specify different limits to account for the amount of available space.

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext/maxSuggestionCount

func (CSUserQueryContext) SetDisableSemanticSearch

func (c CSUserQueryContext) SetDisableSemanticSearch(value bool)

func (CSUserQueryContext) SetEnableRankedResults

func (c CSUserQueryContext) SetEnableRankedResults(value bool)

func (CSUserQueryContext) SetMaxRankedResultCount

func (c CSUserQueryContext) SetMaxRankedResultCount(value int)

func (CSUserQueryContext) SetMaxResultCount

func (c CSUserQueryContext) SetMaxResultCount(value int)

func (CSUserQueryContext) SetMaxSuggestionCount

func (c CSUserQueryContext) SetMaxSuggestionCount(value int)

type CSUserQueryContextClass

type CSUserQueryContextClass struct {
	// contains filtered or unexported fields
}

func GetCSUserQueryContextClass

func GetCSUserQueryContextClass() CSUserQueryContextClass

GetCSUserQueryContextClass returns the class object for CSUserQueryContext.

func (CSUserQueryContextClass) Alloc

Alloc allocates memory for a new instance of the class.

func (CSUserQueryContextClass) Class

func (cc CSUserQueryContextClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type DataErrorHandler

type DataErrorHandler = func(*foundation.NSData, error)

DataErrorHandler handles The block to call when the request has been journaled by the index, which means that the index makes a note that it has to perform this operation.

  • error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type ErrorHandler

type ErrorHandler = func(error)

ErrorHandler handles The block that’s called when the data has been journaled by the index, which means that the index makes a note that it has to perform this operation.

  • error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

type ICSCustomAttributeKey

type ICSCustomAttributeKey interface {
	objectivec.IObject

	// Returns a new custom attribute key with the specified name.
	InitWithKeyName(keyName string) CSCustomAttributeKey
	// Returns a new custom attribute key with the specified name and properties.
	InitWithKeyNameSearchableSearchableByDefaultUniqueMultiValued(keyName string, searchable bool, searchableByDefault bool, unique bool, multiValued bool) CSCustomAttributeKey
	InitWithCoder(coder foundation.INSCoder) CSCustomAttributeKey

	// The name of the custom attribute key.
	KeyName() string
	// A Boolean value that indicates if the custom attribute is likely to have multiple values, such as arrays, associated with it.
	IsMultiValued() bool
	// A Boolean value that indicates if the custom attribute can be specified as a search term.
	IsSearchable() bool
	// A Boolean value that indicates if the custom attribute should be searchable by default.
	IsSearchableByDefault() bool
	// A Boolean value that indicates if duplicate custom attribute values should be treated as the same value to save storage space.
	IsUnique() bool

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSCustomAttributeKey class.

Creating a custom attribute

Getting the attribute details

See: https://developer.apple.com/documentation/CoreSpotlight/CSCustomAttributeKey

type ICSImportExtension

type ICSImportExtension interface {
	objectivec.IObject

	// Provides searchable attributes for a file at the specified URL.
	UpdateAttributesForFileAtURLError(attributes ICSSearchableItemAttributeSet, contentURL foundation.NSURL) (bool, error)
}

An interface definition for the CSImportExtension class.

Providing searchable attributes

See: https://developer.apple.com/documentation/CoreSpotlight/CSImportExtension

type ICSIndexExtensionRequestHandler

type ICSIndexExtensionRequestHandler interface {
	objectivec.IObject

	DataForSearchableIndexItemIdentifierTypeIdentifierError(searchableIndex ICSSearchableIndex, itemIdentifier string, typeIdentifier string) (foundation.NSData, error)
	FileURLForSearchableIndexItemIdentifierTypeIdentifierInPlaceError(searchableIndex ICSSearchableIndex, itemIdentifier string, typeIdentifier string, inPlace bool) (foundation.NSURL, error)
	// Tells the delegate that the index throttling has finished.
	SearchableIndexDidFinishThrottle(searchableIndex ICSSearchableIndex)
	// Tells the delegate that indexing is being throttled.
	SearchableIndexDidThrottle(searchableIndex ICSSearchableIndex)
	// Tells the delegate to reindex all searchable data and clear all local state information.
	SearchableIndexReindexAllSearchableItemsWithAcknowledgementHandler(searchableIndex ICSSearchableIndex, acknowledgementHandler VoidHandler)
	// Tells the delegate to reindex the searchable items associated with the specified identifiers.
	SearchableIndexReindexSearchableItemsWithIdentifiersAcknowledgementHandler(searchableIndex ICSSearchableIndex, identifiers []string, acknowledgementHandler VoidHandler)
	// Tells the delegate that the framework updated the list of searchable items.
	SearchableItemsDidUpdate(items []CSSearchableItem)
	SearchableItemsForIdentifiersProtectionClassSearchableItemsHandler(identifiers []string, protectionClass foundation.NSFileProtectionType, searchableItemsHandler CSSearchableItemArrayHandler)
	// Requests that the delegate provide searchable items for the provided identifiers.
	SearchableItemsForIdentifiersSearchableItemsHandler(identifiers []string, searchableItemsHandler CSSearchableItemArrayHandler)
}

An interface definition for the CSIndexExtensionRequestHandler class.

See: https://developer.apple.com/documentation/CoreSpotlight/CSIndexExtensionRequestHandler

type ICSLocalizedString

type ICSLocalizedString interface {
	foundation.INSString

	// Initializes a [CSLocalizedString] object with the specified dictionary of localized strings.
	InitWithLocalizedStrings(localizedStrings foundation.INSDictionary) CSLocalizedString

	// Returns the localized string for the current language.
	LocalizedString() string
}

An interface definition for the CSLocalizedString class.

Specifying localized strings

Getting a localized string

See: https://developer.apple.com/documentation/CoreSpotlight/CSLocalizedString

type ICSPerson

type ICSPerson interface {
	objectivec.IObject

	// Returns a new [CSPerson] object initialized with the specified display name and contact attributes.
	InitWithDisplayNameHandlesHandleIdentifier(displayName string, handles []string, handleIdentifier string) CSPerson
	InitWithCoder(coder foundation.INSCoder) CSPerson

	// The identifier for the contact associated with the person.
	ContactIdentifier() string
	SetContactIdentifier(value string)
	// A display name for the person.
	DisplayName() string
	// A key that identifies the type of contact property represented by the person object’s handle.
	HandleIdentifier() string
	// An array of contact handles related to the person.
	Handles() []string

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSPerson class.

Initializing a person object

Accessing person properties

See: https://developer.apple.com/documentation/CoreSpotlight/CSPerson

type ICSSearchQuery

type ICSSearchQuery interface {
	objectivec.IObject

	// Initializes and returns a query object with the specified query string and query context.
	InitWithQueryStringQueryContext(queryString string, queryContext ICSSearchQueryContext) CSSearchQuery

	// The protection types of the indexes you want to search.
	ProtectionClasses() []string
	SetProtectionClasses(value []string)

	// The results that match the current query string.
	Results() unsafe.Pointer
	SetResults(value unsafe.Pointer)

	// Starts searching the index for items that match the current query string and parameters.
	Start()
	// Cancels the current query operation.
	Cancel()
	// A Boolean value that indicates whether the current query is no longer running.
	IsCancelled() bool
	// The number of matching items found for the given query string.
	FoundItemCount() uint
	// The block to execute when the query delivers a new batch of matching items.
	FoundItemsHandler() CSSearchableItemArrayHandler
	SetFoundItemsHandler(value CSSearchableItemArrayHandler)
	// The block to execute when the query finishes delivering all results.
	CompletionHandler() ErrorHandler
	SetCompletionHandler(value ErrorHandler)
}

An interface definition for the CSSearchQuery class.

Creating a query object

Specifying the indexes to search

Executing the query automatically

Executing the query with handler blocks

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQuery

type ICSSearchQueryContext

type ICSSearchQueryContext interface {
	objectivec.IObject

	// The attributes the system fetches for the searchable items.
	FetchAttributes() []string
	SetFetchAttributes(value []string)
	// The language used for the query.
	KeyboardLanguage() string
	SetKeyboardLanguage(value string)
	// The query source options to allow or deny Mail messages in the search.
	SourceOptions() CSSearchQuerySourceOptions
	SetSourceOptions(value CSSearchQuerySourceOptions)

	// The query string used to filter the results.
	FilterQueries() []string
	SetFilterQueries(value []string)

	InitWithCoder(coder foundation.INSCoder) CSSearchQueryContext

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSSearchQueryContext class.

Configuring search behavior

Filtering the results

Initializers

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchQueryContext

type ICSSearchableIndex

type ICSSearchableIndex interface {
	objectivec.IObject

	// Returns an on-device index with the specified name.
	InitWithName(name string) CSSearchableIndex
	// Returns an on-device index with the specified name and data protection class.
	InitWithNameProtectionClass(name string, protectionClass foundation.NSFileProtectionType) CSSearchableIndex

	// The delegate object that can handle index-management tasks.
	IndexDelegate() CSSearchableIndexDelegate
	SetIndexDelegate(value CSSearchableIndexDelegate)

	// Adds or updates items in the index.
	IndexSearchableItemsCompletionHandler(items []CSSearchableItem, completionHandler ErrorHandler)
	// Deletes all searchable items from the index.
	DeleteAllSearchableItemsWithCompletionHandler(completionHandler ErrorHandler)
	// Removes from the index all searchable items associated with the specified domain.
	DeleteSearchableItemsWithDomainIdentifiersCompletionHandler(domainIdentifiers []string, completionHandler ErrorHandler)
	// Removes from the index all items with the specified identifiers.
	DeleteSearchableItemsWithIdentifiersCompletionHandler(identifiers []string, completionHandler ErrorHandler)

	// Begins a batch of updates to an index.
	BeginIndexBatch()
	// Ends a batch of index updates and stores the specified state information.
	EndIndexBatchWithClientStateCompletionHandler(clientState foundation.NSData, completionHandler ErrorHandler)
	// Ends a batch of index updates and stores the specified state information.
	EndIndexBatchWithExpectedClientStateNewClientStateCompletionHandler(expectedClientState foundation.NSData, newClientState foundation.NSData, completionHandler ErrorHandler)
	// Fetches the app’s most recent client state information asynchronously.
	FetchLastClientStateWithCompletionHandler(completionHandler DataErrorHandler)

	// Fetches data from an external provider.
	FetchDataForBundleIdentifierItemIdentifierContentTypeCompletionHandler(bundleIdentifier string, itemIdentifier string, contentType uniformtypeidentifiers.UTType, completionHandler DataErrorHandler)

	ProtectionClass() foundation.NSFileProtectionType
}

An interface definition for the CSSearchableIndex class.

Creating an index

Managing items in an index

Batching index updates

Handling drag and drop content

Getting the protection class

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableIndex

type ICSSearchableItem

type ICSSearchableItem interface {
	objectivec.IObject

	// Returns a searchable item associated with the specified identifier, domain identifier, and attribute set.
	InitWithUniqueIdentifierDomainIdentifierAttributeSet(uniqueIdentifier string, domainIdentifier string, attributeSet ICSSearchableItemAttributeSet) CSSearchableItem
	InitWithCoder(coder foundation.INSCoder) CSSearchableItem

	// The value that uniquely identifies the searchable item within your app.
	UniqueIdentifier() string
	SetUniqueIdentifier(value string)
	// An optional identifier that represents the domain or owner of the item.
	DomainIdentifier() string
	SetDomainIdentifier(value string)
	// The set of attributes that contain metadata associated with the item in a [CSSearchableItemAttributeSet](<https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet>) object.
	AttributeSet() ICSSearchableItemAttributeSet
	SetAttributeSet(value ICSSearchableItemAttributeSet)
	// The date after which the searchable item should no longer exist.
	ExpirationDate() foundation.NSDate
	SetExpirationDate(value foundation.NSDate)
	// A Boolean value that indicates whether to treat the item as an update instead of a new item.
	IsUpdate() bool
	SetIsUpdate(value bool)
	UpdateListenerOptions() CSSearchableItemUpdateListenerOptions
	SetUpdateListenerOptions(value CSSearchableItemUpdateListenerOptions)

	// Compares two items by rank and returns the result.
	CompareByRank(other ICSSearchableItem) foundation.ComparisonResult

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSSearchableItem class.

Getting a searchable item

Setting attributes on a searchable item

Comparing items

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItem

type ICSSearchableItemAttributeSet

type ICSSearchableItemAttributeSet interface {
	objectivec.IObject

	// Creates an attribute set for the specified content type.
	InitWithContentType(contentType uniformtypeidentifiers.UTType) CSSearchableItemAttributeSet
	InitWithCoder(coder foundation.INSCoder) CSSearchableItemAttributeSet

	// Sets the value for a custom attribute key.
	SetValueForCustomKey(value foundation.NSSecureCoding, key ICSCustomAttributeKey)
	// Returns the value associated with the specified custom attribute key.
	ValueForCustomKey(key ICSCustomAttributeKey) foundation.NSSecureCoding

	// A Boolean value that indicates whether the mail or messages content represents a prioritized item.
	IsPriority() foundation.NSNumber
	// A string that presents the Apple Intelligence summarization of the item.
	TextContentSummary() string
	// A string that represents the text the system transcribed.
	TranscribedTextContent() string
	SetTranscribedTextContent(value string)

	// An array of identifiers that corresponds to data representations the delegate provides.
	ProviderDataTypeIdentifiers() []string
	SetProviderDataTypeIdentifiers(value []string)
	// An array of identifiers that corresponds to file representations the delegate provides.
	ProviderFileTypeIdentifiers() []string
	SetProviderFileTypeIdentifiers(value []string)
	// An array of identifiers that corresponds to in-place file representations the delegate provides.
	ProviderInPlaceFileTypeIdentifiers() []string
	SetProviderInPlaceFileTypeIdentifiers(value []string)

	// An array of localized strings that represent alternate display names for the item.
	AlternateNames() []string
	SetAlternateNames(value []string)
	// The uniform type identifier (UTI) of the item.
	ContentType() string
	SetContentType(value string)
	// An attribute type that identifies a custom hierarchy of types to describe the attributes of your item.
	ContentTypeTree() []string
	SetContentTypeTree(value []string)
	// The file URL of the content to index.
	ContentURL() foundation.NSURL
	SetContentURL(value foundation.NSURL)
	// The local file URL of the thumbnail image for the item when Dark Mode is active.
	DarkThumbnailURL() foundation.NSURL
	SetDarkThumbnailURL(value foundation.NSURL)
	// A localized string that contains the name of the item, suitable to display in the user interface.
	DisplayName() string
	SetDisplayName(value string)
	// An array of keywords associated with the item, such as work, birthday, important, and so on.
	Keywords() []string
	SetKeywords(value []string)
	// The date on which the last metadata attribute was changed.
	MetadataModificationDate() foundation.NSDate
	SetMetadataModificationDate(value foundation.NSDate)
	// The complete path to the item.
	Path() string
	SetPath(value string)
	// A number that indicates the relative importance of the item among other items from the app.
	RankingHint() foundation.NSNumber
	SetRankingHint(value foundation.NSNumber)
	// The unique identifier for the item to which the activity is related.
	RelatedUniqueIdentifier() string
	SetRelatedUniqueIdentifier(value string)
	// Image data that represents the thumbnail of the item.
	ThumbnailData() foundation.NSData
	SetThumbnailData(value foundation.NSData)
	// The local file URL of the thumbnail image for the item.
	ThumbnailURL() foundation.NSURL
	SetThumbnailURL(value foundation.NSURL)
	// The title of the item.
	Title() string
	SetTitle(value string)
	// An identifier that represents the domain or owner of the item.
	DomainIdentifier() string
	SetDomainIdentifier(value string)
	// The unique identifier for the item to which the activity is related, but not linked.
	WeakRelatedUniqueIdentifier() string
	SetWeakRelatedUniqueIdentifier(value string)

	// A class of entity for which the item is intended or useful.
	Audiences() []string
	SetAudiences(value []string)
	// A description of the item’s content.
	ContentDescription() string
	SetContentDescription(value string)
	// The name of the app that created the content.
	Creator() string
	SetCreator(value string)
	// The name of the apps that converted the original content into a PDF stream.
	EncodingApplications() []string
	SetEncodingApplications(value []string)
	// The size of the document file.
	FileSize() foundation.NSNumber
	SetFileSize(value foundation.NSNumber)
	// An array of font names the document uses.
	FontNames() []string
	SetFontNames(value []string)
	// A formal identifier that references the document the item represents.
	Identifier() string
	SetIdentifier(value string)
	// A description of the kind of document the item represents.
	Kind() string
	SetKind(value string)
	// The number of pages in the document.
	PageCount() foundation.NSNumber
	SetPageCount(value foundation.NSNumber)
	// The height of the document page, in points (72 points per inch).
	PageHeight() foundation.NSNumber
	SetPageHeight(value foundation.NSNumber)
	// The width of the document page, in points (72 points per inch).
	PageWidth() foundation.NSNumber
	SetPageWidth(value foundation.NSNumber)
	// The security method (a type of encryption) that protects the document file.
	SecurityMethod() string
	SetSecurityMethod(value string)
	// The subject of the document.
	Subject() string
	SetSubject(value string)
	// The theme of the document.
	Theme() string
	SetTheme(value string)

	// A value that indicates the user created the item.
	UserCreated() foundation.NSNumber
	SetUserCreated(value foundation.NSNumber)
	// A value that indicates the user selected the item.
	UserCurated() foundation.NSNumber
	SetUserCurated(value foundation.NSNumber)
	// A value that indicates the user purchased or owns the item.
	UserOwned() foundation.NSNumber
	SetUserOwned(value foundation.NSNumber)

	// A value that indicates if the event covers an entire day.
	AllDay() foundation.NSNumber
	SetAllDay(value foundation.NSNumber)
	// The date on which the item was completed.
	CompletionDate() foundation.NSDate
	SetCompletionDate(value foundation.NSDate)
	// The date on which the item is due.
	DueDate() foundation.NSDate
	SetDueDate(value foundation.NSDate)
	// The end date for the item.
	EndDate() foundation.NSDate
	SetEndDate(value foundation.NSDate)
	// An array of important dates associated with the item.
	ImportantDates() []foundation.NSDate
	SetImportantDates(value []foundation.NSDate)
	// The start date for the item.
	StartDate() foundation.NSDate
	SetStartDate(value foundation.NSDate)

	// The altitude of the item in meters above sea level, expressed using the WGS84 datum.
	Altitude() foundation.NSNumber
	SetAltitude(value foundation.NSNumber)
	// The city of the item’s origin according to guidelines that the provider establishes.
	City() string
	SetCity(value string)
	// The full, publishable name of the country or region in which the intellectual property of the item was created, according to guidelines the provider establishes.
	Country() string
	SetCountry(value string)
	// Information about the GPS area.
	GPSAreaInformation() string
	SetGPSAreaInformation(value string)
	// The GPS dilution of precision value.
	GPSDOP() foundation.NSNumber
	SetGPSDOP(value foundation.NSNumber)
	// The date and time related to the GPS value.
	GPSDateStamp() foundation.NSDate
	SetGPSDateStamp(value foundation.NSDate)
	// The bearing to the destination point.
	GPSDestBearing() foundation.NSNumber
	SetGPSDestBearing(value foundation.NSNumber)
	// The distance to the destination point.
	GPSDestDistance() foundation.NSNumber
	SetGPSDestDistance(value foundation.NSNumber)
	// The latitude of the destination point.
	GPSDestLatitude() foundation.NSNumber
	SetGPSDestLatitude(value foundation.NSNumber)
	// The longitude of the destination point.
	GPSDestLongitude() foundation.NSNumber
	SetGPSDestLongitude(value foundation.NSNumber)
	// The differential correction applied to the GPS receiver.
	GPSDifferental() foundation.NSNumber
	SetGPSDifferental(value foundation.NSNumber)
	// The geodetic data that the GPS receiver uses.
	GPSMapDatum() string
	SetGPSMapDatum(value string)
	// The measurement precision mode in use by the GPS receiver.
	GPSMeasureMode() string
	SetGPSMeasureMode(value string)
	// The location finding method that the GPS receiver uses.
	GPSProcessingMethod() string
	SetGPSProcessingMethod(value string)
	// The status of the GPS receiver.
	GPSStatus() string
	SetGPSStatus(value string)
	// The direction of travel of the item in degrees from true north.
	GPSTrack() foundation.NSNumber
	SetGPSTrack(value foundation.NSNumber)
	// A publishable string that provides a synopsis of the contents of the item.
	Headline() string
	SetHeadline(value string)
	// The direction of the item’s image in degrees from true north.
	ImageDirection() foundation.NSNumber
	SetImageDirection(value foundation.NSNumber)
	// Instructions that concern the use of the item, such as an embargo or warning.
	Instructions() string
	SetInstructions(value string)
	// The latitude of the item, in degrees north of the equator, expressed using the WGS84 datum.
	Latitude() foundation.NSNumber
	SetLatitude(value foundation.NSNumber)
	// The longitude of the item, in degrees east of the prime meridian, expressed using the WGS84 datum.
	Longitude() foundation.NSNumber
	SetLongitude(value foundation.NSNumber)
	// The name of the location or point of interest associated with the item.
	NamedLocation() string
	SetNamedLocation(value string)
	// The speed of the item, in kilometers per hour.
	Speed() foundation.NSNumber
	SetSpeed(value foundation.NSNumber)
	// The province or state of origin according to guidelines the provider establishes.
	StateOrProvince() string
	SetStateOrProvince(value string)
	// The timestamp on the item.
	Timestamp() foundation.NSDate
	SetTimestamp(value foundation.NSDate)
	// The fully formatted address of the item, received from MapKit.
	FullyFormattedAddress() string
	SetFullyFormattedAddress(value string)
	// The postal code for the item according to guidelines the provider establishes.
	PostalCode() string
	SetPostalCode(value string)
	// The sublocation, such as a street number, for the item according to guidelines the provider establishes.
	SubThoroughfare() string
	SetSubThoroughfare(value string)
	// The thoroughfare, such as a street name, associated with the location for the item according to guidelines the provider establishes.
	Thoroughfare() string
	SetThoroughfare(value string)

	// A comment related to the media file.
	Comment() string
	SetComment(value string)
	// The creation date of an edited or optimized version of the song or composition.
	ContentCreationDate() foundation.NSDate
	SetContentCreationDate(value foundation.NSDate)
	// The date on which the contents of the file was last modified.
	ContentModificationDate() foundation.NSDate
	SetContentModificationDate(value foundation.NSDate)
	// An array of sources from which the media was obtained.
	ContentSources() []string
	SetContentSources(value []string)
	// The copyright date of the content.
	Copyright() string
	SetCopyright(value string)
	// The most recent date on which the file was downloaded or received.
	DownloadedDate() foundation.NSDate
	SetDownloadedDate(value foundation.NSDate)
	// A list of editors who have worked on the file.
	Editors() []string
	SetEditors(value []string)
	// The date on which the file was last used.
	LastUsedDate() foundation.NSDate
	SetLastUsedDate(value foundation.NSDate)
	// A list of people who are visible in an image or movie or written about in a document.
	Participants() []string
	SetParticipants(value []string)
	// A list of projects of which this file is a part.
	Projects() []string
	SetProjects(value []string)
	// The date on which the item was moved into its current location.
	AddedDate() foundation.NSDate
	SetAddedDate(value foundation.NSDate)
	// The codecs used to encode/decode the media.
	Codecs() []string
	SetCodecs(value []string)
	// A list of contacts who are associated with the content in some way, not including the author.
	ContactKeywords() []string
	SetContactKeywords(value []string)
	// The delivery type of the file.
	DeliveryType() foundation.NSNumber
	SetDeliveryType(value foundation.NSNumber)
	// The duration (if appropriate) of the content of the file, in seconds.
	Duration() foundation.NSNumber
	SetDuration(value foundation.NSNumber)
	// The media types present in the content.
	MediaTypes() []string
	SetMediaTypes(value []string)
	// A list of companies or organizations that created the content.
	Organizations() []string
	SetOrganizations(value []string)
	// A value that indicates if the content is prepared for streaming.
	Streamable() foundation.NSNumber
	SetStreamable(value foundation.NSNumber)
	// The total bit rate of the media, combining audio and video.
	TotalBitRate() foundation.NSNumber
	SetTotalBitRate(value foundation.NSNumber)
	// The audio bit rate of the media.
	AudioBitRate() foundation.NSNumber
	SetAudioBitRate(value foundation.NSNumber)
	// A version string associated with the file.
	Version() string
	SetVersion(value string)
	// The video bit rate of the media.
	VideoBitRate() foundation.NSNumber
	SetVideoBitRate(value foundation.NSNumber)
	// A list of people, organizations, or services that made contributions to the media content.
	Contributors() []string
	SetContributors(value []string)
	// A list of the included languages for the intellectual content of the media.
	Languages() []string
	SetLanguages(value []string)
	// A list of people, organizations, services, or other entities responsible for making the media available.
	Publishers() []string
	SetPublishers(value []string)
	// A link to information about the rights held in and over the media.
	Rights() string
	SetRights(value string)
	// Indicates the role of the content creator.
	Role() string
	SetRole(value string)
	// A value that indicates if the media contains explicit content.
	ContentRating() foundation.NSNumber
	SetContentRating(value foundation.NSNumber)
	// A list of descriptors that specify the extent or scope of the media.
	Coverage() []string
	SetCoverage(value []string)
	// The name of the director of the media (for example, a movie director).
	Director() string
	SetDirector(value string)
	// The genre of the media.
	Genre() string
	SetGenre(value string)
	// Information about the media.
	Information() string
	SetInformation(value string)
	// A value that indicates if the media is local.
	Local() foundation.NSNumber
	SetLocal(value foundation.NSNumber)
	// The original format of the media.
	OriginalFormat() string
	SetOriginalFormat(value string)
	// The original source of the media.
	OriginalSource() string
	SetOriginalSource(value string)
	// A list of performers in the media.
	Performers() []string
	SetPerformers(value []string)
	// A user-supplied play count for the media.
	PlayCount() foundation.NSNumber
	SetPlayCount(value foundation.NSNumber)
	// The producer of the content.
	Producer() string
	SetProducer(value string)
	// The user-supplied rating of the media.
	Rating() foundation.NSNumber
	SetRating(value foundation.NSNumber)
	// A description of the rating.
	RatingDescription() string
	SetRatingDescription(value string)
	// The URL associated with the media.
	URL() foundation.NSURL
	SetURL(value foundation.NSURL)

	// The title for a collection of audio media.
	Album() string
	SetAlbum(value string)
	// The artist associated with the media.
	Artist() string
	SetArtist(value string)
	// The number of channels in the audio data that the file contains.
	AudioChannelCount() foundation.NSNumber
	SetAudioChannelCount(value foundation.NSNumber)
	// The name of the application that encoded the data the audio file contains.
	AudioEncodingApplication() string
	SetAudioEncodingApplication(value string)
	// The sample rate of the audio data the file contains, as a float value representing Hz (audio frames per second), such as 44100.0 or 22254.54.
	AudioSampleRate() foundation.NSNumber
	SetAudioSampleRate(value foundation.NSNumber)
	// The track number of a song or audio composition when part of an album.
	AudioTrackNumber() foundation.NSNumber
	SetAudioTrackNumber(value foundation.NSNumber)
	// The composer of the song or audio composition that the audio file contains.
	Composer() string
	SetComposer(value string)
	// The musical key of the song or audio composition that the file contains, such as C, Dm, or F#m.
	KeySignature() string
	SetKeySignature(value string)
	// The lyricist or text writer for the song or audio composition that the file contains.
	Lyricist() string
	SetLyricist(value string)
	// The musical genre of the song or audio composition that the file contains, such as jazz, pop, rock, or classical.
	MusicalGenre() string
	SetMusicalGenre(value string)
	// The recording date of the song or composition.
	RecordingDate() foundation.NSDate
	SetRecordingDate(value foundation.NSDate)
	// The tempo of the music that the audio file contains, in beats per minute.
	Tempo() foundation.NSNumber
	SetTempo(value foundation.NSNumber)
	// The time signature of the musical composition that the audio or MIDI file contains, in a string, such as “4/4” or “7/8”.
	TimeSignature() string
	SetTimeSignature(value string)
	// A value that indicates whether the MIDI sequence the file contains is set up for use with a general MIDI device.
	GeneralMIDISequence() foundation.NSNumber
	SetGeneralMIDISequence(value foundation.NSNumber)
	// The category of the instrument associated with the audio file.
	MusicalInstrumentCategory() string
	SetMusicalInstrumentCategory(value string)
	// The name of an instrument within the context of an instrument category.
	MusicalInstrumentName() string
	SetMusicalInstrumentName(value string)

	// The ISO speed setting at the time the camera captured the image.
	ISOSpeed() foundation.NSNumber
	SetISOSpeed(value foundation.NSNumber)
	// The manufacturer of the device that captured the image.
	AcquisitionMake() string
	SetAcquisitionMake(value string)
	// The model of the device that captured the image.
	AcquisitionModel() string
	SetAcquisitionModel(value string)
	// The size of the lens aperture at the time the camera captured the image, as a log-scale APEX value.
	Aperture() foundation.NSNumber
	SetAperture(value foundation.NSNumber)
	// The number of bits per sample.
	BitsPerSample() foundation.NSNumber
	SetBitsPerSample(value foundation.NSNumber)
	// The owner of the camera that captured the image.
	CameraOwner() string
	SetCameraOwner(value string)
	// The color space model the image uses, such as RGB, CMYK, YUV, or YCbCr.
	ColorSpace() string
	SetColorSpace(value string)
	// A value that indicates if the camera used a flash to capture the image.
	FlashOn() foundation.NSNumber
	SetFlashOn(value foundation.NSNumber)
	// The actual focal length of the lens, in millimeters.
	FocalLength() foundation.NSNumber
	SetFocalLength(value foundation.NSNumber)
	// A value that indicates if the focal length is 35mm.
	FocalLength35mm() foundation.NSNumber
	SetFocalLength35mm(value foundation.NSNumber)
	// An array that contains the names of the various layers in the file.
	LayerNames() []string
	SetLayerNames(value []string)
	// The model of the lens that captured the image.
	LensModel() string
	SetLensModel(value string)
	// The orientation of the data.
	Orientation() foundation.NSNumber
	SetOrientation(value foundation.NSNumber)
	// The total number of pixels in the image.
	PixelCount() foundation.NSNumber
	SetPixelCount(value foundation.NSNumber)
	// The height of the item, such as image or video frame height, in pixels.
	PixelHeight() foundation.NSNumber
	SetPixelHeight(value foundation.NSNumber)
	// The width of the item, such as image or video frame width, in pixels.
	PixelWidth() foundation.NSNumber
	SetPixelWidth(value foundation.NSNumber)
	// The white balance setting when the camera captured the image.
	WhiteBalance() foundation.NSNumber
	SetWhiteBalance(value foundation.NSNumber)
	// The version of GPS Info IFD header that was used to generate the metadata for the image.
	EXIFGPSVersion() string
	SetEXIFGPSVersion(value string)
	// The version of the EXIF header that was used to generate the metadata for the image.
	EXIFVersion() string
	SetEXIFVersion(value string)
	// The mode the camera used for the exposure of the image.
	ExposureMode() foundation.NSNumber
	SetExposureMode(value foundation.NSNumber)
	// The class of the program the camera used to set exposure when capturing the image.
	ExposureProgram() string
	SetExposureProgram(value string)
	// The time that the lens was open during exposure, in seconds.
	ExposureTime() foundation.NSNumber
	SetExposureTime(value foundation.NSNumber)
	// The time that the lens was open during exposure, in a string, such as “1/250 seconds”.
	ExposureTimeString() string
	SetExposureTimeString(value string)
	// The focal length of the lens, divided by the diameter of the aperture when the camera captured the image.
	FNumber() foundation.NSNumber
	SetFNumber(value foundation.NSNumber)
	// Indicates if the image file has an alpha channel.
	HasAlphaChannel() foundation.NSNumber
	SetHasAlphaChannel(value foundation.NSNumber)
	// The smallest F number of the lens.
	MaxAperture() foundation.NSNumber
	SetMaxAperture(value foundation.NSNumber)
	// The metering mode.
	MeteringMode() string
	SetMeteringMode(value string)
	// The name of the color profile the camera used for the image.
	ProfileName() string
	SetProfileName(value string)
	// A value that indicates if the camera used red-eye reduction when capturing the image.
	RedEyeOn() foundation.NSNumber
	SetRedEyeOn(value foundation.NSNumber)
	// The resolution height of the image, in DPI.
	ResolutionHeightDPI() foundation.NSNumber
	SetResolutionHeightDPI(value foundation.NSNumber)
	// The resolution width of the image, in DPI.
	ResolutionWidthDPI() foundation.NSNumber
	SetResolutionWidthDPI(value foundation.NSNumber)

	// The HTML content of the document encoded as an NSData object representing a UTF-8 encoded string.
	HTMLContentData() foundation.NSData
	SetHTMLContentData(value foundation.NSData)
	// An array of the canonical handles for the account with which the message is associated.
	AccountHandles() []string
	SetAccountHandles(value []string)
	// The unique identifier for the account with which the message is associated, if any.
	AccountIdentifier() string
	SetAccountIdentifier(value string)
	// An array of [CSPerson](<https://developer.apple.com/documentation/CoreSpotlight/CSPerson>) objects representing the content of the Cc: field in an email message.
	AdditionalRecipients() []CSPerson
	SetAdditionalRecipients(value []CSPerson)
	// An array of addresses associated with the author of the message.
	AuthorAddresses() []string
	SetAuthorAddresses(value []string)
	// An array of email addresses associated with the author of the message.
	AuthorEmailAddresses() []string
	SetAuthorEmailAddresses(value []string)
	// An array of names representing the authors who have worked on the message.
	AuthorNames() []string
	SetAuthorNames(value []string)
	// An array of [CSPerson](<https://developer.apple.com/documentation/CoreSpotlight/CSPerson>) objects representing the content of the From: field in an item.
	Authors() []CSPerson
	SetAuthors(value []CSPerson)
	// An array of email addresses associated with the message.
	EmailAddresses() []string
	SetEmailAddresses(value []string)
	// A dictionary that contains all the headers of the message.
	EmailHeaders() foundation.INSDictionary
	SetEmailHeaders(value foundation.INSDictionary)
	// An array of [CSPerson](<https://developer.apple.com/documentation/CoreSpotlight/CSPerson>) objects representing the content of the Bcc: field in an email message.
	HiddenAdditionalRecipients() []CSPerson
	SetHiddenAdditionalRecipients(value []CSPerson)
	// An array of instant message addresses for the message.
	InstantMessageAddresses() []string
	SetInstantMessageAddresses(value []string)
	// A value that indicates if the message is likely to be considered junk.
	LikelyJunk() foundation.NSNumber
	SetLikelyJunk(value foundation.NSNumber)
	// An array of mailbox identifiers associated with the message.
	MailboxIdentifiers() []string
	SetMailboxIdentifiers(value []string)
	// An array of phone numbers associated with the message.
	PhoneNumbers() []string
	SetPhoneNumbers(value []string)
	// An array of [CSPerson](<https://developer.apple.com/documentation/CoreSpotlight/CSPerson>) objects representing the content of the To: field in an email message.
	PrimaryRecipients() []CSPerson
	SetPrimaryRecipients(value []CSPerson)
	// An array of addresses associated with the recipients of the message.
	RecipientAddresses() []string
	SetRecipientAddresses(value []string)
	// An array of email addresses associated with the recipient.
	RecipientEmailAddresses() []string
	SetRecipientEmailAddresses(value []string)
	// An array of names representing the recipients of this message.
	RecipientNames() []string
	SetRecipientNames(value []string)
	// The textual content of the message.
	TextContent() string
	SetTextContent(value string)

	// A localized string that specifies the name of a container to which the item belongs, suitable to display in the user interface.
	ContainerDisplayName() string
	SetContainerDisplayName(value string)
	// The identifier of the container to which the item belongs.
	ContainerIdentifier() string
	SetContainerIdentifier(value string)
	// The order of the item within the container.
	ContainerOrder() foundation.NSNumber
	SetContainerOrder(value foundation.NSNumber)
	// The title of the container to which the item belongs.
	ContainerTitle() string
	SetContainerTitle(value string)

	// A value that indicates whether the item contains information sufficient to provide navigation to the location it represents.
	SupportsNavigation() foundation.NSNumber
	SetSupportsNavigation(value foundation.NSNumber)
	// A value that indicates whether the item contains information sufficient to allow a phone call to a number associated with the item.
	SupportsPhoneCall() foundation.NSNumber
	SetSupportsPhoneCall(value foundation.NSNumber)

	MoveFrom(sourceAttributeSet ICSSearchableItemAttributeSet)
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSSearchableItemAttributeSet class.

Creating an attribute set

Accessing custom attributes

Handling Apple Intelligence prioritization and summarization

Providing item representations

Describing general attributes

Describing document content

Describing user involvement

Describing events

Describing places

Describing media

Describing music

Describing images

Describing messages

Describing containment

Describing supporting actions

See: https://developer.apple.com/documentation/CoreSpotlight/CSSearchableItemAttributeSet

type ICSSuggestion

type ICSSuggestion interface {
	objectivec.IObject

	// An attributed string for the localized suggestion.
	LocalizedAttributedSuggestion() foundation.NSAttributedString
	SetLocalizedAttributedSuggestion(value foundation.NSAttributedString)
	// The type of suggestion.
	SuggestionKind() CSSuggestionKind

	// Compares the suggestion with a second specified suggestion.
	Compare(other ICSSuggestion) foundation.ComparisonResult
	CompareByRank(other ICSSuggestion) foundation.ComparisonResult

	InitWithCoder(coder foundation.INSCoder) CSSuggestion

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the CSSuggestion class.

Setting suggestion attributes

Comparing suggestions

Initializers

See: https://developer.apple.com/documentation/CoreSpotlight/CSSuggestion

type ICSUserQuery

type ICSUserQuery interface {
	ICSSearchQuery

	// Creates a new user query that searches for the specified term.
	InitWithUserQueryStringUserQueryContext(userQueryString string, userQueryContext ICSUserQueryContext) CSUserQuery

	// The matching results and suggestions for the current query string.
	Responses() unsafe.Pointer
	SetResponses(value unsafe.Pointer)
	// An asynchronous sequence of suggested completions for the current query text.
	Suggestions() unsafe.Pointer
	SetSuggestions(value unsafe.Pointer)

	// The block to execute when the query delivers a new batch of suggested items.
	FoundSuggestionsHandler() CSSuggestionArrayHandler
	SetFoundSuggestionsHandler(value CSSuggestionArrayHandler)
	// The number of suggested items the query found so far.
	FoundSuggestionCount() int
}

An interface definition for the CSUserQuery class.

Creating a user query

Executing the query automatically

Executing the query with handler blocks

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQuery

type ICSUserQueryContext

type ICSUserQueryContext interface {
	ICSSearchQueryContext

	// The maximum number of search results for the query to return.
	MaxResultCount() int
	SetMaxResultCount(value int)
	// The maximum number of suggested text completions for the query to return.
	MaxSuggestionCount() int
	SetMaxSuggestionCount(value int)
	// A Boolean value that indicates whether to exclude semantic-based search results from the output.
	DisableSemanticSearch() bool
	SetDisableSemanticSearch(value bool)

	// A Boolean value that indicates whether the query sorts results by their relevance.
	EnableRankedResults() bool
	SetEnableRankedResults(value bool)
	// The maximum number of ranked results to return during the query.
	MaxRankedResultCount() int
	SetMaxRankedResultCount(value int)
}

An interface definition for the CSUserQueryContext class.

Configuring search options

Configuring the ranked results behavior

See: https://developer.apple.com/documentation/CoreSpotlight/CSUserQueryContext

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL