Created
May 29, 2015 14:49
-
-
Save mkwatson/de34c2f149fbf3647a4e 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)receivedBackgroundNotification:(NSDictionary *)notification fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult result ))completionHandler { | |
// Recieved a pushed message, do we display to this user? | |
if ([self displayPushedMessage]){ | |
// Display message and record event | |
[self didRecieveNotification:notification displayedMessage:true]; | |
completionHandler() | |
} | |
else { | |
// Don't display message and record event | |
[self didRecieveNotification:notification displayedMessage:false]; | |
completionHandler(UIBackgroundFetchResultNoData); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment