我正在将 react-native 添加到现有的 swift 应用程序中。为此,我将以下代码片段添加到 pod 文件中。
pod 'React', :path => './node_modules/react-native', :subspecs => [
'Core',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
# Add any other subspecs you want to use in your project
]
在此运行 pod install
无效。出现以下错误。
None of your spec sources contain a spec satisfying the dependency:
Yoga (= 0.45.0.React)
.
有人可以帮助解决这个问题吗?
谢谢
最佳答案
回答我自己的问题:
cocoa pod 的以下代码段有效。
pod 'React', :path => './node_modules/react-native', :subspecs => [
'Core',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
# Add any other subspecs you want to use in your project
]
pod 'Yoga', :path => ‘./node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
关于swift - 您的规范来源均不包含满足依赖项 : `Yoga (= 0.45.0.React)` 的规范,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44451642/