How do I debug my Siri (Intents) extension?

前端 未结 3 1049
北荒
北荒 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: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.

提交回复
热议问题