• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - pod spec lint 失败并显示 400

[复制链接]
菜鸟教程小白 发表于 2022-12-13 09:08:55 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我遵循了 https://guides.cocoapods.org/making/using-pod-lib-create 中的所有步骤使我的开源库在 cocoapds 上可用。 在发布前的步骤结束时运行 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" => "[email protected]" }
  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 = 'od/Classes/**/*'
  s.resource_bundles = {
    'SHMultipleSelect' => ['od/Assets/*.png']
  }

  # s.public_header_files = 'od/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



Best Answer-推荐答案


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

关于ios - pod spec lint 失败并显示 400,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31589131/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap