-
-
Save nwg/1671779 to your computer and use it in GitHub Desktop.
smart notifications
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 didRegisterForRemoteNotificationsWithDeviceToken:deviceToken | |
{ | |
[Socialize registerDeviceToken:deviceToken]; | |
} |
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 { | |
// Don't handle notifications when in the foreground | |
if (application.applicationState != UIApplicationStateActive) { | |
return; | |
} | |
// Give Socialize a chance to handle this notification if it needs to | |
if ([Socialize handleNotification:userInfo]) { | |
return; | |
} | |
// Nonsocialize notification handling goes here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment