-
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
Update RCTUIManager.m #15784
Update RCTUIManager.m #15784
Conversation
Do you have a test plan? |
This is a very radical and breaking change which conflicts with established guidelines and practices. |
Sorry, @shergin, but it was not my opinion. https://github.com/facebook/react-native/releases/tag/v0.40.0
|
That proposal and work is about .h files, not .m or .mm files. |
I notice, if import file once in with Solution:
See also:
Also, there is some *.m(m) files with |
@javache , please judge |
#import "RCTShadowView+Internal.h" | ||
#import "RCTShadowView.h" | ||
#import "RCTUIManagerObserverCoordinator.h" | ||
#import "RCTUtils.h" |
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.
https://github.com/facebook/react-native/releases/tag/v0.40.0
This change affects all native modules and application code on iOS that refer to react native .h files
After e1577df, Native code on iOS must refer to headers out of the react namespace. Previously the following would work:
#import "RCTUtils.h"
But now all headers have been moved:
#import <React/RCTUtils.h>
This means that all iOS native libraries need a major version bump for RN 0.40. We attempt to minimize changes of this magnitude, and we apologize for any inconvenience caused.
@shergin not only *.h files, but all, that "refer to react native .h files":
|
To make React Native play nicely with our internal build infrastructure we need to properly namespace all of our header includes.
Where previously you could do
#import "RCTBridge.h"
, you must now write this as#import <React/RCTBridge.h>
. If your xcode project still has a custom header include path, both variants will likely continue to work, but for new projects, we're defaulting the header include path to$(BUILT_PRODUCTS_DIR)/usr/local/include
, where the React and CSSLayout targets will copy a subset of headers too. To make Xcode copy headers phase work properly, you may need to add React as an explicit dependency to your app's scheme and disable "parallelize build".Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)