resolveProfileNumber(for:with:)
Resolves the profile index in which to save any settings.
Declaration
optional func resolveProfileNumber(for intent: INSaveProfileInCarIntent, with completion: @escaping @Sendable (INIntegerResolutionResult) -> Void)optional func resolveProfileNumber(for intent: INSaveProfileInCarIntent) async -> INIntegerResolutionResultParameters
- intent:
The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.
- completion:
The block to execute with the resolution. You must execute this block at some point during your implementation of this method. This block has no return value and takes the following parameter:
- resolutionResult
The object containing the details of your proposed resolution. For successful resolutions, create a resolution object whose value contains the index of the profile you intend to use. If the index doesn’t correspond to an available profile slot, you might specify a different slot and ask the user for confirmation.
Discussion
Implement this method to validate the profile number supplied by the user. If you don’t implement this method, SiriKit assumes that you’re able to save the profile using the specified index.