How to delete all local notifications when an application is deleted from an iPhone

前端 未结 5 1894
既然无缘
既然无缘 2021-02-03 21:18

Let\'s say I set 5 local notification for an iPhone application, then the user deletes the app. If the app is installed again, it shows the previous notifications.

I kno

5条回答
  •  执笔经年
    2021-02-03 21:44

    Go to your appDelegate.m, in function «didFinishLaunchingWithOptions» add this code:

    application.applicationIconBadgeNumber = 0;
    

提交回复
热议问题