Closed khemmapon closed 5 years ago
Same issue debugging from terminal (using 1.0.0-rc.4 and RN 0.59.9):
node_modules/react-native-fbsdk/ios/RCTFBSDK/login/RCTFBSDKLoginButtonManager.m:22:9: fatal error: 'React/RCTComponentEvent.h' file not found
#import <React/RCTComponentEvent.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
same issue
still in 1.0.0-rc.5
1.0.0
only supports RN 0.60 and up: https://github.com/facebook/react-native-fbsdk/releases/tag/v1.0.0-rc.0
Yes, I build with RN0.60.3 also have this problem, the React target build seem like does not include the header file
I have a temporarily solution for this problem.
I add the project's node_modules/react-native/React/Base full path to Header Search Paths for the RCTFBSDK.xcodeproj in the Libraries...
and change the
#import <React/RCTComponentEvent.h>
to
#import <RCTComponentEvent.h>
in the
node_modules/react-native-fbsdk/ios/RCTFBSDK/login/RCTFBSDKLoginButtonManager.m
and then I can successfully build it.
Following @vshy108 solution I ended up getting 1366 duplicate symbols for architecture x86_64
error instead of original one :/.
--
Ok guys for everyone else struggling with this one here's what was my issue.
I migrated react-native from 0.59.0
to 0.60.0
and I missed very important step - you need to unlink your react-native-fbsdk
! The new version of RN will take care of autolinking it for you.
npx react-native unlink react-native-fbsdk
cd ios
pod install
I found a fix for this issue.
Open React.xcodeproj > Build Phases > Copy Headers > Add RCTComponentEvent.h
This header is also missing if i run a clean installation of react-native package 0.60.0
I found a fix for this issue.
Open React.xcodeproj > Build Phases > Copy Headers > Add RCTComponentEvent.h
This header is also missing if i run a clean installation of react-native package 0.60.0
I recreated my full project with npx react-native init und started using npx react-native run-is and cocoa pods... With using pods and npx the error is gone. It seems like its pretty "complicated" to upgrade 0.59 -> 0.60.
I suggest to invest some time and recreate your project with npx and pods... this also activates autolinking
@Xetoxyc you saved me!!! thanks
I found a fix for this issue.
Open React.xcodeproj > Build Phases > Copy Headers > Add RCTComponentEvent.h
This header is also missing if i run a clean installation of react-native package 0.60.0
this approach worked for me, but my pipeline never gets the fix to build the app because the fix was introduced in "node_modules/react-native/React" folder which is cleared before every build. Is there another solution for that?
I found a fix for this issue. Open React.xcodeproj > Build Phases > Copy Headers > Add RCTComponentEvent.h This header is also missing if i run a clean installation of react-native package 0.60.0
this approach worked for me, but my pipeline never gets the fix to build the app because the fix was introduced in "node_modules/react-native/React" folder which is cleared before every build. Is there another solution for that?
Try https://github.com/facebook/react-native-fbsdk/issues/580#issuecomment-512785354 this seems to be the only working solution right now.
Guys, after properly installing 0.60.5 and latest FBSDK with cocoapods as @Xetoxyc suggested, this was no longer a problem. I had no issues related to React nor ComponentEvent.h missing. I just run pod install and everything works smooth.
1.0.0
only supports RN 0.60 and up: https://github.com/facebook/react-native-fbsdk/releases/tag/v1.0.0-rc.0
This would be great on the README.md
🙂
I found a fix for this issue.
Open React.xcodeproj > Build Phases > Copy Headers > Add RCTComponentEvent.h
This header is also missing if i run a clean installation of react-native package 0.60.0
This works for me but I have to manually do it after every yarn add
or npm install
.
The header should be added to React
on its new release.
🐛 Bug Report
'React/RCTComponentEvent.h' file not found RCTFBSDKLoginButtonManager.m when I build debug in iOS
Environment
"react-native": "0.59.9", "react-native-fbsdk": "1.0.0-rc.4"