Push messages longer than 255 characters not reaching iPhone - ios

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.)

Related

iOS push notifications not always delivered: Dependent on number of characters + speed of wifi connection + free space on device?

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

Number of notifications allowed in ios development mode

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.

APNS: Screen blinks but no text is shown

The problem
Some APNS push notifications that I am sending from a server contain alert and sound, but they only cause the iPhone screen to blink momentarily, while no text is shown in the notifications section.
Context
Python and PyAPNS on the server side
Verified multiple times on iPhone 6, iOS 8
Did not find any consistency - the text of some messages appear, and other don't, with no pattern I could recognize
The payload size is less than 256 bytes. Furthermore, the problems also happens on iOS 8 which has a 2k limit - so it's probably not a payload size issue
Only one noisy (alert + sound) push was sent at the same time (thanks, Steve). There is a very slight chance that some silent pushes (no sound, no alert, contentAvailable=1 were sent at the same time, but that shouldn't bother the noisy one.
Any idea why some alert text do not appear in the notification bar?
I saw similar problems a short while ago with two scenarios:
18798969 Notifications that set a badge to 0 never appear!
Status: still open
Sent a notification and set the badge to 5. Then send another and set it to 0. The text is never seen (screen flashes briefly)
19238323 'content-available' notifications not delivered to my app
Status: Duplicate of 18645681 (Open)
If notification contains a 'content-available' value, and the WIFI signal is weak, it does not get shown or delivered. Move close to the router so you have a 5 bar signal, now it works.
Is it possible you are sending too many too quickly?
From the Technical troubleshooting guide:
Some Notifications Received, but Not All
If you are sending multiple
notifications to the same device or computer within a short period of
time, the push service will send only the last one.
Here's why. The device or computer acknowledges receipt of each
notification. Until the push service receives that acknowledgment, it
can only assume that the device or computer has gone off-line for some
reason and stores the notification in the quality of service (QoS)
queue for future redelivery. The round-trip network latency here is of
course a major factor.

Sending 10000+ push notifications but not all devices receive it

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.

apple push notification limitation

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.

Resources