react-native-gesture-handler: v1.5.0 iOS build fails with RN 0.59
fatal error: 'React/RCTRootContentView.h' file not found
#import <React/RCTRootContentView.h>
v1.4.1 built fine with RN 0.59 but v1.5.0 fails in the Xcode build. It appears to be related to this PR updating the project to RN 0.61.
Perhaps you could do something like this for backwards compatibility?
#if __has_include(<React/RCTRootContentView.h>)
#import <React/RCTRootContentView.h>
#endif
...
if ([parent isKindOfClass:[RCTRootView class]]) {
#if __has_include(<React/RCTRootContentView.h>)
[((RCTRootContentView*)rootContentView).touchHandler cancel];
#else
[(RCTRootView*)parent cancelTouches];
#endif
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 49
- Comments: 38 (2 by maintainers)
Commits related to this issue
- react-native-gesture-handler bug with 1.5 https://github.com/software-mansion/react-native-gesture-handler/issues/816#issuecomment-557447807 — committed to fabOnReact/surf-react-native by fabOnReact 5 years ago
- Update RNGestureHandlerManager.m Fix for https://github.com/software-mansion/react-native-gesture-handler/issues/816 — committed to vovkind/react-native-gesture-handler by vovkind 4 years ago
- Add iOS project Had to downgrade `react-native-gesture-handler` to `1.4.0`, because `1.6.1` was causing a build error on iOS. See https://github.com/software-mansion/react-native-gesture-handler/issu... — committed to tenerlab/covid-nomore by mlazari 4 years ago
- Add iOS project (#1) Had to downgrade `react-native-gesture-handler` to `1.4.0`, because `1.6.1` was causing a build error on iOS. See https://github.com/software-mansion/react-native-gesture-handler... — committed to tenerlab/covid-nomore by deleted user 4 years ago
- Add support for RN headers in both namespaces Fixes #816 Support RN headers both in the React namespace and no namespace, for older versions of RN. — committed to geraintwhite/react-native-gesture-handler by geraintwhite 4 years ago
- Support RN headers in both namespaces on iOS (#1183) Fixes #816 Support RN headers both in the React namespace and no namespace, for older versions of RN. — committed to software-mansion/react-native-gesture-handler by geraintwhite 4 years ago
- Support RN headers in both namespaces on iOS (#1183) Fixes #816 Support RN headers both in the React namespace and no namespace, for older versions of RN. — committed to braincore/react-native-gesture-handler by geraintwhite 4 years ago
Replace #import <React/RCTRootContentView.h> with #import “RCTRootContentView.h”
Problem Resolved
Got the same error using 1.5.0 on RN 0.59.9
To temporarily downgrade put this in your package.json:
And reinstall your dependencies
Is this going to be fixed in the lib or do we have to stay on 1.4.x for RN < 0.60?
i resolve this issue by downgrading to 1.3. and now im not using cocoapods creating app without cocoapods… if you need help please tell me send you details.
is there a more permanent fix?
Same problem with RN 0.61.1.
1.4.0 & RN 0.59.9 do not work on Android due to androidx. Had to downgrade back to 1.1.3.
facing same issue on RN 0.59.0 & react-native-gesture-handler 1.5.0… is there any issue with
@kmagiera could this be solved to help people in
react native 0.59
?