---
title: "remoteControlSession(_:didCreateKey:forVehicle:)"
framework: CarKey
role: symbol
role_heading: Instance Method
platforms: [iOS 18.0+, iPadOS 18.0+, Mac Catalyst 18.0+, macOS 15.0+, watchOS 11.0+]
path: "carkey/carkeyremotecontrolsessiondelegate/remotecontrolsession(_:didcreatekey:forvehicle:)"
---

# remoteControlSession(_:didCreateKey:forVehicle:)

Called to notify your app when a new key has been created.

## Declaration

```swift
func remoteControlSession(_ session: CarKeyRemoteControlSession, didCreateKey keyID: String, forVehicle vehicleID: String)
```

## Parameters

- `session`: The current session.
- `keyID`: The identifier of the key.
- `vehicleID`: The identifier of the vehicle.
