【问题标题】:I want use version '1.1.0' of `Alamofire-SwiftyJSON`我想使用 `Alamofire-SwiftyJSON` 的版本 '1.1.0'
【发布时间】:2015-09-18 09:07:28
【问题描述】:

我想使用 Alamofire-SwiftyJSON 的“1.1.0”版本

我的 Podfile 是:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '1.2.3'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :tag => '2.2.0'
pod 'Alamofire-SwiftyJSON', :git => "https://github.com/SwiftyJSON/Alamofire-SwiftyJSON.git", :tag => '1.1.0'

我得到了跟随错误:

Analyzing dependencies
Pre-downloading: `Alamofire` from `https://github.com/Alamofire/Alamofire.git`, tag `1.2.3`
Pre-downloading: `Alamofire-SwiftyJSON` from `https://github.com/SwiftyJSON/Alamofire-SwiftyJSON.git`, tag `1.1.0`
[!] Unable to find a specification for 'Alamofire-SwiftyJSON'.

【问题讨论】:

    标签: xcode swift cocoapods alamofire swifty-json


    【解决方案1】:

    这是正常情况。 Alamofire-SwiftyJSON 存储库在标签 1.1.0 处的 repo 中没有 podspec,并且没有 pod 被推送到 cocoapod 主干。

    您必须分叉项目,并自行将Alamofire-SwiftyJSON.podspec 添加到根目录。它应该是什么样子的一个例子:

    Pod::Spec.new do |s|
      s.name        = "Alamofire-SwiftyJSON"
      s.version     = "1.1.0"
      s.summary     = "Alamofire extension for serialize NSData to SwiftyJSON "
      s.homepage    = "https://github.com/[your github name]/Alamofire-SwiftyJSON"
      s.license     = { :type => "MIT" }
    
      s.requires_arc = true
      s.osx.deployment_target = "10.9"
      s.ios.deployment_target = "8.0"
      s.source   = { :git => "https://github.com/[your github name]/Alamofire-SwiftyJSON.git", :tag => s.version }
      s.source_files = "Source/*.swift"
      s.dependency 'Alamofire', '1.3'
      s.dependency 'SwiftyJSON', '2.2.0'
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-24
      • 2023-03-18
      • 1970-01-01
      • 2020-08-28
      • 1970-01-01
      • 2017-05-31
      • 2014-12-27
      相关资源
      最近更新 更多