Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

CocoaPods doesn't see podspecs from custom specs repo properly #226

Closed
jeanregisser opened this Issue · 7 comments

4 participants

@jeanregisser

From CocoaPods/Specs#141 (comment)

This is what I did:

pod repo add my-specs-repo git@github.com:xxx/CocoaPods-Specs
pod repo update my-specs-repo

xxx/CocoaPods-Specs is a git repo with just RestKit/0.10.1dev/RestKit.podspec

Now instead of seeing just the additional version, there's a duplicate RestKit entry and it's impossible to install the custom version.

pod list | grep RestKit
==> RestKit (0.9.3, 0.10.0, 0.10.1dev)
    RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.
==> RestKit (0.9.3, 0.10.0, 0.10.1dev)
    RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.

I tried with the public release of cocoapods and also with the latest git version.

@fabiopelosin

Just tested it in Cocoapods 0.6 rc1. The search produces:

--> RestKit (0.9.3, 0.10.0)
    RestKit is a framework for consuming and modeling RESTful web resources on iOS
--> RestKit (0.10.1dev)
    RestKit is a framework for consuming and modeling RESTful web resources on iOS

pod install fails because it can't find the version (likely because it justs looks for the versions of the first pod set it can find).

A workaround for the current version would be to rename the dev version to something like DevRestKit.

@jeanregisser

Yes, that's what I did. But there were other changes to make as this particular podspec has subspecs.
So I also specified the header_dir explicitly for each subspec.

@fabiopelosin

Yes, that's what I did. But there were other changes to make as this particular podspec has subspecs.

Oh, I see. Did you consider specifying the commit in the podfile?

dependency 'TTTFormatterKit', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'
@jeanregisser

Yes I also tried and came accross the same issue because it has subspecs.

See #141 (comment)

So the last resort was to use a custom specs repo and rename the podspec.

@fabiopelosin

I've investigated the changes necessary to make CocoaPods to play nice with homonymous pods in different repos. Unfortunately is not a trivial patch, and I'm not sure how much demand there is for it, give that your case seems better served by fixing the issues with the commit specification in the podfile.

@alloy What do you think?

From a quick look the best solution seems to patch the Pod::Specification::Set to support a set from multiple dirs.
This might also solve the duplication of pods that see around if you fork the master repo.

@alloy
Owner

@irrationalfab I think we should support it, but I don’t think for 0.6. Let’s put assign otto 0.6.1 for now, and by that time we’ll evaluate it again.

@vfleurima

I just ran into this issue while trying to create a podspec for Mixpanel 1.3.1. I'm using Cocoapods 0.13.

It's clear how to create a new podspec using the steps outlined in the wiki, but it's unclear how to update an existing podspec.

I guess I'll just edit my local master spec-repo for now and create a new issue with the updated podspec.

@fabiopelosin fabiopelosin was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.