Search code examples
push-notificationapple-push-notificationsios9banner

Pushnotification banner not showing - ios9


I have one ios project with pushnotification enabled when adding any events from back end. All are working fine; showing badge, alert , sound everything ok, except 'banner'. Banner is not showing when app is in back ground mode, i think there is nothing to code for 'Banner' from our side. This is how i registering for pushnotification.

 UIUserNotificationType types = UIUserNotificationTypeBadge |
        UIUserNotificationTypeSound | UIUserNotificationTypeAlert;

        UIUserNotificationSettings *mySettings =
        [UIUserNotificationSettings settingsForTypes:types categories:nil];

        [[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];
        [[UIApplication sharedApplication] registerForRemoteNotifications];

Solution

  • It is because the payload sending from back end crossed the size limit allowed. As per the official doc maximum size allowed is:

    • For regular remote notifications, the maximum size is 4KB (4096 bytes)
    • For Voice over Internet Protocol (VoIP) notifications, the maximum size is 5KB (5120 bytes) NOTE