ios - How to detect Push notification when app is open -


this question has answer here:

in application have used push notification service problem when close app @ time notification appears when open application , send notification notification not come. please me.

you can easily handle function mentioned below in appdelegate.m

---implement application:didreceiveremotenotification:

example:-

- (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo  {      uiapplicationstate appstate = [application applicationstate];     if (appstate == uiapplicationstateactive)     {              uialertview *alertvw = [[[uialertview alloc] initwithtitle:@"notify" message:yourmessage delegate:self cancelbuttontitle:@"done" otherbuttontitles: @"vizllx", nil] autorelease];              [alertvw show];     }     else {         // push notification received while app in background     } } 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -