Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/33047914/ios-push-notification-banner-shown-twice-for-a-single-push

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...