ios - Data Payload is not working in ios using FCM push notification
问题描述
I'm sending a notification using FCM server. My notification is working good when i'm sending from FCM console and postman.
In postman "notification payload" is working "data payload" is not working.and im shaing my payloads below,
notification payload.
{
"to":"asdF1X0mzp6SwjF......",
"priority":"high",
"content-available":true,
"ios":{
"priority":"high"
},
"apns":{
"headers":{
"apns-priority":"5"
},
"payload":{
"aps":{
"content-available":true
}
}
},
"data":{
"duration":"00:00:00",
"time":"15-Feb-2021 13:33:00",
"title":"On",
"body":"15-Feb-2021 13:33:00"
},
"notification":{
"title":"On",
"body":"15-Feb-2021 13:33:00"
}
}
Data payload
{
"to":"asdF1X0mzp6SwjF......",
"priority":"high",
"content-available":true,
"ios":{
"priority":"high"
},
"apns":{
"headers":{
"apns-priority":"5"
},
"payload":{
"aps":{
"content-available":true
}
}
},
"data":{
"duration":"00:00:00",
"time":"15-Feb-2021 13:33:00",
"title":"On",
"body":"15-Feb-2021 13:33:00"
}
}
I tried different payloads that not helped me. As per the FCM Document i used to sent Legacy HTTP V1 & Oauth2.0 also not working. My Push notification certificate and others are configured good. Kindly share your thoughts and correct me i'm sending a correct one or not.Thanks in advance
解决方案
推荐阅读
- react-native - 反应原生 | 'react-native run-android' 命令需要运行两次才能编译
- javascript - 是否可以使用 AJAX 在 jsp 上不断显示来自 Servlet 的数据?
- python - 如何在不复制代码的情况下将相同的例外应用于多个函数?
- javascript - 如何在 Chartist.JS 中为标签添加逗号
- python - 在入口小部件上意外捕获 GTK 多输入
- javascript - 无法启动 Vue CLI 项目
- ansible - 将 2 个寄存器输出行(每个都有值列表)传递/循环到 Ansible 中的下一个任务
- c# - 如何使用 Visual Studio 2017 调试器准确判断哪行代码更改了 C# 中的给定变量?
- go - golang并发一次的问题
- sql - SQL Server:合并同一张表的两行