Attribution sheet intermittently lists no attributions (Standard style, 11.26.0)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
Línea de trabajo
Start from MapboxMap.loadAttributions and Attribution.parse(__map.getAttributions()); the failing path is that getAttributions() returns nothing after the Standard style loads, so trace where style and source attributions are registered. The report gives no minimal repro, so first reproduce the intermittent empty list in a small MapView harness and compare a failing launch against a passing one. Done means the sheet always lists the style attributions plus any source attribution.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- Xcode version: 27.2 (27B52)
- iOS version: iOS 27.2 (Simulator); one physical iPhone
- Devices affected: iOS Simulator (iPhone 17) and a physical iPhone
- Maps SDK Version: MapboxMaps 11.26.0, MapboxCoreMaps 11.26.0, MapboxCommon 24.26.0
Observed behavior and steps to reproduce
Intermittently, the attribution (ⓘ) button's action sheet lists no attributions. The sheet titled "Powered by Mapbox Maps" shows only "Mapbox Telemetry", "Mapbox Privacy Policy" and "Cancel". The "© Mapbox", "© OpenStreetMap" and "Improve this map" entries are missing.
- Style: Mapbox Standard (
MapInitOptions(mapStyle: .standard(...))). The map is hosted in SwiftUI through aUIViewRepresentable. - How often: 2 of 6 app launches on the Simulator, and at least once on a device. The other launches list every attribution.
- It sticks: once a
MapView's list is empty, it stays empty for the life of that view. Reopening the sheet, waiting 5 s, or moving the camera doesn't bring it back.
We couldn't reduce it to a minimal project. What we measured in unit tests, reading the list the sheet uses (MapboxMap.loadAttributions via @testable import MapboxMaps) after the style had loaded:
| Setup | Empty lists |
|---|---|
Bare MapView, same Standard options, nothing else |
0 of 17 |
| Same map, with our setup attached before the map loads | 3 of 58 |
| Same, without the four observers listed last below | 1 of 52 |
"Our setup" subscribes, before load, to onCameraChanged, onRenderFrameFinished, onMapIdle, onStyleLoaded and onMapLoaded, and also to onSourceDataLoaded, onMapLoadingError, a second onMapIdle and a second onCameraChanged. In onMapLoaded it adds a raster-dem source (mapbox://mapbox.mapbox-terrain-dem-v1) with a hillshade layer and terrain, a vector source (mapbox://mapbox.mapbox-terrain-v2) for contour lines, GeoJSON sources with symbol and circle layers, and sometimes a raster source with its own attribution. Removing the onMapLoaded, onMapIdle or onRenderFrameFinished handler one at a time gave 0 of 12 each, which at this rate is too few runs to tell either way.
Expected behavior
The ⓘ sheet always lists the style's attributions: "© Mapbox", "© OpenStreetMap", "Improve this map", plus the attribution of any source on the map. The attribution guide names the ⓘ button as the way an iOS app shows the required attribution. When the list is empty, the app has no attribution on screen.
Notes / preliminary analysis
- The sheet's list comes from
MapboxMap.loadAttributions, which isAttribution.parse(__map.getAttributions()). In the failing cases that call returns nothing, even though the style has loaded. In the app the map itself renders normally. - Empty-or-full is decided once per map and doesn't change afterwards, which makes us suspect a race when the style's sources are first registered, not a problem in the sheet's UI.
- As a workaround we're adding our own text attribution on the map, next to the logo.
Additional links and references
- 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: p1
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
mapbox/mapbox-maps-ios#2460 ·
-
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