In my iOS Application, I want to hide UIAlertView
when receiving push notification in didreceiveRemotenotification
method.
Whole page of app delegate I am not writting code for show UIAlertView. Then why does it display automatically?
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
if (application.applicationState == UIApplicationStateActive) { self.noti_json=[userInfo objectForKey:@"msg"];
[[NSNotificationCenter defaultCenter] postNotificationName:[userInfo objectForKey:@"title"] object:self];
} }
Thanks in Advance.
Edit (Adding code for my didReceiveRemoteNotification:
):
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
[PFPush handlePush:userInfo];
if (application.applicationState == UIApplicationStateActive)
{
self.noti_json=[userInfo objectForKey:@"msg"];
[[NSNotificationCenter defaultCenter] postNotificationName:[userInfo objectForKey:@"title"] object:self];
}
}