4

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

  • 1
    Did you check the status code received in response to your APNs request? Maybe It'd clarify the reason for such behaviour. Anyway Apple does not guarantee delivery for push notifications except for VoIP push notifications. So maybe if you need those notifications for chat, maybe VoIP push notifications is what you are looking for. – Anton Filimonov Jun 19 '18 at 12:31
  • Thanks for the suggestion on looking into the VoIP push notifications, Anton.We're using standard push notifications as of now, but will look into VoIP right away. – Andreas Overbeck Jun 19 '18 at 12:50
  • Is there a drawback/cons to using VoIP push notifications over regular push notifications? – Andreas Overbeck Jun 19 '18 at 15:28
  • Well, as far as I know, not all apps are allowed to use such notifications. Possibly you''ll have to explain why you need such type of notifications. But seems that having a chat inside your application is enough to use VoIP pushes. At least you can use them for iOS 8 and higher. Check out this documentation https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html#//apple_ref/doc/uid/TP40015243-CH30 – Anton Filimonov Jun 20 '18 at 06:16
  • Apple doesn't guarantee for Push notification delivery. But if you want all the notifications to be received, you can follow this https://stackoverflow.com/a/50700324/5084797. – manishsharma93 Jun 22 '18 at 11:39

0 Answers0