您能否在 iMessage 或 Today Widgets 等应用程序扩展中使用 CoreNFC?

Are you able to use CoreNFC in app extensions such as iMesssage or Today Widgets?

我尝试将核心 NFC 添加到我今天的小部件和 iMessage 扩展中,但我没有遇到任何编译器错误。当我 运行 调出它的实际代码时,没有发生崩溃,但它出错并出现未知错误。我知道当 CoreNFC 出现时,错误经常出现,而且通常是涉及权利或许可的问题。

既然一直到成功调用委托的地步,我想知道我是否做错了什么让它出现。

可能吗?

我想知道为什么 Xcode 没有 UI 来为扩展添加授权。然后我在文档中看到了这个:

https://developer.apple.com/documentation/corenfc?language=objc

Note

Core NFC requires a device that supports Near Field Communication. Core NFC cannot be used in app extensions.