swift - 您的规范来源均不包含满足依赖项 : `Yoga (= 0.45.0.React)` 的规范

标签 swift react-native cocoapods

我正在将 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/

相关文章:

ios - 分支 clicked_branch_link 为 0 没有元数据 Swift

swift - 如何在 UINavigationBar 中水平居中 UIBarButtonItems

javascript - 您将如何实现类似于 React Native 的条件导入?

react-native - 评估项目 ':react-native-share' 时出现问题

reactjs - 在 react native 中按后退按钮时从通知屏幕刷新上一个屏幕

swift - RestKit 编译失败,cocoapods use_frameworks for swift

swift - 使用 Swift 的私有(private) Cocoapod

ios - 如何将 UIAlertController 操作表标题垂直居中对齐?

swift - “ fatal error :在展开可选值时意外发现nil”是什么意思?

ios - Swift 2.3 在 pod 更新后使用未解析的标识符 Firebase 'FIR'