SiriKit功能技术咨询:是否可审批或读取通知内容?
Hey there! Glad you're diving into SiriKit's features—it's a powerful tool, but when it comes to notifications, there are some key limitations to keep in mind:
关于读取通知内容
SiriKit 没有直接读取设备通知内容的权限。苹果的隐私保护框架严格限制了对用户敏感通知数据的访问,这类操作 falls under the UserNotifications framework, not SiriKit. If your app needs to access notifications, you'll have to request relevant permissions separately via UserNotifications (like fetching UNNotification instances), but this is entirely independent of SiriKit's functionality—SiriKit can't directly call or retrieve this kind of notification data.
关于审批通知的能力
Similarly, SiriKit doesn't have the ability to approve, block, or manually allow/reject notifications. Notification management is fully handled by the system's Notification Center and the UserNotifications framework: developers can set up notification categories and configure permission request logic through this framework, but SiriKit can't intervene in the notification approval process.
补充:SiriKit与通知的间接交互
While it can't read or approve notifications, SiriKit can work with specific types of notifications for preset actions. For example, when a user receives a message notification, Siri can respond to voice commands like "Reply to this message"—but this relies on specific SiriKit intents like INSendMessageIntent, and only works with intent types your app has registered, not by directly reading the notification content.
内容的提问来源于stack exchange,提问作者Oleg Novosad

