-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Fix - Unable to build React target after a 'pod install' #17764
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Let's see if we can get someone more familiar with CocoaPods to review this. |
This PR should be merged |
@Titozzz as I said, this PR needs to be reviewed first. |
Any updates on the PR |
This fix works for me. |
I think it's more about someone with familiarity with Yoga, who knows what the necessary headers are. Modifying the podspec works great for me btw. 👍 |
But apart from that; I believe the podspecs are only used for apps who integrate React Native using CocoaPods, right? And since this fix is confirmed to be working for multiple people, I don't think it can't get any worse with this change, because without it, building doesn't work at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
Generated by 🚫 dangerJS |
The following error was thrown: 'string' file not found To fix the issue, the Yoga's headers importing classes from the STL have been excluded from the generated umbrella file via the podspec.
CC: @ide @emilsjolander @alloy as you were always active in CocoaPods related issues. I can see the import did fail for some reason, isn't it because of a mandatory rebase you Hector requested last time? Anyways, please let me know when this lands and whether it has to be cherry-picked. Looks potentially as a serious candidate. |
@koenpunt Is correct that this is more an issue of knowing what Yoga headers are indeed public, but otoh these vendored podspecs are also only meant to be used by React Native, so if builds work with only exposing these headers (and potentially not exporting other headers that are also meant to be public) then that seems fine to me 👍 |
@LukeDurrant @Plo4ox Thank you so much! 💯Fishhook and RCTAnimation was broken for me too. |
Because of the way the podspec setup has been chosen in RN’s case (that is, multiple podspecs, but none in a spec repo) there are some chicken and egg problems when linting the specs. That env variable is to make that case work, as such you can ignore it for normal usage. In your normal usage case, the source is indeed technically fetched from GitHub, but CP doesn’t actually fetch it again, it has a local cache from where it will unpack the same source. So it really doesn’t matter in the end.
I think people should either integrate something completely manually and understand all of the build system or leave all of it up to a manager, the combination would lead to more confusion imo. |
I’m still very much in favour of having a RN specific spec-repo with proper podspecs for each of the RN vendored libraries, including the various distinct parts that make up the RN framework (such as |
I'm not using the Animated part, however to build dev menu one needs WebSocket that needs the change: diff -ruN node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m new_node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m
--- node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m 2018-01-29 08:51:28.000000000 +0100
+++ new_node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m 2018-01-29 08:54:01.000000000 +0100
@@ -11,7 +11,7 @@
#import <React/RCTConvert.h>
#import <React/RCTDefines.h>
-#import <fishhook/fishhook.h>
+#import <React/fishhook.h>
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
#import <os/log.h> @Plo4ox could you incorporate that as well? |
@barbieri I don't think that regrouping all the fixes in the same PR is a good thing to do, knowing that there already is a PR that is fixing the issue. Furthermore, I just wanted to do a rebase, but the latest version of react-native in master didn't work... |
@Plo4ox indeed, they can be handled in separate... however I'm amazed how buggy are the podspecs and the cocoapods support. Compared to Android, gradle works like a charm, just need one single line to say the maven url. Actually, for me I want to use with Swift... but my project is another library/framework, however I can't use React as a framework (it should be one!), thus I need a |
@alloy This is very cool! |
@rizwankce You are right, it seems that my PR has been deprecated by a new one 😆 |
@Plo4ox: sorry you got this error. The RCTFabricUIManagerWrapper.mm shouldn't have been linked to the existing project since it's experimental and at the very early stage. I'll talk to my team to get this fixed. Meanwhile, could you help provide the step to repro the error (preferably as a separate issue, tagging me)? |
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR #16192 PR #16271 PR #17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR #16192 PR #16271 PR #17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: #18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR #16192 PR #16271 PR #17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR #16192 PR #16271 PR #17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: #18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR facebook#16192 PR facebook#16271 PR facebook#17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR facebook#16192 PR facebook#16271 PR facebook#17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: facebook#18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR facebook#16192 PR facebook#16271 PR facebook#17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR facebook#16192 PR facebook#16271 PR facebook#17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: facebook#18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR facebook#16192 PR facebook#16271 PR facebook#17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR facebook#16192 PR facebook#16271 PR facebook#17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: facebook#18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
Summary: Fixing error node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h:12:9: 'RCTAnimation/RCTValueAnimatedNode.h' file not found I'm integrating react native into an existing app through cocoa pods and similar to other PRs PR facebook#16192 PR facebook#16271 PR facebook#17764 When integrating with cocoa pods ``` pod 'React', :path => './node_modules/react-native', :subspecs => [ 'Core', 'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43 'RCTText', 'RCTNetwork', 'RCTWebSocket', # needed for debugging 'RCTImage', 'RCTWebSocket', 'BatchedBridge', 'RCTLinkingIOS', 'RCTActionSheet', 'RCTAnimation' ] ``` With `RCTAnimation` being the important part for this PR. Also note without this PR and the other PR's above if anyone is trying to integrate react native into an existing app i.e. through cocoa pods they won't be able too. I think the latest working version is My app wouldn't build without changing this line PR facebook#16192 PR facebook#16271 PR facebook#17764 [IOS] [BREAKING] [PODS] - Fixed RCTAnimation import for integrating with cocoapods Pull Request resolved: facebook#18050 Differential Revision: D9235162 Pulled By: hramos fbshipit-source-id: 426daccf8d8952658e262d5a0e4623c72c38542c
The following error was thrown:
'string' file not found
To fix the issue, the Yoga's headers importing classes from the STL
have been excluded from the generated umbrella file via the podspec.
Motivation
Integrate React Native into an existing native app.
Test Plan
This has been tested by building a native app using the React pod.