【发布时间】:2019-09-10 13:26:07
【问题描述】:
我最近将 react-native 升级到了 0.60 版。结果,我的 Podfile 看起来像这样:
target 'myProject' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for myProject
# this is very important to have!
rn_path = '../node_modules/react-native'
pod 'React', :path => '../node_modules/react-native'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
...
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
其中一个项目依赖项是 FBSDK,如上所示。 问题是这种依赖依赖于 React pod 而不是 React-Core,所以构建失败是因为使用路径 React/Module 找不到某些模块:
Xcode,文件 RCTFBSDKMessageDialog.h(来自 pod react-native-fbsdk):
#import <React/RCTBridgeModule.h>
#import <FBSDKShareKit/FBSDKShareKit.h>
@interface RCTFBSDKMessageDialog : NSObject <RCTBridgeModule>
@end
我收到错误:error 'React/RCTBridgeModule.h' file not found
如果我将它更改为 React-Core/React/RCTBridgeModule.h 它可以工作。
有什么想法可以在不重命名所有引用的情况下使其工作?
【问题讨论】:
标签: ios react-native react-native-ios react-native-fbsdk