是否可以从分支机构构建Pod版本? [英] Is it possible to build a release of a Pod from a Branch?

查看:59
本文介绍了是否可以从分支机构构建Pod版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to create a pod release from a branch? It seems straight-forward enough from GitHub but pod install keeps giving me this issue:


[!] CocoaPods找不到Pod XXX的兼容版本:Podfile中的

XXXY(来自 ../ )到1.0.0,取决于
XXX(〜> 2.0.2)

[!] 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)

您的任何规范来源均不包含满足相关性的规范: XXX(〜> 2.0.2)

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

您有:
*过时的源您可以使用 pod repo update 或使用 pod install --repo-update 更新存储库。
*输入的名称或版本错误。
*未将托管Podspec的源存储库添加到您的Podfile中。

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更新 pod安装--repo-update ,但没有帮助。

I’ve tried pod repo update and pod install --repo-update but it didn’t help.

摘录(pod)摘录:

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

在Github上的发行如下:

Release on Github is as below:

此帖子似乎相似,但没有帮助:
Cocoapods子规格问题:您的规格来源均不包含满足依赖性的规格

This post seems similar but did not help: Cocoapods subspec issue: None of your spec sources contain a spec satisfying the dependency

推荐答案

是。

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

Using the source attribute, a CocoaPods podspec can point directly to a tag that can be on any branch like:

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

https://github.com/firebase/firebase-ios-sdk

这篇关于是否可以从分支机构构建Pod版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆