Initializer

init(title:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:)

Initializes the intent object with the specified search parameters.

Declaration

convenience init(title: INSpeakableString?, content: String?, itemType: INNotebookItemType, status: INTaskStatus, location: CLPlacemark?, locationSearchType: INLocationSearchType, dateTime: INDateComponentsRange?, dateSearchType: INDateSearchType)

Parameters

title

The text to search for in the title of the note, task, or task list.

content

The text to search for in the content of a note.

itemType

The type of items to search. Use this parameter to restrict your search to items of the specified type.

status

The completion status of the task. Use this parameter to restrict your search to tasks whose status matches the specified value.

location

The location value to use during your search. When the locationSearchType parameter is INLocationSearchType.byLocationTrigger, use this parameter to restrict your search to reminders that are triggered near the specified location.

locationSearchType

The type of location search to perform. Use this parameter to specify when a search for location-based reminders should occur.

dateTime

The time value to use during your search. Use the value of the dateSearchType parameter to determine how to apply the value of this parameter.

dateSearchType

The type of date-based search to perform. Use this parameter to specify when to search for notes with the specified creation or modification date or when to search for reminders based on the date on which they are delivered.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user asks to search for notes, task lists, tasks, or reminders. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths. When doing so, specify only the search parameters that you want to include and provide nil or unknown values for other parameters.

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