react-native-wkwebview
react-native-wkwebview copied to clipboard
/node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView/RCTWKWebView.h:3:9: 'React/RCTView.h' file not found
After following the instructions on the README I get this error: /Users/james/Documents/OneWord latest/node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView/RCTWKWebView.h:3:9: 'React/RCTView.h' file not found
Cant figure it out at all... Using XCode 9.2 with the deployment target at ios 9.
Thanks!
Are you using rnpm link or the manual linking method?
I used npm link (because rnpm is deprecated and link is now apparently a part of NPM or something).
Its really weird, I cant figure it out at all. I've tried cleaning the project, I've tried everything!
Ah.
Interestingly, if you remove the React/ prefix from the import, the error goes away, thereby prompting a chain of other errors on RCTWKWebView and even React... :/
I think rnpm link becomes react-native link. Which React Native version are you using? React Native changes the header path in 0.40
Ah, just tried with react-native link and the error has changed:
/Users/james/Documents/OneWordRNN/node_modules/react-native-navigation/ios/RCCNavigationController.h:2:9: 'React/RCTBridge.h' file not found
/Users/james/Documents/OneWordRNN/node_modules/react-native-navigation/ios/RCCNavigationController.m:1:9: In file included from /Users/james/Documents/OneWordRNN/node_modules/react-native-navigation/ios/RCCNavigationController.m:1:
/Users/james/Documents/OneWordRNN/node_modules/react-native-navigation/ios/RCCCustomBarButtonItem.m:1:9: 'React/RCTRootView.h' file not found
Maybe this is a bit past your help at this point, seeing as its not coming under wkwebview?
Oh hang on, I just fixed it by adding the search header paths (SRCROOT)/../node_modules/react-native-navigation/node_modules/react-native-controllers/ios
Which has returned me to /Users/james/Documents/OneWordRNN/node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView/RCTWKWebViewManager.h:1:9: 'React/RCTViewManager.h' file not found Presumably to do with search header paths?
Any updates on this? Id really appreciate it.
I have tried using react-native link in a new React Native project (0.54), it works fine - I cannot reproduce your issue.
@insraq maybe he needs to run pod install ? I did it after linking, but it also installs React pod, which I think is deprecated?
Actually, there is rn guide on this, this needs to be added to pod-file I believe?
pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
EDIT: @JamesHealdUK after going through all this pod hustle, I came to conclusion that it is much easier and cleaner to link it manually, especially if you didn't use React pod before this.
@IljaDaderko Im thinking it might have something to do with the fact Im using an ejected expo app? Maybe? Im not sure... Becuase my pod file does have an entry for React:
pod 'React', :path => "../node_modules/react-native", :subspecs => [ "Core", "ART", ...
@JamesHealdUK did you find a resolution to this issue?
Running up against it now, I also started with an expo app I created through create-react-native-app and ejected.
@JamesHealdUK @dmc91 here is my answer for resolving this issue for ejected Expo apps https://stackoverflow.com/a/49712675/5241130 TLDR the issue occurs with Ejected Expo apps for native libraries and we have to go through the ^ process for having the new library find React headers. Hope it helps