Unable to build with CustomHTTPHeaders enabled; v10 / Mapbox 10.3.0
Describe the bug
Build failing with CustomHttpHeaders enabled
To Reproduce
- clone example app or init new one:
react-native init sample
cd sample
npm install rnmapbox/maps#main --save
-
follow this instruction (edit Podfile)
-
follow this instruction (add code to AppDelegate)
-
install pods:
cd ios
pod install
- try to build with Xcode
Expected behavior
Build succeed
Actual behavior
Build failed (see description below)
Versions:
- Platform: iOS
- Platform OS: 15.4
- Device: Phone13
- Emulator/ Simulator: yes
- Dev OS: OSX 12.3 (M1 Apple Silicon)
- @rnmapbox/maps Version 10.0.0-beta.0
- Mapbox GL version 10.3.0
- React Native Version 0.67.4
Additional context
First build will fail with: MGLCustomHeaders.h' file not found
So I added $(SRCROOT)/../node_modules/@rnmapbox/maps/ios/RCTMGL as suggested in #922
that leads to another error:
ld: warning: directory not found for option '-L/Users/spooner/Library/Developer/Xcode/DerivedData/RNMapboxGLExample-famczcunoxcdrhgahdjdddciibsb/Build/Products/Debug-iphonesimulator/react-native-mapbox-gl'
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MGLCustomHeaders", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing All Messages
Undefined symbol: _OBJC_CLASS_$_MGLCustomHeaders
Thank you for help!
Update:
After browsing source code for a while is looks like this is not implemented in v10? Obviously now instructions are for v8.
@Nodman this is not yet implemented for v10. PR-s welcome!
@Nodman this is not yet implemented for v10. PR-s welcome!
I would love to. However I do not have any experience with Swift. Maybe it's a good reason to get some
We have cust http in v10 with different impl