After I updated to the newest version I get this link error while building
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RCTMGLImageQueueOperation", referenced from:
objc-class-ref in libreact-native-mapbox-gl.a(RCTMGLImageQueue.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
try clearning your node_modules or if you're using yarn removing and readding yarn
@nitaliano I've done that still same error.
I had that error too, for me it was caused by a an outdated version of the mapbox framework being linked. I opened the folder for the module (@mapbox/react-native-mapbox-gl) an ran yarn fetch:ios:sdk.
If it says that the version is up-to-date, remove the ios/.framework_version file and try again.
I've also created #1151 to have better framework version detection in the future 🙂
I still get this error even with @fwal answer.
I'm not able to reproduce this with npm, and I can't reproduce this on master with yarn. Could you list the steps that you're doing to reproduce? It might even be worth while to run yarn cache clean.
I’m guessing that Xcode have linked itself to the wrong version.
Could you check the path for the framework in Xcode? You do that by selecting the framework in the navigator and then the info shows up in the right-most pane.
@nitaliano I also noticed that the setup instructions state that you should check the “copy if needed” checkbox when adding the framework manually. This is probably a bad idea because if Xcode decides to copy the framework, the link to the framework in the package is severed.
It worked after i used react native link command. In the end problem was plugin not being linked in xcode. Thanks guys for your help 👍
@muresanandrei I'm going to close this out.
@fwal I can look into that, I will admit the instructions have been the way they are for awhile now, so improvements can for sure be made.
Most helpful comment
It worked after i used react native link command. In the end problem was plugin not being linked in xcode. Thanks guys for your help 👍