ios - 创建私有(private) cocoapod,git 标签问题

标签 ios swift git cocoapods

我已经成功创建了一个静态库,MyCore,并创建了相关的存储库。
然后我以这种方式创建了MyCore.podspec:

Pod::Spec.new do |s|
    s.name         = "MyCore"
    s.version      = "0.1.4"
    s.summary      = "..."
    s.description  = "..."
    s.homepage     = "https://foo.com/MyCore"
    s.license      = '...'
    s.platform     = :ios, "8.0"
    s.source       = { :git => "https://foo.com/MyCore.git", :tag => s.version.to_s }
    s.source_files  = 'MyCore/*.swift'
end

我跑

pod spec lint --allow-warnings

并且 podspec 通过了验证。

很好,在我的项目中我有 podfile:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!

target 'MyProject' do

    pod 'MyCore', :git => 'https://foo.com/MyCore.git'

end

当我运行 'pod install' 时,我的 pod 已安装,但没有像我预期的那样安装在最后一个标记 (0.1.4) 处:

Installing MyCore 0.1.0 

有什么想法吗?

enter image description here

最佳答案

对于未存储在规范存储库中的私有(private) pod,Cocoapods 无法找到用于比较版本号的引用。

然后运行以下命令强制更新。

pod update

关于ios - 创建私有(private) cocoapod,git 标签问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38225902/

相关文章:

objective-c - 当 ViewController 从 UIStoryboard 实例化时,isMemberOfClass 返回 no

ios - Swift 类 : Property not initialized at super. init 调用中的错误 - 如何初始化需要在其初始化参数中使用 self 的属性

ios - AFNetworking在JSON响应键中添加引号

git - 任何查看 git 版本之间差异的工具

git - TortoiseGit 中的日志图不显示分支/merge ?

ios - 错误域=FM数据库代码=8 "attempt to write a readonly database"

ios - 4 个 View Controller 之间的简单自定义导航

ios - 如何更改导航栏的字体?

ios - Swift: TableView Controller 无法使用核心数据(加载表时出现 NSRangeException)

git - 如何在 Github 上使用终端命令?