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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -