Skip to content

[iOS 14] Approximate location #558

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

Open
1 of 2 tasks
renefloor opened this issue May 19, 2021 · 3 comments · May be fixed by #1443
Open
1 of 2 tasks

[iOS 14] Approximate location #558

renefloor opened this issue May 19, 2021 · 3 comments · May be fixed by #1443
Assignees
Labels
P1 High-priority issues at the top of the work list. platform: ios Issue is related to the iOS platform type: enhancement New feature or request

Comments

@renefloor
Copy link
Contributor

🚀 Feature Requests

In iOS 14, when you prompt for location permissions, the user can toggle between Precise: On (precise location) and Precise: Off (approximate location). Precise location is the default.
https://radar.io/blog/understanding-approximate-location-in-ios-14

Contextualize the feature

The permission for location should be adapted, it should not only give (not) allowed, but also whether you have precise location or not.

Related ticket: Baseflow/flutter-geolocator/issues/736

Platforms affected (mark all that apply)

  • 📱 iOS
  • 🤖 Android
@JeroenWeener JeroenWeener added platform: ios Issue is related to the iOS platform type: enhancement New feature or request P1 High-priority issues at the top of the work list. labels Aug 30, 2023
@JeroenWeener
Copy link
Contributor

This issue is the iOS counterpart of #559.

@Pierre-Monier
Copy link

I have worked on this, and it's working. I think we should discuss the design before I create a PR.

Basically, I think we have two solutions for this:

  1. Create two new methods on the PermissionHandlerPlatform

    I can add two new methods: getLocationAccuracy and requestTmpPreciseLocation (the latter will only work on iOS).

    This is great because location accuracy somewhat looks like a permission, but in reality, it is not exactly a permission. However, this approach introduces two new methods, and users might find it counterintuitive.

    This is the solution adopted in react-native-permissions.

  2. Add a new permission Permission.locationPrecise

    We add a new permission to the Permission enum. For users, precise location will work like a regular permission, even if under the hood, it behaves differently. On the native side, we add some special logic to the LocationPermissionStrategy, and it will work.

    The only issue is with requestTmpPreciseLocation. The problem is that users must provide a specific key corresponding to their explanation of why the app needs temporary access to precise location. This means it won't fit the current API for permission requests, as it requires an extra parameter.

I think the first option is better, but I want to discuss it before creating a PR, as it introduces two new methods.

I'm going to work on the Android part once the iOS part is validated.

Ongoing work can be found here.

@Pierre-Monier Pierre-Monier linked a pull request Feb 10, 2025 that will close this issue
10 tasks
@Pierre-Monier
Copy link

Pierre-Monier commented Feb 10, 2025

I have implemented the first solution

@TimHoogstrate TimHoogstrate self-assigned this Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High-priority issues at the top of the work list. platform: ios Issue is related to the iOS platform type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants