<!--
{
  "availability" : [
    "iOS: 12.0.0 - 14.0.0",
    "iPadOS: 12.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPListTemplateDelegate/listTemplate(_:didSelect:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(pl)CPListTemplateDelegate(im)listTemplate:didSelectListItem:completionHandler:"
  },
  "title" : "listTemplate(_:didSelect:completionHandler:)"
}
-->

# listTemplate(_:didSelect:completionHandler:)

Tells the delegate when the user selects a list item.

```
func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem, completionHandler: @escaping @Sendable () -> Void)
```

## Parameters

`listTemplate`

The list template that contains the selected item.

`item`

The item that the user selects.

`completionHandler`

The block that your app must call after handling the selected item.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem) async
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

When implementing this method, perform any necessary operations to prepare for completing the item selection, including updating your user interface. You must call `completionHandler` after handling the selected item to tell the system that it can continue. The list template displays an activity indicator—after a short delay—while it waits for your implementation to call the completion handler.

---

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)