One Logo Pool Ball
CarKey · IOS API REFERENCE

CarKeyRemoteControlSession

class · iOS 16.0+ · SDK 27.1

class CarKeyRemoteControlSession

The object that manages communication with the vehicles you manufacture. A `CarKeyRemoteControlSession` object coordinates interactions between your app and your company's make of vehicles. This object works with the system to transmit data securely to and from a vehicle, and to report results back to your app. Use this object to send commands or data directly to a vehicle, and to get information about the available vehicles and their current configuration. Don’t create this object directly. Instead, call the ``CarKeyRemoteControl/start(delegate:subscriptionRange:with:)`` method to create a new session object. When you finish interacting with the vehicle, call the session’s ``CarKeyRemoteControlSession/end()`` method to close out the session and prevent further access. You can have only one active session at a time. If you try to start a second session, ``CarKeyRemoteControl/start(delegate:subscriptionRange:with:)`` doesn't return until the currently active session becomes invalid. When you configure a new session, provide a delegate object to receive data from vehicle-initiated transfers. The system also uses your delegate notify you when the configuration of a vehicle changes. For example, it lets you know when connectivity to the vehicle changes. The delegate must adopt the ``CarKeyRemoteControlSessionDelegate`` protocol. - Note: If your app has an active session, the system automatically ends that session when your app enters the background. Upon reentering the foreground, you must create a new session to communicate with your vehicle again.

Members (8)

get · iOS 16.0+

vehicleReports

TypeScript
get vehicleReports(): Array<VehicleReport>
Swift declaration
var vehicleReports: [VehicleReport] { get throws }

The configuration details of the provisioned vehicles that match your company’s make. The system maintains a cache of provisioned vehicles and updates that information when the configuration details change.

method · iOS 16.0+

sendPassthroughData

TypeScript
sendPassthroughData(passthroughData: ArrayBuffer, vehicleID: string): void
Swift declaration
func sendPassthroughData(_ passthroughData: Data, toVehicle vehicleID: String) throws

Sends the specified custom data to the vehicle. Use this method to send data that is custom to your specific vehicle. This method passes the data unmodified directly to the vehicle, and it is up to you to format the data exactly how the vehicle needs it. If the vehicle sends a custom response, the system delivers it to the ``CarKeyRemoteControlSessionDelegate/remoteControlSession(_:didReceivePassthroughData:fromVehicle:)`` method of your session’s delegate object. - Parameters: - passthroughData: The custom data to send to the vehicle. Make sure the size of your data object doesn’t exceed 65 kilobytes. - vehicleID: The target vehicle for the request. Choose the vehicle from one of the session’s vehicle reports. Specify the string in the ``VehicleReport/identifier`` property of the corresponding report.

method · iOS 16.0+

isPassiveEntryAvailable

TypeScript
isPassiveEntryAvailable(vehicleID: string): boolean
Swift declaration
func isPassiveEntryAvailable(forVehicle vehicleID: String) throws -> Bool

Returns a Boolean value that indicates whether passive entry is currently available for the specified vehicle. - Parameter vehicleID: The target vehicle for the request. Choose the vehicle from one of the session’s vehicle reports. Specify the string in the ``VehicleReport/identifier`` property of the corresponding report. - Returns: `true` if passive entry is available, or `false` if the feature is not available.

method · iOS 16.0+

end

TypeScript
end(): void
Swift declaration
func end() throws

Ends the session and stops the delivery of notifications for all vehicles in the session. When you no longer need to access the vehicle information, call this method to end the session. If the session isn’t currently active when you call this method, it throws an error. The system automatically ends a session when your app enters the background. Upon reentering the foreground, you must create a new session to communicate with your vehicle again.

method · iOS 18.0+

sign

TypeScript
sign(data: ArrayBuffer, vehicleID: string): CarKeyRemoteControlSession_Attestation
Swift declaration
func sign(data: Data, forVehicle vehicleID: String) throws -> CarKeyRemoteControlSession.Attestation

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. This method can only be used while the application is in the foreground. - Parameter data: The OEM App Data to sign. - Parameter vehicleID: The vehicle identifier. - Returns: An Attestation object.

method · iOS 18.0+

perform

TypeScript
performContinuationStrategy(enduringAction: RemoteKeylessEntryConfigurableEnduringAction, continuationStrategy: CarKeyRemoteControlSession_ContinuationStrategy): RemoteKeylessEntryConfigurableEnduringAction_EnduringExecutionRequest
Swift declaration
func perform(_ enduringAction: RemoteKeylessEntryConfigurableEnduringAction, continuationStrategy: CarKeyRemoteControlSession.ContinuationStrategy) throws -> RemoteKeylessEntryConfigurableEnduringAction.EnduringExecutionRequest

Sends a request to the vehicle to start an action that has a separate stopping point, and optionally allows your app to have control over incoming continuation requests and to exchange data during the execution of the action. Call this method for vehicle features that that have both a start and stop point. For example, use it to start raising or lowering the top of a convertible. This method sends the request to the vehicle asynchronously. Use the returned object to get the execution status of the initial request, and to optionally stop the action. - Parameter action: The action to perform. Use this object to specify the action to perform and the vehicle on which to perform it. - Parameter continuationStrategy: The continuation strategy. - Returns: An object you use to get the results of the initial request and stop the action.

method · iOS 16.0+

perform

TypeScript
perform(action: RemoteKeylessEntryAction): RemoteKeylessEntryAction_ExecutionRequest
Swift declaration
func perform(_ action: RemoteKeylessEntryAction) throws -> RemoteKeylessEntryAction.ExecutionRequest

Sends a request to the vehicle to perform a one-time action. Call this method when the vehicle feature involves a one-time action. For example, use it to lock the doors of the vehicle. This method sends the request to the vehicle asynchronously. Use the returned object to get the execution status of the specified request. The execution status indicates whether the vehicle completed the action successfully or an error occurred. - Parameter action: The one-time action to perform. Use this object to specify the action you want to perform and the vehicle on which to perform it. - Returns: An object you use to get the results of the request.

method · iOS 16.0+ · Deprecated in iOS 18.0

perform

TypeScript
perform98822(enduringAction: RemoteKeylessEntryEnduringAction): RemoteKeylessEntryEnduringAction_EnduringExecutionRequest
Swift declaration
func perform(_ enduringAction: RemoteKeylessEntryEnduringAction) throws -> RemoteKeylessEntryEnduringAction.EnduringExecutionRequest

Sends a request to the vehicle to start an action that has a separate stopping point. Call this method for vehicle features that that have both a start and stop point. For example, use it to start raising or lowering the top of a convertible. This method sends the request to the vehicle asynchronously. Use the returned object to get the execution status of the initial request, and to optionally stop the action. - Parameter action: The action to perform. Use this object to specify the action to perform and the vehicle on which to perform it. - Returns: An object you use to get the results of the initial request and stop the action.

Skipped declarations

No declarations were skipped in this snapshot.

All CarKey types →