首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从开源回购创建CocoaPods库

从开源回购创建CocoaPods库
EN

Stack Overflow用户
提问于 2017-05-06 19:47:28
回答 1查看 118关注 0票数 2

我想在我的DEST图书馆应用程序中使用iOS。我想把它包括在CocoaPods里。

遵循官方教程,我编辑.podspec如下:

代码语言:javascript
复制
Pod::Spec.new do |s|
  s.name             = 'dest'
  s.version          = 'v0.8'
  s.summary          = ' One Millisecond Deformable Shape Tracking Library'

  s.description      = <<-DESC
Deformable Shape Tracking (DEST) is a C++ library providing high performance 2D shape tracking leveraging machine learning methods. The video below shows the real-time capabilities of DEST in annotating video sequences / still images with facial landmarks.
                       DESC

  s.homepage         = 'https://github.com/cheind/dest'
  s.license          = { :type => 'BSD', :file => 'LICENSE' }
  s.author           = { 'cheind' => 'christoph.heindl@gmail.com' }
  s.source           = { :git => 'https://github.com/cheind/dest.git', :tag => "v0.8" }

  s.ios.deployment_target = '8.0'

  s.source_files = 'dest/Classes/**/*'

end

但是当我运行pod lib lint时,我有:

代码语言:javascript
复制
### Command

/usr/local/bin/pod lib lint

报告

  • 你干什么了?
  • 你以为会发生什么?
  • 相反发生了什么?

堆栈

代码语言:javascript
复制
`CocoaPods : 1.1.1         Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]     RubyGems : 2.0.14.1         Host : Mac OS X 10.12.3 (16D32)        Xcode : 8.3.2 (8E2002)          Git : git version 2.11.0 (Apple Git-81) Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib Repositories : master - https://github.com/CocoaPods/Specs.git @ 4076e32f9f51026e071e398117df63084ee3fbae` 

插件

cocoapods-deintegrate : 1.0.1 cocoapods-plugins : 1.0.0 cocoapods-search : 1.0.0 cocoapods-stats : 1.0.0 cocoapods-trunk : 1.1.1 cocoapods-try : 1.1.0

错误

格式错误的版本号字符串v0.8 /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/version.rb:52:in initialize' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/vendor/version.rb:199:in新的‘/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/vendor/version.rb:199:in new' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/root_attribute_accessors.rb:31:in版本’/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/linter.rb:109:in block in check_required_attributes' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/linter.rb:108:inblock in check_required_attributes' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/linter.rb:108:in‘/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/linter.rb:108:in check_required_attributes' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/specification/linter.rb:50:inlint’/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/validator.rb:281:in perform_linting' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/validator.rb:78:invalidate‘/Library/Ruby/Gems/2.0。0/gems/cocoapods-1.1.1/lib/cocoapods/command/lib/lint.rb:62:in block in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command/lib/lint.rb:50:in run' /Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:inrun‘/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in’/usr/local/bin/pod:23:in load' /usr/local/bin/pod:23:in

我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2017-06-24 23:10:01

版本字符串不应包含'v‘。应该是'0.8‘而不是'v0.8’。更多关于podspec版本规范这里的信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43824724

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档