confirm(intent:completion:)
Confirms whether you can save the settings to the designated profile.
Declaration
optional func confirm(intent: INSaveProfileInCarIntent, completion: @escaping @Sendable (INSaveProfileInCarIntentResponse) -> Void)optional func confirm(intent: INSaveProfileInCarIntent) async -> INSaveProfileInCarIntentResponseParameters
- intent:
The intent object containing details about the user’s request. Your handler object has already resolved the information in this 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
The Insaveprofileincarintentresponse object containing the status of whether your app is able to save settings to a profile. This parameter must not be
nil.
Discussion
Implement this method to validate that you can save settings to a profile. For example, you might use this method to verify that you’ve an active connection to the vehicle or that you can use the specified profile name when saving the settings. At some point in your implementation, execute the provided completion block with a response object indicating your app’s readiness to make the change.