resolvePriority(for:with:)
Resolves the priority associated with the new tasks.
Declaration
optional func resolvePriority(for intent: INAddTasksIntent, with completion: @escaping @Sendable (INTaskPriorityResolutionResult) -> Void)optional func resolvePriority(for intent: INAddTasksIntent) async -> INTaskPriorityResolutionResultParameters
- intent:
The intent object that contains 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 while implementing this method. This handler has no return value and takes the following parameter:
- resolutionResult
The object that containts the details of your proposed resolution. For successful resolutions, create a resolution object with the Intemporaleventtrigger object that represents the trigger that you intend to use.
Discussion
This method resolves any priorities associated with the new tasks. Use the intent object to obtain the priority information, if any, suggested by the user. If the intent does not contain any priority information, and you don’t require any, return a resolution indicating that you don’t require a value.