更新时间:2023-09-08 13:49:52
感谢 Malik 的回答.FCM 似乎将 android 特定的click_action"属性转换为 iOS 特定的category"属性.
Thanks Malik for the answer. FCM seems to translate the android specific "click_action" property to the iOS specific "category" property.
我们通过他们的 REST API 发送 firebase 推送通知,可以很容易地使用 postman 进行测试.
We send firebase push notifications via their REST API, which can be easily used for testing with postman.
这是 REST 版本:
Here is the REST version:
POST https://fcm.googleapis.com/fcm/send
标题:
身体:
{ "notification": {
"text": "YOUR_PUSH_TEXT",
"click_action":"YOUR_IOS_ACTIONABLE_NOTIFICATION_CATEGORY"
},
"to" : "YOUR_PUSH_TOKEN",
"data": {
"YOUR_CUSTOM_DATA": "DATA"
}
}