3

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?

Community
  • 1
  • 1
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
  • Any ideas why the down vote? This is a legitimate programming question which follows the site's guidelines. If there's anything missing, please comment and I'll fix it. – Adam Matan Feb 05 '15 at 19:32
  • I didn't down vote you but probably because you didn't provide some sample payloads. – Steve Tauber Feb 06 '15 at 15:42

2 Answers2

3

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.

David H
  • 40,852
  • 12
  • 92
  • 138
  • Thanks. What are these numbers - references to bugs on Apple's dev site? – Adam Matan Feb 10 '15 at 06:31
  • 1
    @AdamMatan yes bugreporter.apple.com. Point is I found at least two circumstances where the text was not shown, for sure there are others. Try to perturb your environment and see if you can discover your particular blocker. – David H Feb 10 '15 at 12:47
  • Thanks, David. I could not access these bugs - do you have a shareable link? Are they private to your account? – Adam Matan Feb 13 '15 at 16:09
  • Apple does not let you view other people's radars (reports). However, there is an open radar site: openradar.me, where people sometimes duplicate their reports so others at least know about them. I just added 18798969 which is most similar to your report. I'll add 19238323 shortly. – David H Feb 13 '15 at 21:02
1

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.

Steve Tauber
  • 9,551
  • 5
  • 42
  • 46
  • 1
    That's not the case - only one noisy (alert and sound) push was sent. There might have been some silent pushes send in the same time, but that shouldn't bother the noisy one. Updated my question accordingly. – Adam Matan Feb 06 '15 at 19:52