Protocol

INSearchForPhotosIntentHandling

The handler interface for searching the user’s photos.

Overview

Use the methods of the INSearchForPhotosIntentHandling protocol to resolve, confirm, and handle requests to search the photos in your app. Adopt this protocol in an object of your Intents extension that is capable of performing the search and determining the number of results. Siri does not display the photos found during the search. After a successful search, Siri launches your app to display the photos.

Siri delivers an INSearchForPhotosIntent object to your handler when the user asks to search their photos. The provided intent object contains the parameters to use when searching for the photos. Use the methods of this protocol to resolve the search parameters, to perform the search, and to return the number of photos that match the criteria.

Topics

Handling the Intent

func handle(intent: INSearchForPhotosIntent, completion: (INSearchForPhotosIntentResponse) -> Void)

Called when it is time for you to perform the search and return the number of results.

Required.

Confirming the Response

func confirm(intent: INSearchForPhotosIntent, completion: (INSearchForPhotosIntentResponse) -> Void)

Called when it is time for you to confirm whether you can perform the search.

Resolving Details of the Intent

func resolveDateCreated(for: INSearchForPhotosIntent, with: (INDateComponentsRangeResolutionResult) -> Void)

Called when it is time for you to resolve the dates that the photos were taken.

func resolveLocationCreated(for: INSearchForPhotosIntent, with: (INPlacemarkResolutionResult) -> Void)

Called when it is time for you to resolve the location of the photos.

func resolvePeopleInPhoto(for: INSearchForPhotosIntent, with: ([INPersonResolutionResult]) -> Void)

Called when it is time for you to resolve the people in the photos.

func resolveAlbumName(for: INSearchForPhotosIntent, with: (INStringResolutionResult) -> Void)

Called when it is time for you to resolve the name of the photo album containing the photos.

func resolveSearchTerms(for: INSearchForPhotosIntent, with: ([INStringResolutionResult]) -> Void)

Called when it is time for you to resolve any search terms provided by the user.

Relationships

Inherits From

See Also

Search for Photos

Searching for Photos

Use SiriKit to search for photos managed by your app.

class INSearchForPhotosIntent

A request for the list of photos that match the specified criteria.

class INSearchForPhotosIntentResponse

Your app’s response to a search for photos intent.