How do I debug my Siri (Intents) extension?

2019-05-02 19:24发布

问题:

I'm building a Siri aka Intents extension. I do understand that I can attach the debugger to a running process after start, however, I never see my process. I do have the authorization for my app set to active and the extension must be running at least for some time, Siri is showing clear responses.

By the Apple documentation, you should run the Extension Scheme with Siri as host app. However, if I try that nothing happens on the device, it's waiting to attach for ever. Apple mentions the first connection can take "several minutes", but not hours ...

Any idea where I'm going wrong or how to achieve a connection to the debugger? Or at least some console output?

回答1:

just select your siri extension scheme and hit run button, then xcode will prompt a list of applications for you to choose, just choose your app, for more details, please checkout the article:http://jamesonquave.com/blog/adding-siri-to-ios-10-apps-in-swift-tutorial/



回答2:

  1. Run your app in device first.

  2. Select SIRIKIT extension scheme run in your device, select your app from the list prompted.

  3. Wait for SIRI to be active, send your running SIRIKIT extension into background.(Some times you need not to do this step also).

  4. Activate SIRI by pressing home button again, give a command and you will see your breakpoints working inside Intent Handler.