pod spec lint失败了400

时间:2015-07-23 13:40:43

标签: ios objective-c cocoapods podspec

我按照https://guides.cocoapods.org/making/using-pod-lib-create的所有步骤在cocoapds上提供了我的openSource库。 在发布运行pod lib lint命令之前的步骤结束时,它通过了测试:

 -> SHMultipleSelect (0.1.0)

SHMultipleSelect passed validation.

但是pod spec lint命令给出了一些错误:

[!] /usr/bin/git clone https://github.com/<GITHUB_USERNAME>/SHMultipleSelect.git /var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39741-1esoisq --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39741-1esoisq'...
fatal: unable to access 'https://github.com/<GITHUB_USERNAME>/SHMultipleSelect.git/': The requested URL returned error: 400

通过stackoverflow搜索到错误并找到了此Can not update my pod library。 运行pod spec lint SHMultipleSelect.podspec命令作为接受的答案说,它给了我另一个错误:

[!] /usr/bin/git clone https://github.com/Shamsiddin/SHMultipleSelect.git /var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39842-774kfl --single-branch --depth 1 --branch 0.1.0

Cloning into '/var/folders/fn/49fp5hx941541w0ncv5n28_h0000gn/T/d20150723-39842-774kfl'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
Unexpected end of command stream

不清楚解决我的问题。有人能告诉我死记硬背去哪儿了?

这是我的图书馆Git网址:https://github.com/Shamsiddin/SHMultipleSelect

我的图书馆的.podspec文件:

#
# Be sure to run `pod lib lint SHMultipleSelect.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# Any lines starting with a # are optional, but encouraged
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = "SHMultipleSelect"
  s.version          = "0.1.0"
  s.summary          = "An easy-to-use multiple selection view."
  s.description      = <<-DESC
                       An easy-to-use multiple selection view for iOS 7+.
                       DESC
  s.homepage         = "https://github.com/Shamsiddin/SHMultipleSelect"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'MIT'
  s.author           = { "Shamsiddin" => "shamsiddin.saidov@gmail.com" }
  s.source           = { :git => "https://github.com/Shamsiddin/SHMultipleSelect.git", :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/Shamsiddin_Said'

  s.platform     = :ios, '7.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/**/*'
  s.resource_bundles = {
    'SHMultipleSelect' => ['Pod/Assets/*.png']
  }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end

编辑1:

事实证明我没有在我的Github回购中创建一个标签。我使用版本0.1.0创建了标记并再次运行pod spec lint SHMultipleSelect.podspec命令。现在它给了我另一个错误:

 -> SHMultipleSelect (0.1.0)
    - ERROR | [iOS] The `source_files` pattern did not match any file.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

编辑2:

从我的项目结构中添加了截图: enter image description here

编辑3:

在光盘上添加了项目结构的截图。使用pod lib create SHMultipleSelect命令创建结构 enter image description here

1 个答案:

答案 0 :(得分:1)

很高兴为您的初始问题提供帮助。关于您编辑过的问题,似乎“Pod / Classes / ** / *”中没有文件。应该相对于pod规范指定此文件路径,并且应包含文件。在与podspec相同的文件夹中是否有一个名为Pod的文件夹?