ios - How to cancel Notification from notification center which is push notification -


i developing ios app both push notification , local notification, know how remove 1 , notification center,

using

[[uiapplication sharedapplication]cancelalllocalnotifications]; 

but problem if have scheduled local notifications ,

and push notification arrived in didreceiveremotenotification write

[[uiapplication sharedapplication]cancelalllocalnotifications]; clear notification center,

but cleared localnotification also...

edit if there total 3 notifiction in nc i.e. 1 come local notification , 2 push( server) in case how can handle it,? tap on 1st notification( comes server) in nc. in case should do, app badge should 2.

then should do?

the cancelalllocalnotifications cancel local notifications, in name! not push notifications can read in documentation:

cancels delivery of scheduled local notifications.

since push notifications server side there noting cancel in app. remove push notification notification center set applicationbadegnumber 0.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -