-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
re #17486 - set _locationManager if auth skipped #17487
Conversation
make sure locationManager is being set before continuing. Used if !locationManager vs else on previous statement as we should NEVER enter this code without _locationManager set. Also the else version might experience issues if someone touches the auth code and doesn't check this case, so seems more "long term stable".
@facebook-github-bot label Android Generated by 🚫 dangerJS |
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@rigdern - please do lmk if you have any feedback on the change. I thought this was the lowest touch way to address it. |
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.
@ngandhy Thanks for sending this PR! Sorry I didn't see it sooner. I didn't get any notifications when you opened the PR because I wasn't at-mentioned in it.
This looks to me like it'll fix the issue you hit.
@@ -158,6 +158,12 @@ - (void)beginLocationUpdatesWithDesiredAccuracy:(CLLocationAccuracy)desiredAccur | |||
if (!_locationConfiguration.skipPermissionRequests) { | |||
[self requestAuthorization]; | |||
} | |||
|
|||
//re #17486 - If someone skips permissions, location manager is not being set. so lets make sure its set before continuing |
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.
I don't think this comment is necessary. The code is clear enough without it.
removed unnecessary comment - see #17487 (review)
@rigdern - my bad! I could swear I tagged you but must have done something wrong. I'll make sure to do that next time. Great! I made the change you suggested as well :) |
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.
Looks good
@facebook-github-bot shipit |
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.
@ide is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This fixes #17486
make sure locationManager is being set before continuing.
Used if !locationManager vs else on previous statement as we should NEVER enter this code without _locationManager set. Also the else version might experience issues if someone touches the auth code and doesn't check this case, so seems more "long term stable".
Motivation
This fixes #17486
Test Plan
Related PRs
re #15096
Release Notes
[IOS] [BUGFIX] [GeoLocation] - Fix skipPermissionRequests by setting _locationManager