iOS Push Notifications - update badge without alert?

后端 未结 4 606
自闭症患者
自闭症患者 2020-12-28 18:34

Is there a way to update the number in the badge without showing an alert or opening the app?

I am writing an app that should always display the current number of un

4条回答
  •  猫巷女王i
    2020-12-28 18:57

    You can use

    [UIApplication sharedApplication].applicationIconBadgeNumber = aNumber;
    

提交回复
热议问题