One Logo Pool Ball
CarKey · IOS API REFERENCE

CarKeyRemoteControl

class · iOS 16.0+ · SDK 27.1

class CarKeyRemoteControl

The object you use to start a new vehicle-related session. Use a ``CarKeyRemoteControl`` object to create the session your app uses to communicate with the vehicles your company manufactures. You don’t create an instance of this object. Instead, call the ``start(delegate:subscriptionRange:with:)`` class method to request a new session object. The system retrieves the relevant vehicle information from person's Apple Wallet and adds vehicles that match your company's make to the session. Start a new session only when your app is running in the foreground. If your app enters the background, end the current session and start a new one when your app returns to the foreground.

Members (3)

static · iOS 26.0+

registerForLaunchOnCarKeyEvent

TypeScript
static registerForLaunchOnCarKeyEvent(): void
Swift declaration
class func registerForLaunchOnCarKeyEvent() throws

Register your app to be relaunched in the background on CarKey events. Under certain conditions the system will not relaunch the app regardless of CarKey events. Because of user actions, it’s possible that an app may no longer be eligible to be relaunched in response to CarKey events. Therefore it’s important to educate the users of your app, so that they understand how their actions impact its functionality. Well designed apps will be resilient under such conditions. Registered apps will be relaunched on CarKey events under the following conditions: - App removed from memory (while having an active CarKeyRemoteControlSession) - App crashed (while having an active CarKeyRemoteControlSession) - Device restarted and unlocked for the first time

static · iOS 26.0+

unregisterForLaunchOnCarKeyEvent

TypeScript
static unregisterForLaunchOnCarKeyEvent(): void
Swift declaration
class func unregisterForLaunchOnCarKeyEvent() throws

Unregister your app so it's no longer relaunched in the background on CarKey events.

static · iOS 16.0+

start

TypeScript
static start(delegate: Implements<CarKeyRemoteControlSessionDelegate> | SDKHandle, subscriptionFunctionIDRange?: (SDKHandle) | null, delegateCallbackQueue?: (_Dispatch_DispatchQueue) | null): Promise<CarKeyRemoteControlSession>
Swift declaration
class func start(delegate: any CarKeyRemoteControlSessionDelegate, subscriptionRange subscriptionFunctionIDRange: ClosedRange<Int>? = nil, with delegateCallbackQueue: DispatchQueue? = nil) async throws -> CarKeyRemoteControlSession

Creates and returns a new session object to access the provisioned vehicles. This method creates a new session object each time you call it. You can have only one active session at a time. If you call this method while a session is already active, the method waits until the previous session becomes invalid before returning the new session. The session object gives you access to the vehicles that your company makes and that the owner added to their Apple Wallet. - Parameters: - delegate: The object you use to receive data from the vehicle and handle connection issues. You must specify this object at session-creation time, and can only change it by creating a new session. This object must adopt the ``CarKeyRemoteControlSessionDelegate`` protocol. - subscriptionFunctionIDRange: The range of function IDs your app supports for the current session. Each vehicle feature you can control remotely has an associated function identifier code. Use this parameter to limit the features accessible to the current person. For example, you might include a subset of features to limit the actions of someone who isn't the vehicle's primary owner. - delegateCallbackQueue: The queue on which to execute the methods of your delegate object. If you specify `nil`, CarKey creates a new serial dispatch queue for you. - Returns: A new session object.

Skipped declarations

No declarations were skipped in this snapshot.

All CarKey types →