-
-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build issue for ios in MGLModule.m Multiple Errors - MapLibre SDK #1472
Comments
Can you try with the default pack in |
Downloading dependencies Rebuild project leads to the same errors |
could you also please change the order of these: post_install do |installer|
$RNMBGL.post_install(installer)
react_native_post_install(installer)
end |
did not solve the issue unfortunately. |
but a vanilla react-native app, without any dependencies does work?! |
or, what does happen when you try building the |
yes it builds and loads in the emulator without any issues.
|
Happens to me too. Podfile: platform :ios, '10.0'
plugin 'cocoapods-patch'
begin
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
rescue LoadError
puts "WARNING: ../node_modules/@react-native-community/cli-platform-ios/native_modules couldn't be loaded. Should be fine if you're in prepenv"
end
project 'myapp',
'Debug' => :debug,
'Release' => :release,
'DevDebug' => :debug,
'DevRelease' => :release
target 'myapp' do
$RNMBGL_Use_SPM = {
url: "https://github.com/maplibre/maplibre-gl-native-distribution",
requirement: {
kind: "upToNextMajorVersion",
minimumVersion: "5.11.0"
},
product_name: "Mapbox"
}
$ReactNativeMapboxGLIOSVersion = "6.3.0"
# Pods for myapp
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral.podspec"
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders.podspec"
pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition.podspec"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID.podspec"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts.podspec"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
pod 'Permission-Siri', :path => "#{permissions_path}/Siri.podspec"
pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-Motion', :path => "#{permissions_path}/Motion.podspec"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency.podspec"
target 'myappTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
pre_install do |installer|
fix_mapbox_events(installer)
$RNMBGL.pre_install(installer)
end
post_install do |installer|
$RNMBGL.post_install(installer)
end
def fix_mapbox_events(installer)
installer.pod_targets.each do |pod|
if pod.name == 'MapboxMobileEvents'
def pod.build_type;
Pod::BuildType.dynamic_framework
end
end
end
end
puts "Podfile has been eval'd" package.json:
react-native info:
|
@jutaz |
@f1sh1918 I've had: (from podfile.lock):
And: in package.json:
I've switched to Maplibre in this change. |
@jutaz $RNMBGL.pre_install(installer) |
I do have them like so:
Previously ( |
FWIW this works beautifully on Android w/ Maplibre and the same versions of packages. So it seems like something is off w/ iOS |
Is there a configuration with mapbox 5.x working on android and ios for you? Update: |
Can everyone observing this issue let me know which version is actually downloaded and used in My suspicion is, that it actually downloads version
You can circumvent this by adding this to your
Make sure to previously remove the current swift package download in XCode, just to be sure. 👍🏿 @jutaz, reason why it probably works in Android is, that it doesn't use something like this |
@ferdicus you are absolutely correct - it did download 5.12.0 of MapLibre. Applied your suggestion and now it builds. however it seem to crash when running the app with
After deeper digging it looks like it's fixed in 5.13.0 - I'll try building on x86 now (I was building on arm64 M1). I'll also test on Android 👍 |
Hrm, look like I'm seeing exactly the same crash on x86 when trying to open up the map. Rest of the app seems to work just fine, however. |
hmm, yeah - the complication with M1 chipsets certainly doesn't help 😅 I was building fine with My assumption why it doesn't build for anything post that, is probably this change: maplibre/maplibre-native#90 |
Also build under Release configuration onto a device (iPad mini 5. Gen) - worked fine with |
yeah it worked for me too. thanks ferdicus! |
Pinning Maplibre version 5.11 fixes the build, but this critical bug was fixed in Maplibre 5.12. Does anyone know of a way to make this library work with Maplibre >= 5.12.0 ? |
Making MapLibre |
Users are seeing crashes happen on a regular base. We're seeing the same thing. Sounds trivial to me. |
Sorry, my message was missing a word "work". |
Gotcha! Thanks! |
@ferdicus any idea if/when MapLibre 5.12 will be supported? I cannot run on iOS simulator with 5.11 because of issue similar to this: https://github.com/react-native-mapbox-gl/maps/issues/1355#issuecomment-928994988 And Apple review team will reject the app if it crashes on simulator. |
Nope, nothing on the roadmap yet |
I've added a fix for this: #1571 You can test this using |
I'm still facing the error using the maplibre v5.12, have you guys find any solution? |
Describe the bug
The IOS Build Process fails with multiple errors in MGLModule.m after adding react-native-mapbox lib and installing pods
To Reproduce
Podfile:
Expected behavior
Build runs successfully
Actual behavior
Build fails with multiple errors in MGLModule.m
Errors:
Versions (please complete the following information):
Additional context
Build run on XCode 12.5.1
The text was updated successfully, but these errors were encountered: