git - pod spec lint 错误

标签 git cocoapods podspec

我想公开一个框架。

我在我的framework目录下创建了一个pod spec,填写pod spec信息,然后输入pod spec lint

但它给我错误:

-> KPImageView (1.0.0)
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/bin/git clone https://github.com/khuong291/KPImageView.git
/var/folders/t5/rgq4j6cn7h79khx0xsftrjtw0000gp/T/d20161113-67362-1dxzrg4
--template= --single-branch --depth 1 --branch 1.0.0

Cloning into
'/var/folders/t5/rgq4j6cn7h79khx0xsftrjtw0000gp/T/d20161113-67362-1dxzrg4'...
warning: Could not find remote branch 1.0.0 to clone. fatal: Remote
branch 1.0.0 not found in upstream origin ) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error. [!] The
validator for Swift projects uses Swift 3.0 by default, if you are
using a different version of swift you can use a `.swift-version` file
to set the version for your Pod. For example to use Swift 2.3, run:
`echo "2.3" > .swift-version`.

我的 podspec:

Pod::Spec.new do |s|
  s.name         = "KPImageView"
  s.version      = "0.0.3"
  s.summary      = "UIImageView with Ken Burns effect."
  s.homepage     = "https://github.com/khuong291/KPImageView"
  s.license      = { :type => 'MIT' }
  s.author       = { "khuong291" => "dkhuong291@gmail.com" }
  s.source       = { :git => "https://github.com/khuong291/KPImageView.git", :tag => s.version.to_s }

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

  s.source_files = 'KPImageView/KPImageView/*'
end

最佳答案

看起来像 CocoaPods issue 4871

该错误是因为未推送标签 1.0.0。

Don't forget to push tags使用 git push --tags

关于git - pod spec lint 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40570592/

相关文章:

ios - Podspec 在 podfile pod 导入时失败

git 无法执行任何任务

git - git如何统计每个文件被修改了多少次?

java - 使用 JGit 检索最旧的提交

git - 与 fork 项目分离

ios - Sharekit 试飞和 pod

ios - Xcode 新构建系统 CocoaPods "Copy Pods Resources"在输出文件中有 Assets.car 并与 "Copy Bundle Resources"冲突

cocoapods - 无法调试/安装 Watch App Extension

ios - PromiseKit.framework : bundle format unrecognized, 无效或不合适

ios - 如何将桥接头添加到 Flutter 插件