Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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 · 4 comments

2 participants


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


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?


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 => ''

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


Thanks, for the info, marked as bug.


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

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.