【问题标题】:CocoaPods conflict on install second pod安装第二个 pod 时 CocoaPods 冲突
【发布时间】:2017-01-26 18:48:00
【问题描述】:

尝试在我的项目中安装另一个模块时,第一个模块被卸载。为什么会这样?我做错了什么?

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

  target 'FadbApp' do
  use_frameworks!

  #pod 'Alamofire', '~> 4.3' //This is previous Pod
  pod 'SRKControls', :git =>'https://github.com/reeichert/SRKControls.git'

end

我的回归

Terminal status - screenshot

为什么卸载了其他模块?谢谢!

【问题讨论】:

    标签: git module cocoapods alamofire


    【解决方案1】:

    看到# 之前的pod 'Alamofire' 吗?这表示评论!

    cmets不是用//表示的吗?

    它们使用 Swift,但您在此处使用的文件是 Podfile。它基本上是一个 Ruby 脚本。在 Ruby 中,cmets 用# 表示。换句话说,您不小心注释掉了安装 Alamofire 的行。

    删除#,你会没事的!

    【讨论】:

      【解决方案2】:

      Alamofire pod 的行已被注释掉,因此 cocoapods 会按照您的要求正确删除它。

      如果您想同时拥有两个 pod,则需要删除 pod Alamofire ... 行开头的 #

      【讨论】:

        猜你喜欢
        • 2016-04-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-01-17
        • 1970-01-01
        • 1970-01-01
        • 2016-09-17
        相关资源
        最近更新 更多