Increment the Push notification Badge iPhone

后端 未结 5 1423
礼貌的吻别
礼貌的吻别 2020-11-29 00:17

Is it possible to increment the badge value on receiving the notification. OR Should I send the count as payload?

If i am sending the badge value as \"1\" every time

5条回答
  •  失恋的感觉
    2020-11-29 00:55

    After receiving remote Notification when you open App,

    get current Badge number in "didBecomeActive" Method of your Appdelegate File using below code:

    int badgeCount = [UIApplication sharedApplication].applicationIconBadgeNumber;
        badgeCount = badgeCount + 1;
    

提交回复
热议问题