Question

Hello i am creating podspecs for my private lib that works great but when i create a podspec with subspecs validate with $ pod spec lint [podname].podspec will be successfull

But when i will add this pod and say $ pod install

I get allways this error:

Error

ArgumentError - Malformed version number string Loader
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/vendor/version.rb:191:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/version.rb:60:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/source/file_system_data_provider.rb:61:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/source/file_system_data_provider.rb:61:in `block in versions'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/source/file_system_data_provider.rb:59:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/source/file_system_data_provider.rb:59:in `versions'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.32.1/lib/cocoapods-core/source.rb:90:in `versions'

My podspec looks like thist:

sp.dependency 'Globals','~> 0.0.1' and sp.dependency 'Extensions','~> 0.0.1' was private pods and they will work fine.

Pod::Spec.new do |s|
  s.name         = "Networking"
  s.version      = "0.0.2"
  s.summary      = "Networking for Handling Network"

  s.description  = "Networking handling Network and blabla"
  s.homepage     = "http://www.myhp.at"

  # ―――  Spec License  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  s.license = { :type => 'MIT', :text => <<-LICENSE
                   Copyright 2014 blabla
                 LICENSE
               }

  # ――― Author Metadata  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  s.author             = { "MyName" => "me@me.at" }

  # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  s.platform     = :ios, "5.0"

  # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  s.source       = { :git => "https://myurl/myrepo.git", :tag => "0.0.2" }

  # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  # s.source_files  = "Networking/"
  # s.exclude_files = "Classes/Exclude"
  # s.public_header_files = "Classes/**/*.h"

  s.subspec 'Loader' do |sp|
        sp.source_files = 'Networking/Loader' 
        sp.dependency 'ASIHTTPRequest', '~> 1.8'
        sp.dependency 'Globals','~> 0.0.1'
        sp.dependency 'Extensions','~> 0.0.1'
  end

  s.subspec 'L1DataFeed' do |sp|
        sp.source_files = 'Networking/DataFeed'     
        sp.frameworks   = 'CoreData'
        sp.dependency 'ASIHTTPRequest', '~> 1.8'
        sp.dependency 'Globals','~> 0.0.1'
        sp.dependency 'Extensions','~> 0.0.1'
  end

  s.subspec 'L1NetworkManager' do |sp|
        sp.source_files = 'Networking/NetworkManager'       
        sp.dependency 'Networking/DataFeed'
        sp.dependency 'ASIHTTPRequest', '~> 1.8'
        sp.dependency 'Globals','~> 0.0.1'
        sp.dependency 'Extensions','~> 0.0.1' 
  end

  # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  # s.resource  = "icon.png"
  # s.resources = "Resources/*.png"

  # s.preserve_paths = "FilesToSave", "MoreFilesToSave"

  # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  # s.framework  = "SomeFramework"
  # s.frameworks = "SomeFramework", "AnotherFramework"

  # s.library   = "iconv"
  # s.libraries = "iconv", "xml2"

  # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

  s.requires_arc = true

  # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
  #s.dependency 'ASIHTTPRequest', '~> 1.8', '>= 1.8.2'
  #s.dependency 'Globals','~> 0.0.1'
  #s.dependency 'Extensions','~> 0.0.1'

end

the Folder Structure looks like so:

root:

  • Networking
  • --> Loader
  • --> DataFeed
  • --> NetworkManager

so can someone help me with this problem?

I tryed to make an other podspec with subspecs same problem.

Was it helpful?

Solution

The exception backtrace seems to indicate that this happens when reading in specs from disk. Could it be that you have a Loader directory in a spec dir that normally should contain a version dir?

E.g. this only contains version dirs:

$ ls -l ~/.cocoapods/repos/master/AFNetworking/ drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.0 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.0-RC1 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.0-RC2 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.0-RC3 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.1 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.2 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.0.3 drwxr-xr-x 3 eloy staff 102 Feb 2 14:14 2.1.0 drwxr-xr-x 3 eloy staff 102 Mar 3 17:42 2.2.0 drwxr-xr-x 3 eloy staff 102 Mar 15 13:05 2.2.1 drwxr-xr-x 3 eloy staff 102 Apr 16 13:33 2.2.2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top