Posts

Post not yet marked as solved
0 Replies
292 Views
I am adding a task to list in my app through SiriKit intents. once the task is added, the UI from IntentsUI is shown twice.screenshot for reference:https://drive.google.com/file/d/1NOSk2HKKu5p6N-7yjC75_DmX9GDnQqeM/view?usp=sharing
Posted
by ratala1.
Last updated
.
Post not yet marked as solved
2 Replies
610 Views
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 { completion(.needsValue()) print("no title value") } completeResolveTaskList(listName: intent.targetTaskList!.title, with: completion) } public func completeResolveTaskList(listName: INSpeakableString, with completion: @escaping (INTaskListResolutionResult) -> Void) { print("completeResolveTaskList") 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(.unsupported()) default: completion(.disambiguation(with: taskLists)) } }screenshot for reference:https://drive.google.com/file/d/1Ds-Z9FWpNEHwA0urBu3i4yazi0NEMsGq/view?usp=sharingPlease help me.
Posted
by ratala1.
Last updated
.