Instance Property

domainIdentifier

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

Declaration

var domainIdentifier: String? { get set }

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, domainIdentifier should be of the form <account-id>.<mailbox-id>, where neither <account-id> nor <mailbox-id> contain periods. To delete all items associated with the specified account and mailbox, you can call deleteSearchableItems(withDomainIdentifiers:completionHandler:) with a domainIdentifier of <account-id>.<mailbox-id>. Or to delete all items associated with all mailboxes in the specified account, you can call deleteSearchableItems(withDomainIdentifiers:completionHandler:) with a domainIdentifier of <account-id>.

See Also

Setting Attributes on a Searchable Item

var attributeSet: CSSearchableItemAttributeSet

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

var expirationDate: Date!

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

var uniqueIdentifier: String

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software