相关疑难解决方法(0)

FCM with Postman - 请求缺少身份验证密钥(FCM令牌)

在此输入图像描述

//身体就像这样

{
    "to":
    "/topics/NEWS"
    ,
    "data":{
        "extra_information": "This is some extra information"
    },
Run Code Online (Sandbox Code Playgroud)

//我需要提供的通知

"notification":{
            "title": "ChitChat Group",
            "text": "You may have new messages",
            "click_action":"ChatActivity"
        }
    }
Run Code Online (Sandbox Code Playgroud)

firebase postman firebase-cloud-messaging

30
推荐指数
3
解决办法
2万
查看次数

Firebase Cloud Messaging不以正确的格式发送iOS通知内容和服务扩展的aps负载

我正在尝试使用Firebase实施通知.当应用程序位于后台或前台时,会正确接收通知.所以,基本机制正在发挥作用.

现在我已将Content Extensions和Service Extensions添加到应用程序中.内容扩展在我使用本地通知时有效,但只要考虑可选字段,Firebase消息有效内容就会显示不正确.这是我的控制台图像的链接:

具有可变内容和类别选项的Firebase控制台图像

以下是Firebase远程通知有效负载(为了匿名而编辑了一些长Google数据:

{
    aps = 
    {
        alert = 
        {
        body = "Eureka! 11";
        title = "Patient is not doing well";
        };
    };
    category = provider-body-panel;
    gcm.message_id = 0:149073;
    gcm.n.e = 1;
    google.c.a.c_id = 2825604;
    google.c.a.e = 1;
    google.c.a.ts = 149073;
    google.c.a.udt = 0;
    mutable-content = 1;
}
Run Code Online (Sandbox Code Playgroud)

似乎"类别"和"可变内容"不在正确的位置.它们应该在aps有效载荷中.

如何让这些选项在有效负载中,以便我的应用程序可以正确解析它并将其与内容和服务扩展连接?

apple-push-notifications ios firebase firebase-cloud-messaging

7
推荐指数
1
解决办法
4645
查看次数