maplibre / maplibre-react-native

A MapLibre react native module for creating custom maps
Other
252 stars 53 forks source link

Crash on calling MaplibreGL.setAccessToken: MaplibreGL.StyleURL is null #44

Open coddra opened 1 year ago

coddra commented 1 year ago

Steps to Trigger Behavior

The getting started guide (with expo).

Behavior

Running the app results in errors, before showing anything on screen.

Screenshots

image image

Version(s) affected

eloivaque commented 1 year ago

Hi

I have same problem and finaly is solved when I install the pods of maplibre. https://github.com/maplibre/maplibre-react-native/blob/main/ios/install.md

I put this line -> $RNMBGL.post_install(installer) on ios/Podfile and then on same directory of ios execute this comand "pod install". Now the map and styleUrl executed good.

`post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) $RNMBGL.post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer)

# This is necessary for Xcode 14, because it signs resource bundles by default
# when building for devices.
installer.target_installation_results.pod_target_installation_results
  .each do |pod_name, target_installation_result|
  target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
    resource_bundle_target.build_configurations.each do |config|
      config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
    end
  end
end

end`

Leandro-Albano commented 1 year ago

I am facing the same issue but I am running on Android 11