Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Push Notification -- is it possible to make a batch request for a large number of notifications?

Tags:

ios

iphone

ipad

I need to push notification to 10,000 users. Do I need to make 10,000 requests to the Apple APNS server ? Could I do it in a batch way ?

If I need to send the push requests one by one, is there any significant time difference between the first user and the last user when they receive the notification ?

Thanks

like image 822
user403015 Avatar asked Aug 10 '11 15:08

user403015


People also ask

What are the limitations of push notifications?

A basic notification includes a title, some text, an icon, and a link. A title can contain up to 65 characters, a description is generally limited to 240 characters.

How many bytes we can send to Apple push notification server?

Apple Push Notification service (APNs) refuses a notification if the total size of its payload exceeds the following limits: For Voice over Internet Protocol (VoIP) notifications, the maximum payload size is 5 KB (5120 bytes). For all other remote notifications, the maximum payload size is 4 KB (4096 bytes).

How many push notifications do people get a day?

The average US smartphone user gets over 46 notifications a day on their mobile device. So, most of your subscribers get overloaded with push notifications as is. If you keep sending push notifications every hour, your subscribers are definitely going to get annoyed.


2 Answers

Just to clarify, you cannot send 1 identical message to more than one recipient in a broadcast like manner. However you can make one connection to the APNS server and send 10,000 messages in one session. Since each message is quite small, 10,000 messages will not take that long to send on any decent connection to the internet. I can't give you a specific time duration, as it will depend on what is between you and the APNS server.

like image 180
iandotkelly Avatar answered Nov 21 '22 11:11

iandotkelly


Unfortunately there is no way to tell APNS to push a message to all devices that are registered to receive notifications from your app so yeah, you have to do it one by one.

With 10000 users there shouldn't a noticeable delay between first and last user. Since every device has a different network connection, notifications are usually at least a few hundreds of milliseconds late anyway.

like image 36
Filip Radelic Avatar answered Nov 21 '22 09:11

Filip Radelic