In my application i have used push notification service but my problem is that when i close the app at that time the notification appears but when i open the application and then send the notification the notification not come. please help me.
            Asked
            
        
        
            Active
            
        
            Viewed 1,095 times
        
    1 Answers
1
            
            
        You can easily handle by this function mentioned below in your 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 is in background
    }
}
        Vizllx
        
- 9,135
 - 1
 - 41
 - 79