---
title: "handle(intent:completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/insearchcallhistoryintenthandling/handle(intent:completion:)"
---

# handle(intent:completion:)

Handles searching the user’s call history.

## Declaration

```swift
func handle(intent: INSearchCallHistoryIntent, completion: @escaping @Sendable (INSearchCallHistoryIntentResponse) -> Void)
```

```swift
func handle(intent: INSearchCallHistoryIntent) async -> INSearchCallHistoryIntentResponse
```

## Parameters

- `intent`: The intent object containing details about the user’s request. The user has already resolved and confirmed the information in this object.
- `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:

## Discussion

Discussion Implement this method to search the user’s call history for entries matching the specified parameters. If the search yields results, make a note of those results and prepare to have your app display them. For example, you could include the results in the NSUserActivity object that you create with your response object. At the end of your implementation, execute the block in the completion parameter, passing it a response object that encapsulates whether the search was successful.
