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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -