Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't specify file type when using http source #2692

Closed
glenwong opened this issue Oct 17, 2014 · 5 comments
Closed

Can't specify file type when using http source #2692

glenwong opened this issue Oct 17, 2014 · 5 comments
Assignees
Labels
d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@glenwong
Copy link

I'm having trouble creating a podspec that refers to a zip file. My podspec is as follows:

Pod::Spec.new do |s|
  s.name             = "Kochava"
  s.version          = "0.1.2"
  s.summary          = "Kochava SDK"
  s.description      = "Ad Tracking and Analytics SDK"
  s.homepage         = "http://www.kochava.com"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.authors          = "Kochava"
  s.license          = {
    type: "Copyright",
    text: "Copyright (c) 2013-2014 Kochava. All rights reserved."
  }
  s.source           = {
    http: "http://support.kochava.com/helpdesk/attachments/1009638826",
    type: :zip
  }

  s.platform     = :ios, nil
  s.requires_arc = false

  s.preserve_paths = "libTrackAndAd.a"
  s.source_files = "*.h"

  s.libraries = "TrackAndAd"
  s.frameworks = 'UIKit', 'SystemConfiguration', 'Foundation', 'AdSupport'
  s.xcconfig = {
      LIBRARY_SEARCH_PATHS: "\"$(PODS_ROOT)/Kochava\""
  }
end

When I lint I end up with:

-> Kochava (0.1.2)
  - WARN  | [iOS] Incompatible `type` key(s) with `http` primary key for `source` attribute

Lint was passing on cocoapods 0.34.1 but after upgrading to 0.34.2 it's not. (EDIT: Sorry had the wrong versions before).

@segiddins
Copy link
Member

Please update to CocoaPods v0.34.2, which is the latest version.

@glenwong
Copy link
Author

Sorry I meant it was working on 0.34.1 and not on 0.34.2. I just updated to the latest a few hours ago.

@segiddins
Copy link
Member

Can you try just deleting that type key?

@glenwong
Copy link
Author

It doesn't seem to be able to figure out the filetype without the type key if the extension isn't explicitly included in the URL.

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 0.34.2
        Ruby : ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
    RubyGems : 2.2.2
        Host : Mac OS X 10.9.4 (13E28)
       Xcode : 6.0.1 (6A317)
Ruby lib dir : /Users/glenwong/.rvm/rubies/ruby-2.1.2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ c9c3b2db13b26cf2ce830275498c8263a81a1247

Plugins

cocoapods-plugins : 0.3.1
cocoapods-trunk   : 0.3.1
cocoapods-try     : 0.4.1

Error

Pod::Downloader::Http::UnsupportedFileTypeError - Unsupported file type: 
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-downloader-0.7.2/lib/cocoapods-downloader/http.rb:82:in `filename_with_type'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-downloader-0.7.2/lib/cocoapods-downloader/http.rb:21:in `download!'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-downloader-0.7.2/lib/cocoapods-downloader/base.rb:80:in `block in download'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/downloader.rb:29:in `block in ui_action'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/user_interface.rb:49:in `section'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/downloader.rb:28:in `ui_action'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-downloader-0.7.2/lib/cocoapods-downloader/base.rb:78:in `download'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer/pod_source_installer.rb:98:in `download_source'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer/pod_source_installer.rb:45:in `install!'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:298:in `install_source_of_pod'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:273:in `block (2 levels) in install_pod_sources'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/user_interface.rb:70:in `titled_section'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:272:in `block in install_pod_sources'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:264:in `each'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:264:in `install_pod_sources'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:116:in `block in download_dependencies'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/user_interface.rb:49:in `section'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:114:in `download_dependencies'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/installer.rb:91:in `install!'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/validator.rb:305:in `install_pod'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/validator.rb:211:in `block in perform_extensive_analysis'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/validator.rb:207:in `each'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/validator.rb:207:in `perform_extensive_analysis'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/validator.rb:73:in `validate'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/command/spec.rb:96:in `block in run'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/command/spec.rb:89:in `each'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/command/spec.rb:89:in `run'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/lib/cocoapods/command.rb:48:in `run'
/Users/glenwong/.rvm/gems/ruby-2.1.2/gems/cocoapods-0.34.2/bin/pod:33:in `<top (required)>'
/Users/glenwong/.rvm/gems/ruby-2.1.2/bin/pod:23:in `load'
/Users/glenwong/.rvm/gems/ruby-2.1.2/bin/pod:23:in `<main>'
/Users/glenwong/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/glenwong/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

@kylef kylef self-assigned this Oct 18, 2014
@kylef kylef added d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! labels Oct 18, 2014
@kylef kylef added this to the 0.34.3 milestone Oct 18, 2014
@kylef
Copy link
Contributor

kylef commented Oct 18, 2014

Fixed in CocoaPods/Core@750b927.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

No branches or pull requests

3 participants