rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.28k stars 848 forks source link

[Bug]: ViewAnnotationManager.swift throws error when running or building on iOS ^18 #3687

Closed doguyilmaz closed 2 weeks ago

doguyilmaz commented 2 weeks ago

Mapbox Implementation

Mapbox

Mapbox Version

11.4.0

React Native Version

0.74.5

Platform

iOS

@rnmapbox/maps version

10.1.33

Standalone component to reproduce

Observed behavior and steps to reproduce

❌  (ios/Pods/MapboxMaps/Sources/MapboxMaps/Annotations/ViewAnnotationManager.swift:84:19)

  82 |     @available(*, deprecated, renamed: "allAnnotations", message: "Please use allAnnotations instead, or directly access ViewAnnotation itself")
  83 |     public var annotations: [UIView: ViewAnnotationOptions] {
> 84 |         idsByView.compactMapValues { [mapboxMap] id in
     |                   ^ cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type 'Dictionary<String, Optional<JSONValue>>.RawValue' 
  85 |             try? mapboxMap.options(forViewAnnotationWithId: id)
  86 |         }
  87 |     }

Expected behavior

Not to throw error due to ViewAnnotationManager.swift:84:19

Notes / preliminary analysis

No response

Additional links and references

This issue mentioned in https://github.com/rnmapbox/maps/issues/3640 but tagged as addressed and closed but still continues.

github-actions[bot] commented 2 weeks ago

No code example found in issue body - More info

fabriciosautner commented 1 day ago

same problem