我正在尝试通过用PHP
编写的API将Firebase通知发送到多个设备。它可以将通知发送到 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"
}
问题出在有效载荷上,但是我似乎找不到问题所在。请帮我解决这个问题。