How do I debug my Siri (Intents) extension?

前端 未结 3 975
北荒
北荒 2021-02-20 00:20

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 s

相关标签:
3条回答
  • 2021-02-20 00:37
    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.

    0 讨论(0)
  • 2021-02-20 00:40

    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/

    0 讨论(0)
  • 2021-02-20 00:40

    I tried all the ways and it didn't work I think it's because I have a mac too old (2010) and has no ability to process.

    This is a very hack solution to debug but it works.

    Create a webhook using this site https://webhook.site

    Then if you want to check if you code was in some point just add this code: (Don't forget to change the URL for the same that you received webhook)

    let url1 = URL(string: "https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/your_code_was_here")!
    let task1 = URLSession.shared.dataTask(with: url1)
    task1.resume()
    

    Then you just need to look again at the webhook site to see if the GET request got there.

    0 讨论(0)
提交回复
热议问题