-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash on non MobileCenter push notifications #651
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #651 +/- ##
===========================================
- Coverage 93.12% 93.12% -0.01%
===========================================
Files 207 207
Lines 14585 14588 +3
Branches 845 847 +2
===========================================
+ Hits 13583 13585 +2
- Misses 999 1000 +1
Partials 3 3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this one, tested a none MC notif and it doesn't crash anymore. 👍
@@ -194,7 +194,10 @@ - (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { | |||
|
|||
- (BOOL)didReceiveRemoteNotification:(NSDictionary *)userInfo { | |||
MSLogVerbose([MSPush logTag], @"User info for notification has forwarded to Push: %@", [userInfo description]); | |||
NSDictionary *alert = [[userInfo objectForKey:kMSPushNotificationApsKey] objectForKey:kMSPushNotificationAlertKey]; | |||
NSObject *alert = [[userInfo objectForKey:kMSPushNotificationApsKey] objectForKey:kMSPushNotificationAlertKey]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the variable called "alert" if it is a NSDictionary
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alert
is key for this object in parent dictionary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, makes sense
No description provided.