0

I have been looking for a way to write a method that I can call on a button inside my application to remove all notifications that was received from server side , and delete all notifications from the notification center iOS , I have tried all the suggested solutions , :

iOS remove notification from notification center

iOS application: how to clear notifications?

iOS application: how to clear notifications?

is there any way that I could get handle for the notification inside the notification center and do clear or delete

Regards,

AhMaD AbUIeSa
  • 805
  • 1
  • 12
  • 21

1 Answers1

0

thanks all ,

I have solved my problem after trying so many codes , I called a method on a button and it worked with this snippet:

[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 1];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];

Regards,

AhMaD AbUIeSa
  • 805
  • 1
  • 12
  • 21