2 Replies
      Latest reply on Jul 11, 2019 3:37 AM by ratala1
      ratala1 Level 1 Level 1 (0 points)

        In my app, users can add tasks to lists via Sirikit (example Siri intent query: "In MyApp add to expense list 100 dollars for jeans"). if the list suggested is not available in the app, I ask for disambiguation.

        the result from multiple choice in disambiguation is not captured in resolveTargetTaskList.

        intent.targetTaskList?.title is the value I passed in the first try. as a result, it enters an infinite loop.


           func resolveTargetTaskList(for intent: INAddTasksIntent, with completion: @escaping (INTaskListResolutionResult) -> Void) {
                guard let title = intent.targetTaskList?.title else {
                    print("no title value")            
                completeResolveTaskList(listName: intent.targetTaskList!.title, with: completion)


            public func completeResolveTaskList(listName: INSpeakableString, with completion: @escaping (INTaskListResolutionResult) -> Void) {
                let allLists = getAllLists()
                for index in 0...(allLists.count - 1) {
                    if allLists[index].spokenPhrase.lowercased() == listName.spokenPhrase.lowercased() {
                        completion(.success(with: taskLists[index]))
                switch allLists.count {
                case 0:
                    completion(.disambiguation(with: taskLists))


        screenshot for reference:



        Please help me.