Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone & notifications : max number of notifications?

I have an iPhone app sending notifications and everything is working fine... Except sometimes :)

Let me explain : I'm using a pretty simple PHP script to send the notifications (using the stream_context_create method) but some users told me they do not receive some notifications. Apparently, I may encounter some cases where I need to send up to 50,000 notifications within a minute and I think this might be the problem. I'm using one single stream to send all the notifications.

Did any of you guys encountered such an issue? Do I need to split in several streams? Is there any info about the max number of notifications I may send in a stream?

Thanks :)

Edit 1

"Speed" is not the issue here : I am able to push all my notifications to Apple within a minute (I may have some issues in the future if my number of users growns but it's OK ATM). The problem I see here is that Apple may consider me a spammer or something and does not deliver all my 50,000 notifications :/ Do you guys have any idea how I can get sure about that?

like image 545
Vivi Avatar asked Nov 03 '10 11:11

Vivi


People also ask

Which is the best iPhone in world?

Apple's iPhone 13 Pro Max is the best iPhone available. We compared the camera, battery life, size, price, storage and other specs of all iPhones and concluded that the iPhone 13 Pro Max is the best iPhone on the market.

Will there be an iPhone 14?

Instead, Apple is making two 6.1-inch iPhones (iPhone 14 and iPhone 14 Pro), along with two 6.7-inch iPhones (iPhone 14 Max and iPhone 14 Pro Max). For the Pro models, the notch is going to be replaced a pill-shaped cutout for the camera and the Face ID equipment.

Why is iPhone 11 so good?

It has faster performance, an ultra wide camera, night mode, an hour longer battery life, new colors, and a lower starting price at $699 instead of the $749 the iPhone XR launched at. That's a hell of a value for a new iPhone no matter how you look at it.


2 Answers

I asked an Apple developer representative about this and was told there were no rate limits and that the system had never dropped a notification.

(This was 12 months ago, when Push was still relatively new, so they may have changed policies since then)

like image 100
grahamparks Avatar answered Oct 02 '22 17:10

grahamparks


I would rather develop the code to send the notifications in C. PHP, being a scripting language, can not (probably) guarantee the required speed to handle 50K notifications per minute. Moreover, you may need a very hugely provisioned server with latest generation CPUs and a lot of memory. Indeed, to meet the QOS you require, you must be able to send about 14 notification per second. I doubt PHP is actually able to cope with this rate.

In the past I had my own provider, and my QOS was much less than the one you require. Then I decided to switch to a commercial service provider, Urban Airship. I have found this service works like a charm. None of the users have - ever - reported a missing notification. You have to pay for it, but handling this stuff by yourself may prove to be an incredible hassle.

like image 44
Massimo Cafaro Avatar answered Oct 02 '22 15:10

Massimo Cafaro