maplibre / maplibre-react-native

A MapLibre react native module for creating custom maps
Other
216 stars 52 forks source link

Support for RN New Architecture #436

Open Avadon opened 1 week ago

Avadon commented 1 week ago

Upgrading to the latest RN version breaks Android runtime with an error Native part of Mapbox React Native libraries were not registered properly, double check our native installation guides. due to native module is not loading (even thought RN interoperability layer should keep legacy native modules working)

I assume the error happens somewhere here: https://github.com/maplibre/maplibre-react-native/blob/main/javascript/components/MapView.tsx#L33

Steps to Trigger Behavior

  1. Update RN to 0.73+ (any version with bridgeless mode)
  2. run react-native run-android

Expected Behavior

A running Android app

Actual Behavior

An error Native part of Mapbox React Native libraries were not registered properly, double check our native installation guides.

Screenshots (if applicable)

https://i.ibb.co/hW2gSWS/Screenshot-2024-09-05-at-18-15-49.png

Version(s) affected

tyrauber commented 1 week ago

@Avadon You are going to have better luck running 10.0.0 (10.0.0-alpha.10) with recent versions of react and react-native, as the 10.0.0 is using the latest native sdk libraries. The 9.0.0 codebase is quite old. Although, even 10.0.0 may not yet work with the new architecture. I wouldn't be surprised if that required some library changes.