---
title: "sign(data: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/carkeyremotecontrolsession/sign(data:forvehicle:)"
---

# sign(data:forVehicle:)

Sign data with the endpoint.SK identified by vehicleIdentifier as described in the section “OEM App Data Attestation” of the Car Connectivity Consortium Digital Key Release 3.0 specification.

## Declaration

```swift
func sign(data: Data, forVehicle vehicleID: String) throws -> CarKeyRemoteControlSession.Attestation
```

## Parameters

- `data`: The OEM App Data to sign.
- `vehicleID`: The vehicle identifier.

## Return Value

Return Value An Attestation object.

## Discussion

Discussion This method can only be used while the application is in the foreground.
