Skip to content

Commit

Permalink
Merge pull request firebase#183 from revolter/patch-2
Browse files Browse the repository at this point in the history
Update AppDelegate.m
  • Loading branch information
morganchen12 committed Dec 12, 2016
2 parents 029b5e2 + 552d275 commit 63616f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions messaging/MessagingExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N
// TODO: Handle data of notification

// Print message ID.
if ([userInfo objectForKey:kGCMMessageIDKey]) {
if (userInfo[kGCMMessageIDKey]) {
NSLog(@"Message ID: %@", userInfo[kGCMMessageIDKey]);
}

Expand All @@ -119,7 +119,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N
// TODO: Handle data of notification

// Print message ID.
if ([userInfo objectForKey:kGCMMessageIDKey]) {
if (userInfo[kGCMMessageIDKey]) {
NSLog(@"Message ID: %@", userInfo[kGCMMessageIDKey]);
}

Expand All @@ -137,7 +137,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
// Print message ID.
NSDictionary *userInfo = notification.request.content.userInfo;
if ([userInfo objectForKey:kGCMMessageIDKey]) {
if (userInfo[kGCMMessageIDKey]) {
NSLog(@"Message ID: %@", userInfo[kGCMMessageIDKey]);
}

Expand All @@ -150,7 +150,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)())completionHandler {
NSDictionary *userInfo = response.notification.request.content.userInfo;
if ([userInfo objectForKey:kGCMMessageIDKey]) {
if (userInfo[kGCMMessageIDKey]) {
NSLog(@"Message ID: %@", userInfo[kGCMMessageIDKey]);
}

Expand Down

0 comments on commit 63616f1

Please sign in to comment.