resolveGroupName(for:with:)
Resolves the intended group for the task list.
Declaration
optional func resolveGroupName(for intent: INCreateTaskListIntent, with completion: @escaping @Sendable (INSpeakableStringResolutionResult) -> Void)optional func resolveGroupName(for intent: INCreateTaskListIntent) async -> INSpeakableStringResolutionResultParameters
- 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 name of the group in which you intend to place the task list.
Discussion
Implement this method to resolve the intended group for a task list. Use the intent object to obtain the group information, if any, specified by the user. Groups are a way for you to organize the task lists of your app. For example, the Reminders app automatically provides a group for each unique service, such as iCloud, that manages task lists and tasks.
If the intent doesn’t contain a group name, choose a resolution that’s most appropriate for your app. If your app doesn’t support organizing notes into groups, you might return a result indicating that the group name isn’t required. If you’re able to select a default group for the note, create a successful resolution that includes the name of the group you selected.