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

Set background location enabled if not requesting permissions #232

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

naftalibeder
Copy link
Contributor

By default, the iOS permission request flow runs

[_locationManager setAllowsBackgroundLocationUpdates:YES];

but if skipPermissionRequests is true, the entire flow is skipped, meaning background location updates are never enabled. This enables them when skipping permission requests.

Note: technically, background location updates are possible whether the authorization level is always or when in use - potentially, this should just become a configuration option, e.g. GeolocationConfiguration.enableBackgroundLocationUpdates. Thoughts?

@michalchudziak
Copy link
Owner

Hey, thank you for the PR. I think we should give users more control over when this permission is or isn't requested. I like the idea of adding a configuration option. Would you like to refactor it in that way?

@michalchudziak michalchudziak merged commit 49bfbc8 into michalchudziak:master Jul 21, 2023
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.

2 participants