I am using push notifications in iOS. But as my dot.net developer told me that the maximum number of notifications reached.
So my concern is how much notifications are allowed in one day in development mode.
According to this Apple technote:
There are no caps or batch size limits for using APNs
There's a limit to the size of the notification itself:
In iOS 8 and later, the maximum size allowed for a notification
payload is 2 kilobytes; Apple Push Notification service refuses any
notification that exceeds this limit. (Prior to iOS 8 and in OS X, the
maximum payload size is 256 bytes.)
There is no such limit for sending push notification. You can send as many push notification as you want.
Related
We have a Swift based app out on the App Store which includes a team messenger.
We experience issues on the deliverability of some background push notifications.
If we login with the same account on an iOS and Android device, all push notifications appear on the Android device while only some of the push notifications show up on the iOS device.
Based on this, the issue doesn’t seem to be related to the backend. Going through the Swift code, everything also seems to be fine - and we do also get some push notifications.
Setup:
We send push notifications directly from the backend (node.js) through APNS to
the iOS devices. We don't use any provider in-between (like e.g. Pusher).
Issue description:
Testing on 3 devices (fully charged battery, bluetooth turned off, do not disturb disabled, no apps installed which could block push notifications etc).
Device A: iPhone5 on iOS 10.3.3 - 7GB free space.
Device B: iPhone5 on iOS 10.3.3 - 9GB free space.
Device C: iPhone5S on iOS11.
Test on a slow wifi connection (even though a speed test shows 22Mbps download):
All push notifications with 10 characters went through on all 3 devices.
Push notifications with +20 characters were only displayed on device B + C.
Above +30 characters, no push notifications are received on device B + C.
Test on a faster wifi connection:
Same device A and B used. Device C not included.
Push notifications up to 497 characters are received and shown on both device A + B.
Push notifications above 509 characters are never received on any of the two devices.
Short messages (less than 10 characters) instantly sent after the “509 character message” are not received --> Seems like the notifications are temporarily blocked. After a minute or so, short push notifications (e.g. 10 characters) are received and shown again. All shorter messages are received and shown until we send a long message again which blocks the delivery of push notifications.
Test on the slower wifi connection again
- Now experiencing the same behavior as on the faster connection. Push notification with up to approximately 500 characters appear, while push notifications with more characters do not get through and seems to block the delivery of smaller push notifications sent afterwards.
Payload size shouldn't be the issue: Since we on Device A didn't receive push notifications above +20 characters on the slow wifi connection initially, but are able to receive push notifications with 497 characters on the same device on a faster wifi connection, I think we should be able to rule out that the issue is related to the size of the payload. Do you agree?
Can it be that the combination of these 3 parameters can have an impact on whether a push notification is delivered or not?
Length of message + speed of wifi connection + free space available
Any suggestion on how to solve this to ensure all push notifications are delivered, and avoid the temporary blocking/non-delivery we experience?
Thanks in advance,
Andreas
I have an app made with phonegap which is using a third-party plugin for displaying local notifications. (https://github.com/katzer/cordova-plugin-local-notifications)
I deployed it on my device, and in the beginning it worked well. However after the app sent dozens of notifications (very frequently and with same text) at some point my iphone started not showing the notifications. I tried to delete the app, and deploy again, then the confirmation dialog popped up again for allowing notifications from the app, but they still didn't show up.
When i deployed it on an other device, it worked well again, also in the emulator.
Is it possible that ios somehow blocked notifications from this app, because it considered them as harmful/spam?
Maximum number of scheduled notification is 64. If you are reached the maximum you can't add more local notifications without removing the old ones or after firing the scheduled notifications.
In the apple documents, it mentions as follows
Each app on a device is limited to 64 scheduled local notifications.
The system discards scheduled notifications in excess of this limit,
keeping only the 64 notifications that will fire the soonest.
Recurring notifications are treated as a single notification.
There is a limit of 64 scheduled notifications per app, so, if you schedule more - only first 64 will arive.
Each app on a device is limited to 64 scheduled local notifications. The system discards scheduled notifications in excess of this limit, keeping only the 64 notifications that will fire the soonest. Recurring notifications are treated as a single notification.
However, there is a way to be sure that all 64 are scheduled - just pass them in packs by 64 notifications each.
Check this answer for more info.
I'm trying to send a push notification to a device - which is longer than 255 characters.
I'm not getting any errors from Apple servers but the push notification does not reach my device.
Using Pusher (https://github.com/noodlewerk/NWPusher) the push notification DOES reach the device - using the same certificate.
Sending a push notification smaller than 255 characters DOES reach the device
What could be the issue?
Usually, push notifications that are too long, such as over 255 characters as you have mentioned do not make it into the user's device due to the fact that IOS might believe that these notifications are spam notifications. This also forces the developer to be as concise as possible, so the user can get the full information they need from just a quick glance at the screen of their device.
Also, take a look at the following thread.
According to documentation from Apple Push Notification Service:
Each remote notification includes a payload. The payload contains
information about how the system should alert the user as well as any
custom data you provide. In iOS 8 and later, the maximum size allowed
for a notification payload is 2 kilobytes; Apple Push Notification
service refuses any notification that exceeds this limit. (Prior to
iOS 8 and in OS X, the maximum payload size is 256 bytes.)
For our iOS news apps we send out more than 10000 push notifications to registered devices, but somehow not all devices seem to receive the notification. We have been doing this for years but recently we received user feedback stating they did not receive a push notification while they did register their device to receive them.
Our logs show that these specific devices registered successfully and that there were no errors sending the push notification, but somehow the APNS does not deliver the notification. We have seen that removing the app from the device and reinstalling it sometimes solves the problem but we are still concerned.
We think it must be Apple's service that fails to deliver the push notification sometimes, especially when it comes to sending large amounts of notifications. Any of you experienced this?
The Apple docs says this:
Important: Delivery of notifications is a “best effort”, not
guaranteed.
Have you checked the payload size? As per Apple's documentation, the maximum size allowed for a notification payload is 256 bytes.
I'm wondering if there is a limit to the number of apple push notifications we can send to users at once?
Can I send 100,000 push notifications at once using the APNS service?
If you are sending multiple notifications to the same device within a short period of time, the push service will send only the last one.
https://developer.apple.com/library/content/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG23
Look "Some Notifications Received, but Not All" in that documentation.
Apple's Tech Note was recently updated to address this question :
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.
There's no limit on how much notification you can send to Apple APNS server but reminder to avoid using allot of connection because Apple may ban your IP if he think you are doing a DDOS attack.
Also if a user is offline (iPhone out of signal) only the latest push notification will be in saved in apple's APNS server
Yes, you can!
You can also use 20 connections max for the sending of data.