<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPSearchTemplateDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(pl)CPSearchTemplateDelegate"
  },
  "title" : "CPSearchTemplateDelegate"
}
-->

# CPSearchTemplateDelegate

The interface for an object that serves as the search template’s delegate.

```
@MainActor protocol CPSearchTemplateDelegate : NSObjectProtocol
```

## Topics

### Updating Search Text

[`-  searchTemplate:updatedSearchText:completionHandler:`](/documentation/CarPlay/CPSearchTemplateDelegate/searchTemplate(_:updatedSearchText:completionHandler:))

Tells the delegate that the user updated the search criteria text.

### Selecting a Search Result Item

[`-  searchTemplate:selectedResult:completionHandler:`](/documentation/CarPlay/CPSearchTemplateDelegate/searchTemplate(_:selectedResult:completionHandler:))

Tells the delegate that the user selected an item from the search result.

### Pressing the Search Button

[`-  searchTemplateSearchButtonPressed:`](/documentation/CarPlay/CPSearchTemplateDelegate/searchTemplateSearchButtonPressed(_:))

Tells the delegate that the user tapped the keyboard’s search button.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)