【问题标题】:Getting RestKit to work with CococaPods 1.x让 RestKit 与 CococaPods 1.x 一起工作
【发布时间】:2016-12-15 16:16:47
【问题描述】:

众所周知,在使用 CococaPods 的 iOS 项目中使用 RestKit 时,我们需要坚持使用旧的 CocoaPods 0.38 版本。否则 RestKit 将无法正确链接:RKObjectMapping.h Not Found

但现在 CocoaPods 已经结束测试版,我们不得不升级到 CocoaPods 1.x,因为旧版本无法更新到最新的 pod 存储库。

这会再次导致提到的 RestKit 地狱。

我们如何在新的 1.x 版本的 CocoaPods 中使用 RestKit?

【问题讨论】:

    标签: ios cocoapods afnetworking restkit


    【解决方案1】:

    嗯 - 关于这个问题的话题很大:https://github.com/RestKit/RestKit/issues/2356

    TL;DR:

    解决办法就是升级到 RestKit 0.27.0

    pod 'RestKit', '0.27.0'
    

    但是,如果您的项目明确引用 RestKit 之外的 AFNetworking,这可能会引发问题。在这种情况下,由于 RestKit 0.27 与 AFNetworking 1.3 捆绑在一起,我们需要添加:

    pod 'AFNetworking', '1.3.4'
    

    编码愉快!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-13
      • 2016-10-06
      • 2011-11-30
      • 2014-02-19
      相关资源
      最近更新 更多