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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With