-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
[macOS] Fix build on fabric
#3154
Conversation
apple/RNGestureHandlerButton.h
Outdated
#ifdef __cplusplus | ||
- (void)mountChildComponentView:(RNGHUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; | ||
- (void)unmountChildComponentView:(RNGHUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; | ||
- (void)updateLayoutMetrics:(const facebook::react::LayoutMetrics &)layoutMetrics | ||
oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics; | ||
#endif |
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.
I actually have no idea whether it's safe to do (have method declarations behind a compile flag but not the implementation.
Why do it this way instead of just changing files where it was included to be Objective-C++?
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.
This file was already change into Obj-C++
. The thing is, changing it to Obj-C++
is not enough and without this flag you'll get compilation errors. We talked about it with @piaskowyk and this was the solution that he came up with. Let us know if you see better one 😅
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.
I meant that everything that includes RNGestureHandlerButton.h
should also be changed to Objective-C++ file not only RNGestureHandlerButton.m
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.
Well, that makes sense.
Done in 9ebcbff
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.
Checks for __cplusplus
shouldn't be necessary in that case
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.
You're right, done in d8d1772
Can confirm that it fixes #3144 💯 |
Description
Right now Gesture Handler fails to build on macOS on new architecture. This PR brings changes necessary to fix this problem.
Fixes #3144.
Test plan
Build macOS example app on new architecture.