resolveTargetTask(for:with:)
Resolves which task the user wants to modify.
Declaration
optional func resolveTargetTask(for intent: INSetTaskAttributeIntent, with completion: @escaping @Sendable (INTaskResolutionResult) -> Void)optional func resolveTargetTask(for intent: INSetTaskAttributeIntent) async -> INTaskResolutionResultParameters
- 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 handler block to execute with the resolution. 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:
- resolutionResult
The object containing the details of your proposed resolution. For successful resolutions, create a resolution object with the Intask object that you intend to modify.
Discussion
Implement this method to resolve the task that the user wants to modify. Use the intent object to obtain information about the task that the user wants to modify. Use the information in the INTask object to look up the corresponding task information in your app’s data structures. Return a resolution that includes as much information about the task as you have available.