Contents

status(for:)

Returns the current status of the specified vehicle function.

Declaration

func status(for function: FunctionIdentifier) throws -> FunctionStatus?

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.

Return Value

The status of the feature, or nil if the status is currently unknown.

Discussion

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.

See Also

Getting the Vehicle’s Supported Functions