我将react-native-fbsdk升级到1.0.1后遇到了这个问题
/Users/mahgolfathi/plusless-app/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.
答案 0 :(得分:1)
1-您应该将本机版本升级到6
react-native -v
2-用RCTFBSDKLoginButtonManager.m
中的导入更改行:
#import<React/RCTComponentEvent.h>
更改为:
#import "RCTComponentEvent.h"
3-选择项目RCTFBSDK.xcodeproj,选择目标RCTFBSDK,选择Build Settings,搜索“ header”,选择“ Header Search Paths”,然后添加此新行:${SRCROOT}/../../../node_modules/react-native/React/Base
,作为非递归代码。