首页 > 解决方案 > Firebase 通知未发送 IOS 设备

问题描述

我正在尝试从编写的 API 向多个设备发送 Firebase 通知PHP。它可以毫无问题地向android 设备发送通知,但ios 设备并非如此。 这是android的有效载荷:

{
  "registration_ids": [
    "d-Ao4YZ1V_E:APA91bFzT1Es9VhDX4OC_2zOV4RWmDXQ-PP24Za-D-uXAwyWdrd2W3bQkHAc3M1uwYKXTDiWix5teBwfTHbRmHcMbz5q39OCNsGgtgH_n0wxyo0ceL2ZfA8y7o3D0cXDLv2iVMjhmHAA5sVJUOBhfXf-mbzw7E2hog",
    "eRetdkDVHvY:APA91bEzUKrnK5cHskxOGTlHZtxYjXsxPyRlj8XRNVOcoX-8aCfY7z0cU0yFVGplBiONqSEV8wtslmW6sDXGodiirS0oKDPUzAaAT91Su5Yrnzs1XHHlfJA6rQurp941rC0hKJ8vd_e9JcfjihlGP36Cu3Tpb3hELw"
  ],
  "data": {
    "title": "Producer",
    "text": "Setting Check",
    "notification": {
      "NotificationID": "5864",
      "NotificationType": "",
      "Title": "Producer",
      "Text": "Setting Check"
    },
    "sound": "true"
  },
  "content_available": true,
  "priority": "high"
}

这是我的 ios 设备有效负载:

{
  "registration_ids": [
    "dsMZdthHp6E:APA91bH8UcvSiEjlk9b6QRwrWiCWz65k5i-CxKLB3LGqHdz7FG7gPWHRwnNBtsvdWZLg_9Fx8lRFOKyf17XKEm_mdbRAGzni6wbsogDdiG_ARQxCAm8qVD0iaQKvB_tosWcukLLVu3qrbZxc3BjmSvGjeNJaBAcHkQ",
    "eXhFfdy9oO4:APA91bGp3bMu-ps6euvBTDW5HshAIgdswFUgZ6p7EIFeW7abHMz2uIwmzzZuqz0bEwEAGi2fGLb0JJ4bhKhoGAs0EH4yqd0WDVkVH9Je6b7q9WFzBDDF__jIGoF1ShdM8qoqnVbeJmOSf3bS7s89xKmUh_m2x0ecQg"  ],
  "notification": {
    "title": "Custom Notification",
    "text": "This custom notification is sent through Vendors area. Let's see if it works?",
    "sound": "default"
  },
  "data": {
    "notification": {
      "Title": "Producer",
      "Text": "Setting Check"
    },
    "title": "Producer",
    "text": "Setting Check"
  },
  "content_available": true,
  "priority": "high"
}

问题出在有效载荷上,但我似乎无法找到问题所在。我是火力基地的新手。请帮我整理一下。

标签: iosfirebasefirebase-notifications

解决方案


推荐阅读