---
title: "init(dateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/instartphotoplaybackintent/init(datecreated:locationcreated:albumname:searchterms:includedattributes:excludedattributes:peopleinphoto:)"
---

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

Initializes an intent object with the specified search parameters.

## Declaration

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

## Parameters

- `dateCreated`: The range of date stamps of the photos.
- `locationCreated`: The geographic location 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

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

## Discussion

Discussion Normally, you do not create instances of this class yourself. Instead, Siri creates instances when the user asks to start a slideshow. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.
