[Bug]: IOS App crash Bundle+MapboxMaps
Mapbox Implementation
Mapbox
Mapbox Version
10.7.0
Platform
iOS
@rnmapbox/maps version
10.0.0-beta.33
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
the application opens and crashes after 10 seconds.
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
@jeremyvinec there must be special in your setup, or you missed to perform some steps in install, what is your Podfile?!
here is my Podfile :
`require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
$RNMapboxMapsImpl = 'mapbox'
platform :ios, '13' install! 'cocoapods', :deterministic_uuids => false
production = ENV["PRODUCTION"] == "1"
target 'Example' do config = use_native_modules!
Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change false to true and then install pods
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'rnmapbox-maps', :path => '../node_modules/@rnmapbox/maps', :inhibit_warnings => false pod 'Firebase', :modular_headers => true pod 'FirebaseCoreInternal', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true pod 'FirebaseCore', :modular_headers => true
target 'ExampleTests' do inherit! :complete # Pods for testing end
post_install do |installer| react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) $RNMapboxMaps.post_install(installer) end end `
@jeremyvinec you're missing pre_install hook for $RNMapboxMaps
Thank's ! i added this
pre_install do |installer|
$RNMapboxMaps.pre_install(installer)
end