After a telemetry opt-out, MapboxCommon still starts its own CLLocationManager, with significant-change monitoring and background updates enabled
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 18/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Swift
- Estrellas
- 601
- Forks
- 198
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mapbox/mapbox-maps-ios
-
auto-triaged bug :beetle: p2
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
mapbox/mapbox-maps-ios#2461 ·
-
auto-triaged bug :beetle: p2
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
mapbox/mapbox-maps-ios#2459 ·
-
auto-triaged bug :beetle: p1
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
mapbox/mapbox-maps-ios#2456 · 1 comentario ·
-
auto-triaged bug :beetle: p1
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
mapbox/mapbox-maps-ios#2455 · 1 comentario ·
-
auto-triaged bug :beetle: p1
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
mapbox/mapbox-maps-ios#2453 · 1 comentario ·
Todos los issues de mapbox/mapbox-maps-ios
Issues similares
-
good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
erkamyaman/rust-anything#930 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
SwiftOldDriver/iOS-Weekly#5528 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9710 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
altstoreio/AltStore#1887 ·
Los mantenedores suelen responder en 3 días
-
bug source:tester
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
alexandrereol/ethmensa#56 ·
Los mantenedores suelen responder en 1 día