<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarKey",
  "identifier" : "/documentation/CarKey/CarKeyRemoteControlSession/sign(data:forVehicle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarKey"
    ],
    "preciseIdentifier" : "s:6CarKey0aB20RemoteControlSessionC4sign4data10forVehicleAC11AttestationV10Foundation4DataV_SStKF"
  },
  "title" : "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.

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

## Parameters

`data`

The OEM App Data to sign.

`vehicleID`

The vehicle identifier.

## Return Value

An Attestation object.

## Discussion

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

---

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)