Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Pause map's location manager on sleep #3641

Closed
wants to merge 3 commits into from

Conversation

friedbunny
Copy link
Contributor

  • Factors out the location manager start/stop code into new methods.
  • Calls these new methods on wakeGL and sleepGL, if necessary.
  • Only asks for location permissions if not already granted/denied.

Stuck this on v3.1.0, but we can move it off if this proves bothersome or controversial.

/cc @1ec5 @boundsj

@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS refactor in progress labels Jan 21, 2016
@friedbunny friedbunny self-assigned this Jan 21, 2016
@friedbunny friedbunny added this to the ios-v3.1.0 milestone Jan 21, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jan 22, 2016

This would be a lot simpler if the logic for enabling and disabling the location manager were consolidated in one place, since multiple factors can determine whether the location manager is paused. Take a look at -validateDisplayLink as an example of this validation pattern.

@friedbunny
Copy link
Contributor Author

@1ec5 This has been refactored to a single validation-style method in f6f91e0. Can't think of any edge cases, but maybe you can?

@friedbunny
Copy link
Contributor Author

#4034 for inclusion in v3.1.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants