maplibre-react-native icon indicating copy to clipboard operation
maplibre-react-native copied to clipboard

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

Open coddra opened this issue 2 years ago • 2 comments
trafficstars

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

  • Platform: iOS
  • OS version: iOS 15
  • Device type: iPhone SE
  • Emulator/ Simulator: no
  • Development OS: Arch Linux
  • maplibre-react-native Version: 9.0.1
  • MapLibre GL version: ?
  • React Native Version 0.71.7

coddra avatar May 16 '23 13:05 coddra

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`

eloivaque avatar Aug 01 '23 16:08 eloivaque

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

Leandro-Albano avatar Sep 28 '23 23:09 Leandro-Albano

Closing due to inactivity. Comment if you are facing a similar problem and provide a minimal reproduction repository.

KiwiKilian avatar Nov 15 '24 17:11 KiwiKilian