Create a gist now

Instantly share code, notes, and snippets.

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
NSString *msg = [[[userInfo objectForKey:@"aps"] objectForKey:@"alert"] objectForKey:@"body"];
if (msg == nil) {
msg = @"Error";
}
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateActive) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"OfficeRadar"
message:msg
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment