Skip to content
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

Merged
merged 1 commit into from
Jun 30, 2017

Conversation

MatkovIvan
Copy link
Contributor

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #651 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
MobileCenterPush/MobileCenterPush/MSPush.m 92.47% <100%> (+0.16%) ⬆️
...bileCenterPush/MobileCenterPushTests/MSPushTests.m 97.85% <100%> (+0.01%) ⬆️
...er/MobileCenter/Internals/Device/MSDeviceTracker.m 94.64% <0%> (-2.98%) ⬇️
...eCenter/MobileCenterTests/MSIngestionSenderTests.m 96.81% <0%> (+0.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa10ab6...717b8c0. Read the comment docs.

Copy link
Contributor

@iamclement iamclement left a 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. 👍

@iamclement iamclement merged commit 51c4de5 into microsoft:develop Jun 30, 2017
@@ -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];
Copy link
Contributor

@ElektrojungeAtWork ElektrojungeAtWork Jul 3, 2017

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?

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, makes sense

@MatkovIvan MatkovIvan deleted the fix/foreign-push-crash branch July 11, 2017 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants