-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Can't build react-native project for ios 11 #15838
Comments
I managed to fix it. I forgot to mention that I needed to do this step here: https://stackoverflow.com/a/41488258/1463534 but i had to react-versions there, one from pods and one that i added manually to libraries. moving to the pods version fixed the issue here. |
i was too early. My coworker checked it out and could not build it. I know did a clean and can't build it again with the same error. Very weird. |
0.48 is the newest version, can you try with the latest release and update your issue accordingly if it repros? |
Having the same issue, after upgraded xcode 9, my project won't work again. |
@djalmaaraujo @macrozone It's a strange question but I just fix it. In Xcode 9,Select your ----------- update ------------- |
Thanks all for your replys. I could fix it. As mentioned, expo uses cocoapods for react dependencies. (DISCLAIMER: i am very new to react-native and ios development and could be totally wrong) third party react-native libraries might reference react header files in their "Header Search Paths" by looking into "$(SRCROOT)/../../react-native/React/**", This seems to fail on cocoapods project. They need to search for the header files in "../../../ios/Pods/Headers/Public/**", which is the relative path from the libraries folder inside node_modules to the Pods directry inside your project. If i add this folder to external libraries, it just builds fine. Do NOT do anything like this: https://stackoverflow.com/a/41488258/1463534 (link from above) as this might lead to other build errors like the one mentioned above. |
I'm getting the same errors after upgrading existing project to 0.48.3. |
I fixed by upgrading react-native to new versions. |
Closing as original author was able to resolve their issue. Please open a new issue with new details if you run into a similar problem. |
I'm experiencing this @macrozone 's error. It is true that his answer in stackoverflow fixes the compilation issue. However, when I start the app I see My setup is:
I'm using Cocoapods for react-native with subspecs like this:
My feeling is that something is not correct with cocoapods, and this is causing the problems. But not sure what. The funniest thing for me is that buddybuild compiles my project without issues at all. Maybe this helps someone shed some light on this. I wouldn't say this issue is closed. |
Ok, I've just updated to:
My application is using RN 0.48.4 (lastest available today) It hasn't worked, still the same linker error |
Ok, I got it to work adding all my podspecs dependencies as 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 |
Same here with High Sierra, 0.48.4 and XCode 11. |
Today I found out, that it archives correctly using
However if I remove
@dotansimha I believe latest XCode is version 9, I've tried that too. I'm quite confident this is not related to XCode, mac os version or node. It's some XCode build setting or something like that. |
Thanks @dotansimha You are right! there is a combination of libraries in cocoapods and libraries manually linked in Thank you so much! |
An alternative solution where the "target.remove_from_project" part can be skipped, is to have two targets, one for cocoapods, where the react modules aren't manually linked, allowing for release build and archive, and another for debugging where they are manually linked. Release build / archive might still require issuing the command using the CLI, but at least it can be manually installed to the simulator, and shows up in the organizer. |
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.5Steps 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
The text was updated successfully, but these errors were encountered: