Instance Method

handle(intent:completion:)

Handles restoring settings from the designated profile.

Required.

Declaration

func handle(intent: INSetProfileInCarIntent, completion: @escaping (INSetProfileInCarIntentResponse) -> Void)

Parameters

intent

The intent object containing details about the user’s request. The information in this object has already been resolved and confirmed.

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

The INSetProfileInCarIntentResponse object you create to report the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method should restore the settings from the specified profile. When done, execute the provided block with a response object indicating whether or not the operation was successful.