Contents

handle(intent:completion:)

Accesses and returns the car’s current power level status.

Declaration

func handle(intent: INGetCarPowerLevelStatusIntent, completion: @escaping  @Sendable (INGetCarPowerLevelStatusIntentResponse) -> Void)
func handle(intent: INGetCarPowerLevelStatusIntent) async -> INGetCarPowerLevelStatusIntentResponse

Parameters

  • intent:

    An intent object that contains the full details of the user’s request. The information in this object has already been resolved by your handler object.

  • completion:

    The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

    response

    An Ingetcarpowerlevelstatusintentresponse object you create to report the car’s current power level status. This parameter must not be nil.

Discussion

Your implementation of this method must access and return the current power status data from the car. If you are unable to access the data, return a response object whose result code indicates the reason for the failure.