After a telemetry opt-out, MapboxCommon still starts its own CLLocationManager, with significant-change monitoring and background updates enabled
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
Direzione di ricerca
Start with the attached MapboxLocationRepro.zip and its five logs, then find where MBXCLDeviceLocationProvider is created and where MGLMapboxMetricsEnabled is read, to see whether the opt-out flag reaches the location provider. Run the repro under the telemetry-off launch and confirm the startUpdatingLocation, significant-change and background calls still appear. Done means the SDK starts no Core Location service after opt-out, or the guide's wording is corrected; the design choice between the two is for maintainers to settle.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
- Xcode version: 27.2 (27B48)
- iOS version: 27.2 (simulator, the attached sample); 26.7.3 (iPhone 13 Pro, our app)
- Devices affected: iOS 27.2 simulator; iPhone 13 Pro
- Maps SDK Version: 11.35.1 (MapboxCommon 24.35.1)
Observed behavior and steps to reproduce
Minimal reproduction (attached, MapboxLocationRepro.zip). A SwiftUI app whose only content is a full-screen Map(). It creates no CLLocationManager and calls no Core Location API; it has the location background mode, and location permission is granted with simctl privacy. A logger records every start and stop call made on any CLLocationManager, with the class of the manager's delegate and the manager's settings. It passes each call through unchanged and logs no coordinates.
In every launch, within two seconds, a manager whose delegate is MBXCLDeviceLocationProvider receives:
startUpdatingLocation(3 to 8 calls), withdesiredAccuracy999 and no distance filterstartMonitoringSignificantLocationChanges(1 or 2 calls)setAllowsBackgroundLocationUpdates:withtrue
With telemetry opted out the calls are the same. Opted out here means MGLMapboxMetricsEnabled set to false in UserDefaults before any Mapbox object exists, which is the key the attribution menu's telemetry switch writes. Five launches in all: fresh install and relaunch, telemetry at its default and off, including a relaunch with the key already false before the process started. The steps and the five logs are in the zip.
On a device, in our own app (iPhone 13 Pro, iOS 26.7.3; the app uses none of the SDK's location features and records location itself with its own manager and Always authorisation), with telemetry opted out, two launches:
startUpdatingLocationandstartMonitoringSignificantLocationChangesat launch,allowsBackgroundLocationUpdatesreadingtruefrom then on, and no region registered.- Launch A: 9 minutes after the app went to the background the SDK's delegate was still receiving 60 locations a minute, when we stopped watching.
- Launch B:
stopUpdatingLocationcame 5 minutes after backgrounding. An hour after launchallowsBackgroundLocationUpdateswas stilltrue.
With telemetry on, on a fresh install of the same app, the SDK's delegate received 753 locations in the background in the 15 minutes before its stopUpdatingLocation.
Expected behavior
- After the user opts out of telemetry, the SDK starts no Core Location service of its own: no location updates, no significant-change monitoring, no background updates. The privacy policy says that after an opt-out "Mapbox will only receive location data in response to an end user's actions".
- The iOS guide says: "By default, the SDK sends de-identified location and usage data to Mapbox whenever the host app causes it to be gathered." Here the host app asks the SDK for no location, and the SDK gathers with a manager of its own. Either the behaviour or that sentence needs correcting.
Notes / preliminary analysis
- #2230 was closed in 2024 with "A developer could not turn it off." This report is about what the SDK does after the user has turned telemetry off, and about the guide's wording.
- #2335 (open) asks for the same thing underneath: a supported way to stop the SDK's own location manager. For an app that supplies its own location, a public way to hand the SDK a location provider, or none, would resolve it.
- The SDK's manager runs with no distance filter in every case above.
- We have not measured what, if anything, is uploaded in any of these states.
Additional links and references
- #2230, #2335, and #2456 (a launch crash in the same component since MapboxCommon 24.34)
- https://docs.mapbox.com/ios/maps/guides/ (section "Telemetry opt out")
- https://www.mapbox.com/legal/privacy
- Lingua principale
- Swift
- Stelle
- 601
- Fork
- 198
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mapbox/mapbox-maps-ios
-
auto-triaged bug :beetle: p2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
mapbox/mapbox-maps-ios#2461 ·
-
auto-triaged bug :beetle: p2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mapbox/mapbox-maps-ios#2459 ·
-
auto-triaged bug :beetle: p1
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
mapbox/mapbox-maps-ios#2456 · 1 commento ·
-
auto-triaged bug :beetle: p1
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
mapbox/mapbox-maps-ios#2455 · 1 commento ·
-
auto-triaged bug :beetle: p1
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
mapbox/mapbox-maps-ios#2453 · 1 commento ·
Tutte le issue di mapbox/mapbox-maps-ios
Issue simili
-
good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
erkamyaman/rust-anything#930 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
SwiftOldDriver/iOS-Weekly#5528 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
altstoreio/AltStore#1887 ·
I maintainer di solito rispondono entro 3 giorni
-
bug source:tester
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexandrereol/ethmensa#56 ·
I maintainer di solito rispondono entro 1 giorno