Skip to content

[Bug]: Error when running on iOS #3875

@sluther

Description

@sluther

Mapbox Implementation

Mapbox

Mapbox Version

11.0

React Native Version

0.79.3

Platform

iOS

@rnmapbox/maps version

10.1.39

Standalone component to reproduce

const App = () => {
  return (
    <View style={styles.page}>
      <View style={styles.container}>
        <Mapbox.MapView style={styles.map} />
      </View>
    </View>
  );
}

export default App;

Observed behavior and steps to reproduce

After running the following commands:
npx expo install @rnmapbox/maps
npx expo install expo-dev-client
npx expo prebuild --clean
npx expo run:ios

I get the following error:

❌ (ios/Pods/MapboxMaps/Sources/MapboxMaps/Annotations/ViewAnnotationManager.swift:79:19)
77 | @available(*, deprecated, message: "Use ViewAnnotation")
78 | public var annotations: [UIView: ViewAnnotationOptions] {
79 | idsByView.compactMapValues { [mapboxMap] id in
| ^ cannot convert return expression of type '[UIView : ViewAnnotationOptions]' to return type 'Dictionary<String, Optional>.RawValue'
80 | try? mapboxMap.options(forViewAnnotationWithId: id)
81 | }
82 | }

Expected behavior

I expect the app to build and run without any errors.

Notes / preliminary analysis

No response

Additional links and references

Your bot configuration seems to be broken. My other issue was automatically closed despite having the required code sample: #3871

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions