maps icon indicating copy to clipboard operation
maps copied to clipboard

Unable to build with CustomHTTPHeaders enabled; v10 / Mapbox 10.3.0

Open Nodman opened this issue 3 years ago • 2 comments

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 avatar Mar 22 '22 15:03 Nodman

@Nodman this is not yet implemented for v10. PR-s welcome!

mfazekas avatar Apr 07 '22 13:04 mfazekas

@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

Nodman avatar Apr 07 '22 13:04 Nodman

We have cust http in v10 with different impl

mfazekas avatar Sep 16 '22 10:09 mfazekas