ios - How to stop multiple method callings on tap of first push notification (multiple push notifications coming)? -


when multiple messages sent device, push notifications received.

case 1: single message sent, single notification received , single calling of method handling notification. works fine.

case 2: multiple notifications received , multiple calling of method occurs on tap of first notification (on quick tap of first notification).

how prevent method getting called multiple times when notification tapped?

- (void)application:(uiapplication*)application didreceiveremotenotification:(nonnull nsdictionary *)userinfo {      nsdictionary *dicttopass = userinfo[@"aps"];      if([dicttopass[@"oid"] isequaltostring @"callmethod1"])    {        // call method 1    }    else if([dicttopass[@"oid"] isequaltostring @"callmethod2"])    {        // call method 2    }     } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -