objective c - iOS >> UILocalNotification Got Lost -


in app there may scenario several local notifications fired closely close 'fire date'.

if app in foreground, seems appdelegate catches them all, via didreceivelocalnotification method.

but... in case app in background or closed, , click on 'popup' pops in home screen, method captures first notification, while others seem lost; , need them all...

anyone?

for local notifications did tried below?

nsarray *pendingnotifications = [[[uiapplication sharedapplication] scheduledlocalnotifications] sortedarrayusingcomparator:^(id obj1, id obj2) {         if ([obj1 iskindofclass:[uilocalnotification class]] && [obj2 iskindofclass:[uilocalnotification class]])         {             uilocalnotification *notif1 = (uilocalnotification *)obj1;             uilocalnotification *notif2 = (uilocalnotification *)obj2;             return [notif1.firedate compare:notif2.firedate];         }          return nsorderedsame;     }]; // if there pending notifications -> adjust badge number if (pendingnotifications.count != 0) {     //do } 

Comments

Popular posts from this blog

jpa - Passing entitymanager from reflection method -

frame rate - JAVA simple fps animation(how can i work with?) -