Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Push Notification Priority

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.

like image 522
Jacob Avatar asked May 23 '15 10:05

Jacob


People also ask

Is there a way to prioritize notifications on iPhone?

Schedule a notification summary The summary is personalized to you and ordered by priority based on how you use your apps, with the most relevant notifications at the top. To schedule a notification summary: Go to Settings > Notifications > Scheduled Summary, then turn on Scheduled Summary.

What is APNs priority?

apns-priority. The priority of the notification. If you omit this header, APNs sets the notification priority to 10 . Specify 10 to send the notification immediately. Specify 5 to send the notification based on power considerations on the user's device.

Are Apple push notifications guaranteed?

The system makes every attempt to deliver local and remote notifications in a timely manner, but delivery isn't guaranteed. The PushKit framework offers a more timely delivery mechanism for specific types of notifications, such as those VoIP and watchOS complications use.


1 Answers

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

like image 166
Longfei Wu Avatar answered Oct 06 '22 01:10

Longfei Wu