Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Push Notification Banner shown twice for a single Push

I've noticed that sending a Push notification results in the following behavior:

Push Banner is shown twice?

See how the banner is shown a second time, after a short delay?

At first I thought that our backend was mistakenly sending 2 push notifications, one after the other.

However, this appears to be default iOS behavior for a single Push notification. The banner is shown, then immediately "shown again". This results in this jittery UI shown in the gif. The banner appears to be received twice.

Tested using iOS 9.0.2.

I do not recall seeing this behavior from other apps that send me Push Notifications. Am I doing something wrong that would cause the banner to show twice?

Radar:

Engineering has determined that your bug report (23133694) is a duplicate of another issue (23130766) and will be closed.

like image 323
pkamb Avatar asked Oct 09 '15 22:10

pkamb


People also ask

How do I fix Apple push notifications?

You can fix an iPhone that's not getting notifications by restarting it or making sure notifications are turned on. You should also make sure your iPhone is connected to the internet so apps can receive notifications. If all else fails, you should try resetting the iPhone — just make sure to back it up first.

How do I see single notifications on iPhone?

To see your notifications in Notification Center, do any of the following: On the Lock Screen: Swipe up from the middle of the screen. On other screens: Swipe down from the top center. Then you can scroll up to see older notifications, if there are any.

What is rich push notification in iOS?

iOS 10 has introduced the Rich Push Notification feature which allows you to add image, video, audio or gif attachments to your push notifications. You can also add a custom UI to your rich notification to make it more appealing.


1 Answers

I was experiencing the same issue, but after countless hours trying to debug, I realized that I was calling registerUserNotificationSettings(settings) twice in didFinishLaunchingWithOptions:. Verify that you're not doing the same

like image 185
RukyO Avatar answered Sep 20 '22 01:09

RukyO