Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Linking a Podfile to a podspec in a different folder will use wrong path to dependency with local pod spec #661

hartbit opened this Issue Nov 23, 2012 · 4 comments


None yet
2 participants

hartbit commented Nov 23, 2012

It sounds complicated but is not. Imagine a project developed with the recommended folder structure:

├── Classes
    └── ios
    └── osx
├── Resources
├── Project
    └── Podfile
├── Readme.markdown
├── NAME.podspec
└── DEPENDENCY.podspec

Now the Podfile will look something like this:

platform :ios, '5.0'
podspec :path => '../NAME.podspec'

Now, if the podspec has a dependency with a local podspec:

Pod::Spec.new do |s|
  # Standard stuff
  s.dependency 'DEPENDENCY', :podspec => 'DEPENDENCY.podspec'

In that case, the pod update will fail with this error:

No such file or directory - DEPENDENCY.podspec

because it is looking for it in the Podfile folder, but should be actually looking in the podspec's folder.


fabiopelosin commented Nov 24, 2012

This could be fixed by keeping track the of the specification that triggered the dependency. However it is unclear to me the usage case. Could you provide some context about why would you used the :podspec option within a podspec file?

hartbit commented Nov 28, 2012

In this case, I am pointing towards a podspec I have created on gist. It's there until I am sure it works before adding it to the Specs repo:

s.dependency 'SDURLCache', :podspec => 'https://raw.github.com/gist/4135886/ef797b0ef494c32cc8ff70133f38bf0e4d636bcb/SDURLCache.podspec'

But even if this is not a standard usage case, I still believe it's a bug that should be fixed.


fabiopelosin commented Nov 29, 2012

Thanks, for the info, marked as bug.


fabiopelosin commented Apr 5, 2013

The usage of external options in the podspecs has been deprecated. Therefore this issue is not relevant anymore.

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment