<!--
{
  "availability" : [
    "iOS: 10.0.0 - 15.0.0",
    "iPadOS: 10.0.0 - 15.0.0",
    "macCatalyst: 13.1.0 - 15.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.2.0 - 8.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INStartPhotoPlaybackIntentHandling/handle(intent:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(pl)INStartPhotoPlaybackIntentHandling(im)handleStartPhotoPlayback:completion:"
  },
  "title" : "handle(intent:completion:)"
}
-->

# handle(intent:completion:)

Handles performing the search and returning the number of results.

```
func handle(intent: INStartPhotoPlaybackIntent, completion: @escaping @Sendable (INStartPhotoPlaybackIntentResponse) -> Void)
```

## Parameters

`intent`

The intent object containing details about the user’s request. Your handler object has already resolved and confirmed the information in this intent.

`completion`

The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

- response: The [`INStartPhotoPlaybackIntentResponse`](/documentation/Intents/INStartPhotoPlaybackIntentResponse) object you create to report the status of the request. You also use this object to specify the number of photos that matched the search parameters. This parameter must not be `nil`.

## Discussion

Your implementation of this method must perform the search and return the number of matching photos in the response. If you’re unable to perform the search, return a response object whose result code indicates the reason for the failure. Upon returning a successful response, Siri launches your app to start the slideshow.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)