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

ios - 从开源 repo 创建 CocoaPods 库

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

我想使用 DEST library在我的 iOS 应用程序中。我想通过 CocoaPods 包含它。

按照官方教程我这样编辑.podspec:

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 我有:

### Command

/usr/local/bin/pod lib lint

报告

  • 你做了什么?

  • 您预计会发生什么?

  • 发生了什么?

堆栈

cocoa pod :1.1.1 ruby : ruby 2.0.0p648(2015-12-16 修订版 53162)[universal.x86_64-darwin16] ruby gem :2.0.14.1 主机:Mac OS X 10.12.3 (16D32) Xcode:8.3.2(8E2002) Git : git 版本 2.11.0 (Apple Git-81) Ruby 库目录:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib 存储库:主 - https://github.com/CocoaPods/Specs.git @ 4076e32f9f51026e071e398117df63084ee3f​​bae

插件

cocoapods-deintegrate:1.0.1 cocoapods 插件:1.0.0 cocoapods 搜索:1.0.0 cocoa 足统计:1.0.0 cocoa 足树干:1.1.1 cocoa 足试:1.1.0

错误

``` ArgumentError - 格式错误的版本号字符串 v0.8 /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/version.rb:52:in 初始化' /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.1.1/lib/cocoapods-core/vendor/version.rb:199:innew' /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:inversion' /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:ineach' /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:ineach' /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'

我做错了什么?



Best Answer-推荐答案


版本字符串不应包含“v”。它应该是“0.8”,而不是“v0.8”。更多关于 podspec 版本规范 here

关于ios - 从开源 repo 创建 CocoaPods 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43824724/

回复

使用道具 举报

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

本版积分规则

关注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