0

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 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.

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

Excerpt from pod spec:

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

Release on Github is as below:

Release snippet

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

EndersJeesh
  • 427
  • 1
  • 4
  • 20

1 Answers1

3

Yes.

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
  }

Some examples in the podspecs at https://github.com/firebase/firebase-ios-sdk

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139