Instance Property


An array of attributes whose values are gathered by the query.


var valueListAttributes: [String] { get set }


The query collects the values of these attributes into uniqued lists that can be used to summarize the results of the query. If attributes is nil, the query generates no value lists. Note that value list collection increases CPU usage and significantly increases the memory usage of an NSMetadataQuery object.

Setting this property while a query is running stops the query and discards the current results. The receiver immediately starts a new query.

For a list of valid attributes, see Attribute Keys and Cloud Storage Keys in NSMetadataItem.

See Also

Configuring Queries

var searchScopes: [Any]

An array containing the search scopes.

var predicate: NSPredicate?

The predicate used to filter query results.

var sortDescriptors: [NSSortDescriptor]

An array of sort descriptor objects.

var groupingAttributes: [String]?

An array of grouping attributes. (read-only)

var notificationBatchingInterval: TimeInterval

The interval at which notification of updated results occurs.

var searchItems: [Any]?

An array of objects that define the query’s scope.