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

# handle(intent:completion:)

Provides a list of the user’s electric vehicles.

## Declaration

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

```swift
func handle(intent: INListCarsIntent) async -> INListCarsIntentResponse
```

## Parameters

- `intent`: The intent object that represents the request.
- `completion`: The block you call with your response. You must call this block within your implementation of this method and pass an instance of doc://com.apple.sirikit/documentation/Intents/INListCarsIntentResponse that contains a status code, and a list of the user’s electric vehicles, if available.

## Discussion

Discussion Retrieve a list of the user’s electric vehicles and create an instance of INCar for each, setting carIdentifier to a unique identifier that represents that vehicle. The identifier matches the vehicle to future INGetCarPowerLevelStatusIntent requests. Do not use the vehicle’s VIN, or equivalent, as the identifier. Before returning from this method, create a response with the appropriate status code and, if you can retrieve a list of the user’s electric vehicles, set the cars property to the array of INCar objects. Then call the completion block and pass the response.
