A type that contains information about a vehicle configured for
remote keyless entry in the user’s Apple Wallet.
A `VehicleReport` type provides information about a vehicle
you manufacture. The system generates a vehicle report for each
vehicle that matches your company's make, and that the owner
configured in their Apple Wallet. Use a vehicle report to get
information about the vehicle, such as whether it's currently
connected and able to receive commands. You can also use the
report to determine which vehicle features you can operate
from your app.
A vehicle can optionally attach proprietary data to one of its function
identifiers. You might use this data to support additional features
related to that vehicle feature. For example, you might want to
attach a unique security code to the door lock function. Use the vehicle
report to retrieve any data your vehicle sends. If the vehicle
sends new data, the system updates the report and notifies your
session delegate.
Members (5)
get · iOS 16.0+
identifier
TypeScript
get identifier(): string
Swift declaration
let identifier: String
The string you use to identify the vehicle when making requests.
Use this string to differentiate vehicles associated with the
session, and to ensure you send requests to the correct vehicle.
get · iOS 16.0+
isConnected
TypeScript
get isConnected(): boolean
Swift declaration
var isConnected: Bool { get }
A Boolean value that indicates whether the vehicle is currently
connected over Bluetooth.
The value of this property is `true` when the vehicle is connected
over Bluetooth, or `false` when it isn’t connected.
Retrieves the proprietary data associated with one of the
vehicle’s functions.
When it receives new data from a vehicle, the system updates
the vehicle report and notifies the session delegate. Call
this method to retrieve any data associated with a particular
feature of your vehicle.
- Parameter function: The function identifier for the given vehicle
feature. If you specify an unknown feature, this method throws
an error. For a list of the vehicle’s supported features,
see the ``supportedFunctions`` property.
- Returns: A data object, or `nil` if no data was present for
the specified feature.
get · iOS 16.0+
supportedFunctions
TypeScript
get supportedFunctions(): Array<FunctionIdentifier>
Swift declaration
var supportedFunctions: [FunctionIdentifier] { get }
An array of function identifiers that indicates the features
the vehicle supports, populated only after the first BLE connection
with the vehicle.
When building your app’s UI, use the information in this property
to determine what features you can access. The array contains all
supported features. To determine if a feature is currently supported,
call the ``status(for:)`` method.
Returns the current status of the specified vehicle function.
Each feature of your vehicle has one or more associated states,
which you define. For example, the door locks of a vehicle might
be in the locked or unlocked state. This method returns the state
if it is known.
- Parameters:
- function: The function identifier for the vehicle feature you
want to check. If you specify an unknown feature, this method throws
an error. For a list of the vehicle’s supported features, see
the ``supportedFunctions`` property.
- Returns: The status of the feature, or `nil` if the status is
currently unknown.