iOS Push Notification Priority

2019-06-18 02:14发布

问题:

I have push notifications set up and working correctly, however, sometimes I experience delays in the delivery on the end device. Is there a way I can set the "priority" key of the push to be 10 so the push is sent immediately? I don't believe I can just put it in the dictionary with the other keys such as "alert" because Apple's docs say it should be separate from the payload.

回答1:

You should set apns-priority in your request header, here's the APNs Provider API doc.