react-native: Can't build react-native project for ios 11
Is this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
react-native -v
: react-native: 0.47.1node -v
: v6.11.2npm -v
: 3.10.10yarn --version
: 0.27.5
- Target Platform: ios 11
- Development Operating System: macOS 10.12.6
- Build tools: xCode Version 9.0 beta 6 (9M214v)
Steps to Reproduce
I created an expo app with create-react-native-app
and ejected it to use expokit: yarn eject
. Goal was to use arkit in this project (IOS).
In xcode i run it on a real device.
Expected Behavior
It should build
Actual Behavior
Build in xcode fails with
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RCTSRWebSocket", referenced from:
objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o)
"_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from:
objc-class-ref in libReact.a(RCTPackagerConnection.o)
ld: symbol(s) not found for architecture arm64
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 18 (3 by maintainers)
I believe I managed to find a solution for this, the final issue is either 2
libReact.a
during linkage, or 0.My Podfile contains this now:
Also, with this in the end, to avoid
libReact.a
compiled in thePod
project:Then, my XCode project is using
libReact.a
andlibRTCWebSocket.a
:This way, I managed to finally be able to both run in Simulator and Archive for the store…
Using XCode 9, RN 0.48.4, compiling the xcodeworkspace.
@maraujop
I was having the same problem the and did not have a pod file, I was able to build the app by placing libRCTWebSocket.a before libReact.a
Ok, I got it to work adding all my podspecs dependencies as
.xcodeproj
toLibraries
and linking them in binaries, the old fashioned way. I had to addRCTText
,RCTNetwork
,RCTWebSocket
,RCTImage
…When I do this it compiles perfect in my local machine, but now it fails in buddybuild with duplicate symbols:
Errors like this one:
It is obvious to me, that something is wrong with my local cocoapods, not sure what. Buddybuild states to use the same version as in my
Podfile.lock
and iOS project settings are the same. So it has to be a bad local cache or some magic they do.I’m getting the same errors after upgrading existing project to 0.48.3. I’m using a Podfile with only ‘Core’ and ‘DevSupport’ subspecs of react native. The other libraries are included via Xcode. I’ve tried removing CocoaPods entirely, but it keeps giving me the same error as above.