我必须在react native中创建一个framework
模块,该模块必须通过cocoapod分发。
我为React Library
创建了podspec并添加了React
作为依赖项。
现在,在我的实际本机应用程序中,当我尝试使用Framework
时,并没有提取所有依赖项。
我在一些博客中看到建议将 Core,CxxBridge,DevSupport,RCTText 作为子规范的一部分,该子规范具有如下所示的本地引用。
pod 'React', :path => 'reactNative/node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod "yoga", :path => "reactNative/node_modules/react-native/ReactCommon/yoga"
# Third party deps podspec link
pod 'DoubleConversion', :podspec => 'reactNative/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => 'reactNative/node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => 'reactNative/node_modules/react-native/third-party-podspecs/Folly.podspec'
使用上述方法,我们无法作为框架分发,因为它指向node_module
中存在的所有依赖项podspec的本地引用。
有人可以帮我分发执行所需的所有反应依赖项的框架