无法将调试器附加到UNNotificationServiceExtension [英] Can't attach debugger to UNNotificationServiceExtension

查看:467
本文介绍了无法将调试器附加到UNNotificationServiceExtension的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在UNNotificationServiceExtension中使用调试器.

I'm not being able to use the debugger in a UNNotificationServiceExtension.

当尝试将调试器附加到UNNotificationServiceExtension时,这就是我要做的事情:

Here's what I do when attempting to attach the debugger to the UNNotificationServiceExtension:

  1. 运行应用
  2. 在测试" UNNotificationServiceExtension中设置断点
  3. 选择调试">按PID或名称附加到进程">选择测试" UNNotificationServiceExtension
  4. XCode指示测试正在等待连接"

  1. 然后我发送一个推送通知,我的iPhone显示该通知,但调试器未达到断点.而是,XCode显示"Thread1:信号SIGKILL".

有人知道如何使调试器在UNNotificationServiceExtension中工作吗?

Does anyone know how to get the debugger to work in a UNNotificationServiceExtension?

推荐答案

当调试器附加到服务扩展时,不要在Xcode上运行.

Don't hit run on Xcode when the debugger is attached to the service extension.

将调试器连接到包含"应用程序并运行该应用程序. 然后将调试器附加到服务扩展.

Connect the debugger to the Containing app and run the app. Then attach the debugger to the service extension.

我不知道为什么在调试器连接到服务扩展时不能运行它.我正在猜测与将NSExtensionPointIdentifier设置为 com.apple.usernotifications.service ,并且一旦操作系统发现一切都陷入困境,因为只有操作系统才应该启动服务扩展.

I don't know why you can't run it when the debugger is connected to the service extension. I'm guessing it has something to do with NSExtensionPointIdentifier set to com.apple.usernotifications.service and once the OS sees that things go to hell because only the OS should launch the service extension.

这篇关于无法将调试器附加到UNNotificationServiceExtension的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆