Contents

init(dateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:)

Initializes a search for photos intent object with the specified search parameters.

Declaration

init(dateCreated: INDateComponentsRange?, locationCreated: CLPlacemark?, albumName: String?, searchTerms: [String]?, includedAttributes: INPhotoAttributeOptions = [], excludedAttributes: INPhotoAttributeOptions = [], peopleInPhoto: [INPerson]?)

Parameters

  • dateCreated:

    The range of dates for the photos.

  • locationCreated:

    The geographic locations of the photos.

  • albumName:

    The name of the album that contains the photos.

  • searchTerms:

    An array of terms to look for in the photo. These terms can refer to tags, keywords, descriptions, or names of people associated with the photo.

  • includedAttributes:

    The attributes that are present in the photos. This parameter may contain multiple attributes.

  • excludedAttributes:

    The attributes that aren’t present in the photos. This parameter may contain multiple attributes.

  • peopleInPhoto:

    One or more users present in the photos.

Return Value

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

Discussion

Normally, you don’t create instances of this class yourself. Instead, Siri creates instances when the user asks for a photo-related search. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.