-1

I have written a Siri Intents extension with a corresponding IntentsUI extension. But only the custom intent response is sayed by siri, the IntentsUI is not displayed.

All targets .plist have my CustomIntent in the NSExtensionAttributes IntentsSupported array.

The IntentUI is displayed when i open the lockscreen siri suggestion notification, but not when i ask to siri

I tried to add os.log in IntentViewController configureView() function but nothing displayed in the console when i ask to siri

Siri : https://i.stack.imgur.com/1MayS.jpg
Siri Suggestion: https://giphy.com/gifs/W3NNEuRIwrpbiAR0tb

func configureView(for parameters: Set<INParameter>, of interaction: INInteraction, interactiveBehavior: INUIInteractiveBehavior, context: INUIHostedViewContext, completion: @escaping (Bool, Set<INParameter>, CGSize) -> Void) {
        guard interaction.intent is GreenGroceryIntent else {
            completion(false, Set(), .zero)
            return
        }

        let width = self.extensionContext?.hostedViewMaximumAllowedSize.width ?? 320
        let desiredSize = CGSize(width: width, height: 300)

        completion(true, parameters, desiredSize)
}

extension IntentViewController: INUIHostedViewSiriProviding {
    var displaysMessage: Bool {
        return true
    }

    var displaysMap: Bool {
        return false
    }

    var displaysPaymentTransaction: Bool {
        return false
    }
}

What are the steps to make the custom UI to show, what can I check to make sure I have done this correctly ?

Thanks.

mmnl.dev
  • 1
  • 1
  • 2
  • welcome to SO! Provide some code for your question: what you tried, etc See also https://stackoverflow.com/help/how-to-ask – cccnrc Aug 15 '19 at 14:24

1 Answers1

0

I have similar issue. I worked on some siri shortcut myself a month back. I tested it again last Aug 13 and it didn't work. Specifically my custom intents does not trigger the extension UI view controller.

I stumbled upon this tweet and was able to confirm my suspicion that there was an issue in apples side. https://twitter.com/joehribar/status/1162036267682394112?s=20

They mentioned it works well in ios 13. Its a pain however to develop for ios 13 coz you have to update OS, Xcode and the phone to beta.

Other thing I could think of is to create a build and install it on your ios 13 phone so you don't have to update your OS and Xcode.

  • Thanks for your answer Marianne, that's confirm my test. Yesterday i try in iOS 13 yesterday and UI appear correctly. – mmnl.dev Aug 17 '19 at 15:39
  • Siri Shortcuts UI are back https://twitter.com/joehribar/status/1162778128122441728 – mmnl.dev Aug 18 '19 at 16:57