CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 72 forks source link

Unrecognized options [:headers] #91

Closed kevmando closed 4 years ago

kevmando commented 5 years ago

Hi,

I'm trying to set up private repo and have a problem with source setting with http url. http://guides.cocoapods.org/syntax/podspec.html#source

It seems the document says 'headers' is a supported key, but I keep getting this error if I use headers. If I remove headers, then it fails on different error, which looks like failing to download zip file because of missing authorization.

I'm using pod 1.8.4 and it seems cocoa pod-downloader is 1.2.2.

error

pod spec lint test-framework.podspec

 -> test-framework (0.1.0)
    - ERROR | [iOS] unknown: Encountered an unknown error (Unrecognized options `[:headers]`) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

podspec file

Pod::Spec.new do |spec|

  spec.name         = "test-framework"
  spec.version      = "0.1.0"
  spec.summary      = "test-framework"
  spec.homepage     = "http://example.com"
  spec.license      = "NO_MIT"
  spec.author       = { "Anyone@example.com" => "anyone@example.com" }
  spec.platform     = :ios, "10.0"
  spec.source       = { :http => 'https://enterprise-github/test/releases/download/0.1.0/TEST.framework.zip',
                         :type => 'zip',
                         :headers => ['Authorization: token token-value-here']

                      }
  spec.vendored_frameworks = 'TEST.framework'

end

gemfile.lock

    cocoapods (1.8.4)
      activesupport (>= 4.0.2, < 5)
      claide (>= 1.0.2, < 2.0)
      cocoapods-core (= 1.8.4)
      cocoapods-deintegrate (>= 1.0.3, < 2.0)
      cocoapods-downloader (>= 1.2.2, < 2.0)
      cocoapods-plugins (>= 1.0.0, < 2.0)
amorde commented 5 years ago

Hello! looks like this was implemented, but never released. This was added in #89.

I'll see if we can get a release out for this

kevmando commented 5 years ago

Thanks @amorde I had seen the pr merged and just thought it would have released already. Hope it would be released soon. 🙏 🤞

dnkoutso commented 4 years ago

Released with 1.3.0.