Created
February 20, 2014 13:41
-
-
Save matzew/9113816 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
// When the program is in the foreground, this callback receives the Payload of the received Push Notification message | |
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { | |
// 'userInfo' contains information related to the remote notification. | |
//NSString *alertValue = [userInfo valueForKeyPath:@"aps.alert"]; | |
NSLog(@"\nForeground: %@\n", userInfo); | |
} | |
// Uncomment if you want to support 'silent' Push Notifications. | |
// NOTE: Ensure that 'Remote notifications' capability is enabled on the app target. | |
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { | |
NSLog(@"\nBackground: %@\n", userInfo); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment