Protocol

INStartPhotoPlaybackIntentHandling

The handler interface for searching the user’s photos and the playback of the results.

Declaration

protocol INStartPhotoPlaybackIntentHandling

Overview

Use the methods of the INStartPhotoPlaybackIntentHandling protocol to resolve, confirm, and handle requests to search the user’s photos and initiate playback of a slideshow. 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 so that it can begin the slideshow.

Siri delivers an INStartPhotoPlaybackIntent object to your handler when the user asks to start a slideshow. The provided intent object contains the search parameters to use for matching photos to include in the slideshow. 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: INStartPhotoPlaybackIntent, completion: (INStartPhotoPlaybackIntentResponse) -> 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: INStartPhotoPlaybackIntent, completion: (INStartPhotoPlaybackIntentResponse) -> Void)

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

Resolving Details of the Intent

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

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

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

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

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

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

Relationships

Inherits From

See Also

Start Photo Playback

class INStartPhotoPlaybackIntent

A request to search for photos and initiate a slideshow with the results.

class INStartPhotoPlaybackIntentResponse

Your app’s response to a start photo playback intent.