<legend id='3iZhU'><style id='3iZhU'><dir id='3iZhU'><q id='3iZhU'></q></dir></style></legend>
    1. <small id='3iZhU'></small><noframes id='3iZhU'>

      • <bdo id='3iZhU'></bdo><ul id='3iZhU'></ul>
      <tfoot id='3iZhU'></tfoot>
      <i id='3iZhU'><tr id='3iZhU'><dt id='3iZhU'><q id='3iZhU'><span id='3iZhU'><b id='3iZhU'><form id='3iZhU'><ins id='3iZhU'></ins><ul id='3iZhU'></ul><sub id='3iZhU'></sub></form><legend id='3iZhU'></legend><bdo id='3iZhU'><pre id='3iZhU'><center id='3iZhU'></center></pre></bdo></b><th id='3iZhU'></th></span></q></dt></tr></i><div id='3iZhU'><tfoot id='3iZhU'></tfoot><dl id='3iZhU'><fieldset id='3iZhU'></fieldset></dl></div>

        适用于 iOS 的 FCM 丰富推送通知负载

        时间:2023-07-29
      1. <i id='WwHWj'><tr id='WwHWj'><dt id='WwHWj'><q id='WwHWj'><span id='WwHWj'><b id='WwHWj'><form id='WwHWj'><ins id='WwHWj'></ins><ul id='WwHWj'></ul><sub id='WwHWj'></sub></form><legend id='WwHWj'></legend><bdo id='WwHWj'><pre id='WwHWj'><center id='WwHWj'></center></pre></bdo></b><th id='WwHWj'></th></span></q></dt></tr></i><div id='WwHWj'><tfoot id='WwHWj'></tfoot><dl id='WwHWj'><fieldset id='WwHWj'></fieldset></dl></div>
          <tbody id='WwHWj'></tbody>

        1. <tfoot id='WwHWj'></tfoot>

          • <bdo id='WwHWj'></bdo><ul id='WwHWj'></ul>

                  <small id='WwHWj'></small><noframes id='WwHWj'>

                  <legend id='WwHWj'><style id='WwHWj'><dir id='WwHWj'><q id='WwHWj'></q></dir></style></legend>
                  本文介绍了适用于 iOS 的 FCM 丰富推送通知负载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在为我的项目使用 FCM.它具有丰富的类型推送通知.我尝试修改大多数可能的方式来从 FCM 获取推送.我得到了来自 FCM 的普通推送,而不是图片.

                  I am using FCM for my project. It's have rich push notification for a type. I tried to modified most of possible ways to get push from FCM. I got obly ordinary push from FCM, not with image.

                  我还使用 push try 来检查 APNS 相同的编码.我得到了推送通知的预期设计.

                  I am also check with APNS same coding using push try. I got what expected design for push notification.

                  这是我的 APNS 有效负载

                  {
                    "aps": {
                       "alert": "Enter your message",
                       "badge": 1,
                       "sound": "default",
                       "content-available": 1,
                       "mutable-content": 1
                    },
                    "mediaUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FloorGoban.JPG/1024px-FloorGoban.JPG"
                  }
                  

                  这里FCM有效载荷

                  {
                     "to": "dWB537Nz1GA:APA91bHIjJ5....",
                     "data":
                     {
                        "message": "Offer!",
                        "mediaUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FloorGoban.JPG/1024px-FloorGoban.JPG"
                     },
                     "notification":
                     {
                        "body": "Enter your message",
                        "sound": "default",
                        "content-available": 1,
                        "mutable-content": 1
                     }
                  }
                  

                  我还需要类别 更多详情FCM中的有效载荷

                  我是否遗漏了 fire-base 控制台中的任何设置,或者是来自有效负载的设置.

                  Am I missing any setting in fire-base console or is that from payload.

                  推荐答案

                  您的 FCM 负载中的 mutable-contentcontent-available 不正确.它应该被格式化为 mutable_contentcontent_available.两者都是 boolean 并且还必须在 notification 参数之外.像这样:

                  The mutable-content and content-available in your FCM payload is incorrect. It should be formatted as mutable_content and content_available. Both are boolean and must also be outside the notification parameter. Like so:

                  {
                     "to": "dWB537Nz1GA:APA91bHIjJ5....",
                     "content_available": true,
                     "mutable_content": true,
                     "data":
                     {
                        "message": "Offer!",
                        "mediaUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FloorGoban.JPG/1024px-FloorGoban.JPG"
                     },
                     "notification":
                     {
                        "body": "Enter your message",
                        "sound": "default"
                     }
                  }
                  

                  对于 FCM 中 category 的对应项,您应该使用 click_action:

                  For the counterpart of category in FCM, you should use click_action:

                  与用户点击通知相关的操作.

                  The action associated with a user click on the notification.

                  对应于 APNs 负载中的 category.

                  Corresponds to category in the APNs payload.

                  这篇关于适用于 iOS 的 FCM 丰富推送通知负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:证书有效时 InvalidApnsCredential 下一篇:Firebase 云消息传递 API 密钥

                  相关文章

                    <tfoot id='fscOi'></tfoot><legend id='fscOi'><style id='fscOi'><dir id='fscOi'><q id='fscOi'></q></dir></style></legend>

                    <small id='fscOi'></small><noframes id='fscOi'>

                    <i id='fscOi'><tr id='fscOi'><dt id='fscOi'><q id='fscOi'><span id='fscOi'><b id='fscOi'><form id='fscOi'><ins id='fscOi'></ins><ul id='fscOi'></ul><sub id='fscOi'></sub></form><legend id='fscOi'></legend><bdo id='fscOi'><pre id='fscOi'><center id='fscOi'></center></pre></bdo></b><th id='fscOi'></th></span></q></dt></tr></i><div id='fscOi'><tfoot id='fscOi'></tfoot><dl id='fscOi'><fieldset id='fscOi'></fieldset></dl></div>

                      • <bdo id='fscOi'></bdo><ul id='fscOi'></ul>