无法在APS对象中发送类别

时间:2019-06-23 14:22:00

标签: ios objective-c firebase push-notification objective-c-category

我正在尝试通过Firebase将推送通知发送到ios设备,并且我还需要使用aps有效负载发送类别对象,以便可以使用操作按钮创建通知。我使用的是Firebase文档中指定的以下有效负载,但无法在前端的aps有效负载对象中接收类别对象。任何帮助将是可观的。预先感谢。

{
  "message": {
    "token": "f8vYHFfogAA:APA91bG7cZlo7Iimv1UtD0atqTlBRKYsGTU2pdWQmfELpdG61E4_TstS8MNHvHgNJW_dECi8YxD0REiDjxbkBVK4Ey9MNJ4MTxBVJpa48sirKb2a93QyfrpRwDMB9_j8UaNexP5rQ7Ci",
    "notification": {
      "title": "Match update",
      "body": "Arsenal goal in added time, score is now 3-0"
    },
    "android": {
      "ttl": "86400s",
      "notification": {
        "click_action": "OPEN_ACTIVITY_1"
      }
    },
    "apns": {
      "headers": {
        "apns-priority": "100"
      },
      "payload": {
        "aps": {
          "category": "NEW_MESSAGE_CATEGORY"
        }
      }
    },
    "webpush": {
      "headers": {
        "TTL": "86400"
      }
    }
  }
}

0 个答案:

没有答案