Push notification banner displayed twice

We have implemented urban-airship for iOS in our app and the issue we are facing is that the single push notification banner is displayed twice. We have thoroughly checked on the API side, it is sending push notification only once. But the banner seems to display twice. Have gone through the internet and found out that many people are having this issue (primarily in and above iOS 9) and have suggested a measure to check if the - setUserNotificationSettings is not called twice or not (i.e. it should only be called once). As we are now using urban-ariship iOS sdk, we cannot implement that because we don't have to. These things are automatically handled in the sdk. Also, wanted to point out that we are facing this issue only after implementing urban-airship iOS sdk (Previous to urban-airship, we were using normal push notification procedure provided in iOS. That was working perfectly fine.).


So wanted to know if someone else has faced this issue or not. If yes, has anyone solved it??? If no, can anyone help us solve it, especially from the urban-airship team. I am posting this in forum because we are not using paid edition, but this seems like urban-airship iOS sdk issue, and would like a response from the team.

Below providing video dropbox link of the issue: The following push was sent using urban-airship console panel.



Waiting for some responses.

Didn't find what you were looking for?

New post



  • Hi Fahd,

    This is a situation we have seen in the past occur on iOS devices running 9.0 through 9.2. This is an iOS bug that Apple has released a fix for in iOS 9.2.1, so we would recommend updating your device to that version if you have not done so already.

    Comment actions Permalink
  • Hi Michael,

    Thanks for your quick response. We are already aware about it but the issue still persists with iOS i guess. We are testing the app in a device with iOS 9.3.2 version. So definitely the issue has not been resolved on the iOS side. Before using urban-airship, we were using the normal apple push notification procedure, and it was working fine. This issue started after we switched to urban-airship. 


    So just wanted to confirm, whether this issue is on your side or apple side because for us it started when ported to urban-airship. If its not on your end, then I would reach out to apple for this. This issue is creating major problems for our app. Please assist us on this.

    Comment actions Permalink
  • Fahd,

    You may also check to see if this is an implementation issue on your end.

    If you are registering for remote notifications twice within your application, you will most definitely encounter this issue.

    Another user reported the same thing and was able to fix the issue by fixing their code:



    I don't believe this is an Apple or Urban Airship issue at this point, and may just be an issue with the implementation of push notifications in your app. Go ahead and verify and let me know if that fixes the issue. 

    Comment actions Permalink
  • Fahd, 

    I am also implementing Push Notifications for a application on iOS. I have seen the issue occurring even on 9.3.2 as you said.  I have happen to raise a bug to Apple and they have closed my ticket as a duplicate of some XXXXXXXX ticket which was already resolved by iOS. 

    Have you got a solution? Were you able to resolve this issue?

    Comment actions Permalink
  • Hi Srinivas,

    Yes indeed, we  have faced this issue and finally we have resolved it. Searching the internet regarding this issue we found out that the wisdom of the crowd pointed towards "UIUserNotificationSettings" being registered twice. So I debugged the code and that was it.

    We have implemented the following code in didFinishLaunching (method in Appdelegate):

    let types: UIUserNotificationType = [UIUserNotificationType.Badge, UIUserNotificationType.Alert, UIUserNotificationType.Sound]
    UAirship.push().userNotificationTypes = types


    And additionally we implemented the following code in usernotificationsettings delegate:

    func application(application: UIApplication, didRegisterUserNotificationSettings notificationSettings: UIUserNotificationSettings) {


    This was implemented according to Urban Airship example provided. So I eventually commented the didfinishLaunching code and everything worked fine. 


    So my suggestion is check if you have implemented this code, if yes then comment it and try. In short the didRegisterUserNotificationSettings should not be called more than once.


    Please respond, even if your issue is resolved.




    Comment actions Permalink

Please sign in to leave a comment.