代码之家  ›  专栏  ›  技术社区  ›  MahdiM

椰子荚:添加一个新荚而不替换现有的旧荚

  •  0
  • MahdiM  · 技术社区  · 8 年前

    我有一个项目,我之前添加了alamofire,但现在当我想添加另一个时,我看到它正在用alamofire替换新的吗?我应该如何避免这种情况?

    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '9.0'
    use_frameworks!
    
    target 'WeatherApp' do 
      pod 'TextFieldEffects',
      :git => 'https://github.com/raulriera/TextFieldEffects.git'
    end
    

    结果是

    删除alamofire并安装TextFieldEffects

    1 回复  |  直到 7 年前
        1
  •  0
  •   Joe    8 年前

    试试这个

    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, “9.0”
    use_frameworks!
    
    target 'WeatherApp' do
    pod 'TextFieldEffects', :git =>'https://github.com/raulriera/TextFieldEffects.git' 
    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
    end
    

    甚至这样也行:

    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '9.0'
    use_frameworks!
    
    target 'WeatherApp' do
      pod 'TextFieldEffects'
      pod 'Alamofire'
    end