gpt4 book ai didi

ios - 是否可以从分支构建 Pod 的发布?

转载 作者:行者123 更新时间:2023-11-28 23:42:41 24 4
gpt4 key购买 nike

是否可以从分支创建 Pod 版本?从 GitHub 看来很简单,但 pod install 一直给我这个问题:

[!] CocoaPods could not find compatible versions for pod "XXX": In Podfile: XXXY (from ../) was resolved to 1.0.0, which depends on XXX (~> 2.0.2)

None of your spec sources contain a spec satisfying the dependency: XXX (~> 2.0.2).

You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile.

我尝试过 pod repo updatepod install --repo-update 但没有帮助。

摘自 Pod 规范:

Pod::Spec.new do |s|
s.name = 'XXX'
s.version = '2.0.2'
s.summary = 'XXX'
s.swift_version = '4.2'

Github上发布如下:

Release snippet

这篇文章看起来很相似,但没有帮助: Cocoapods subspec issue: None of your spec sources contain a spec satisfying the dependency

最佳答案

是的。

使用 source 属性,CocoaPods podspec 可以直接指向可以在任何分支上的标签,例如:

  s.version          = '5.0.5'
s.source = {
:git => 'https://github.com/Foo/myRepo.git',
:tag => s.version.to_s
}

podspec 中的一些示例 https://github.com/firebase/firebase-ios-sdk

关于ios - 是否可以从分支构建 Pod 的发布?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53088586/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com