Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unsupported download strategy exception when using the :local source specifier #415

Closed
jeanregisser opened this Issue · 10 comments

6 participants

@jeanregisser

Report

  • What did you do?

I tried using the :local source specifier in an inline pod spec.

  • What did you expect to happen?

I expected CocoaPods to use the local path.

  • What happened instead?

I got an exception.

Stack

   CocoaPods : 0.9.2
        Ruby : ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
    RubyGems : 1.8.24
        Host : Mac OS X 10.7.4 (11E53)
       Xcode : 4.3.3 (4E3002)
Ruby lib dir : /Users/jean/.rvm/rubies/ruby-1.9.3-p194/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ f087e9c5cadbc3a2123a8a31e21ccb8ed5022338

Podfile

platform :ios

pod do |spec|
  spec.name         = 'MyLib'
  spec.version      = '0.1'
  spec.source       = { :local => 'vendor/MyLib' }
  spec.source_files = '*.{h,m}'
end

Error

Unsupported download strategy `{:local=>"vendor/MyLib"}'.
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/downloader.rb:42:in `for_target'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/downloader.rb:15:in `for_pod'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/installer.rb:71:in `download_pod'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/installer.rb:61:in `block in install_dependencies!'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/installer.rb:48:in `each'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/installer.rb:48:in `install_dependencies!'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/installer.rb:101:in `install!'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/command/install.rb:53:in `run'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/lib/cocoapods/command.rb:71:in `run'
/Users/jean/Downloads/TestiOS/vendor/ruby/1.9.1/gems/cocoapods-0.9.2/bin/pod:12:in `<top (required)>'
./bundle_bin//pod:16:in `load'
./bundle_bin//pod:16:in `<main>'
@siuying siuying closed this
@siuying

There are no "local" source support in CocoaPods, so its not an issue in CocoaPods and the message is expected. If you are intend to create feature request, it would be better to clean up the issue with meaningful description.

Meanwhile, you have to put pod source code on some version control system or http location.

@jeanregisser jeanregisser reopened this
@jeanregisser

This is not a feature request, this used to work fine in CocoaPods 0.5.1.

Proof is there's still a unit test using that feature: https://github.com/CocoaPods/CocoaPods/blob/master/spec/unit/specification_spec.rb#L460

But somehow it got broken between 0.5.1 and 0.9.2.

@siuying

@jeanregisser sorry I have missed that then!

@alloy
Owner

Actually, this is a thing that sneaked in at some point and wasn’t publicised afaik. Regardless, I think it’s a good idea to re-instate this and publicise it.

@fabiopelosin

@alloy What is local supposed to do? Create a submodule or link the files?

@alloy
Owner

Welcome back, @irrationalfab! :)

It’s supposed to use the files from a local path (outside the project) directly.

@alloy
Owner

(Which is meant for local development on a directory, like bundler’s :path option.)

@fabiopelosin

Welcome back, @irrationalfab! :)

Thanks :-)

@devinfoley

I have this issue as well.

@MSNexploder

Same problem here.

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.