Instance Method

fetchReminders(matching:completion:)

Fetches reminders matching a given predicate.

Declaration

func fetchReminders(matching predicate: NSPredicate, completion: @escaping ([EKReminder]?) -> Void) -> Any

Parameters

predicate

The search predicate.

completion

An array of the matched reminders passed by reference.

Return Value

A value to be used in cancelFetchRequest(_:) to cancel the request later if desired.

Discussion

Only reminders that have been committed are included in the results. Reminders saved using save(_:commit:) with the commit parameter set to false must call commit() beforehand to be included.

This method fetches reminders asynchronously.

See Also