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

Disable location tracking #2239

Open
federicoramos77 opened this issue Sep 19, 2024 · 2 comments
Open

Disable location tracking #2239

federicoramos77 opened this issue Sep 19, 2024 · 2 comments

Comments

@federicoramos77
Copy link

federicoramos77 commented Sep 19, 2024

Disable location tracking

Please add an option to disable location services in the MapboxMaps framework. My application only needs to display the map view and does not require accessing the user’s location.

Why

Privacy: Enhances user privacy by not accessing location data when it’s unnecessary.

@persidskiy
Copy link
Contributor

@federicoramos77 Hi, can you please clarify what exactly you mean, what's your case and what you observe? Are you talking about Apple MapKit, or MapboxMaps framework?

@federicoramos77
Copy link
Author

Hi,
Yes, sorry, I wrongly mentioned MapKit in the description but I meant MapboxMaps. MySwiftUI app uses this framework to display a world map with different layers that are loaded based on user behavior to highlight different areas/countries. The app doesn't require user location but it seems the framework tries to get it by default.

Submitting the app to ASC gives this warning:

ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “Visited Countries.app” bundle should contain a NSLocationWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.

Currently it's possible to override the location provider but Id would be better if this override could take a nil value to effectively disable all location tracking activity or maybe having a viewModifier like .locationServicesDisabled()

hlongngo pushed a commit to hlongngo/mapbox-maps-ios that referenced this issue Sep 29, 2024
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

No branches or pull requests

2 participants