-
-
Save tleyden/97434117ad53757106ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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