Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: How many push notifications can be sent in a single request?

I'm using APNS python wrapper library to send push notifications. Apple docs say payload limit on a message is 256 bytes. But since multiple PNs can be sent in one request, I wanted to know if there is a limit to the number of messages allowed in the same request?

What is the correct way of sending lots (1000+) of push notifications? Does Apple server limit connections/sec or PNs/sec to avoid spam?

like image 510
maroux Avatar asked Mar 24 '13 16:03

maroux


People also ask

How many push notifications should you send?

As a rule of thumb, do not send more than 3-5 notifications every week. Even then, make sure that the notifications have something relevant for the user. Understand how users would use your app in their daily lives and identify opportunities to enhance that experience using push messages.

Does Apple block push notifications?

iOS enables you to both disable push notifications entirely, or turn them off for individual apps. To access iOS notifications settings, go into the Settings > Notifications menu. From that list, you can configure each app's notifications settings or disable them.

How many notifications are too much?

That said, the best thing to do is send your customers 2 notifications a day at most. And no more than 5 a week. An average of 1 notification a day works even better. The average US smartphone user gets over 46 notifications a day on their mobile device.

What is Apple push rule?

An iOS push notification is a message that pops up on an Apple device such as an iPhone. Before receiving push notifications from an app, iOS device users must explicitly give permission. Once a user opts-in, mobile app publishers can send push notifications to the users' mobile devices.


1 Answers

As Jonathan said in his comment, Apple doesn't specify a limit in the APNS documentation.

Since you send the notifications as binary data over a TCP connection, the number of notifications that would be sent in a single request depends on the size of your TCP buffers.

You don't have to send one notification per request. I'm not sure there's even a meaning to the term single request in this case (since they don't return a response for each notification sent). Apple encourages you to keep the connection open as long as possible. As long as it is open, you can write as many bytes (belonging to multiple push notifications) as you wish.

EDIT :

Apple recently edited their technical note regarding push notifications :

Push Notification Throughput and Error Checking

There are no caps or batch size limits for using APNs. The iOS 6.1 press release stated that APNs has sent over 4 trillion push notifications since it was established. It was announced at WWDC 2012 that APNs is sending 7 billion notifications daily.

If you're seeing throughput lower than 9,000 notifications per second, your server might benefit from improved error handling logic.

like image 104
Eran Avatar answered Oct 19 '22 04:10

Eran