iOS 和 Google Firebase - 如何执行通知操作
iOS and Google Firebase - How to do Notification Actions
我的目标:
使用 Google Firebase 消息传递,设置 iOS 通知操作
引用的资源:
- Action Notification Tutorial
- FCM - Message Format
- FCM - Message Format with Data
- FCM - Handling Messages on iOS
- iOS - Remote Notification Payload
问题:
我已经查看了上述资源,但我仍然无法弄清楚如何为 iOS 设置类别键,从而启用通知操作。我该怎么做?
我在写问题的时候弄明白了,Google 搜索对我没有帮助,所以希望这对其他人有帮助。
我在这篇文档中找到了答案:FCM HTTP Protocol
在"Notification payload support"部分,参数click_action
表示"Indicates the action associated with a user click on the notification. Corresponds to category in the APNs payload."
所以click_action
== aps.category
我的目标: 使用 Google Firebase 消息传递,设置 iOS 通知操作
引用的资源:
- Action Notification Tutorial
- FCM - Message Format
- FCM - Message Format with Data
- FCM - Handling Messages on iOS
- iOS - Remote Notification Payload
问题:
我已经查看了上述资源,但我仍然无法弄清楚如何为 iOS 设置类别键,从而启用通知操作。我该怎么做?
我在写问题的时候弄明白了,Google 搜索对我没有帮助,所以希望这对其他人有帮助。
我在这篇文档中找到了答案:FCM HTTP Protocol
在"Notification payload support"部分,参数click_action
表示"Indicates the action associated with a user click on the notification. Corresponds to category in the APNs payload."
所以click_action
== aps.category