Cocoapods: Unable to interpret the specified path as a podspec.

Created on 25 Apr 2016  ยท  3Comments  ยท  Source: CocoaPods/CocoaPods

What did you do?

After upgrading to Cocoapods 1 beta 7 I got an error when executing a 'pod trunk push EVURLCache.podspec'

Googling for the error gave me 5 results of which the first one was from my build server and the others were in japanese.

What did you expected to happen?

pushing my library to cocoapods

What happened instead?

I got the error:
[!] Unable to interpret the specified path as a pod spec.

Podfile

`````` ruby
Pod::Spec.new do |s|

โ€•โ€•โ€• Spec Metadata โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

These will help people to find your library, and whilst it

can feel like a chore to fill in it's definitely to your advantage. The

summary should be tweet-length, and the description more in depth.

#

s.name = "EVURLCache"
s.version = "2.6.0"
s.summary = "NSURLCache subclass for handeling all web requests that use NSURLRequest"
s.description = "This is a NSURLCache subclass for handeling all web requests that use NSURLRequest. (This includes UIWebView)"
s.homepage = "https://github.com/evermeer/EVURLCache"

โ€•โ€•โ€• Spec License โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

Licensing your code is important. See http://choosealicense.com for more info.

CocoaPods will detect a license file if there is a named LICENSE*

Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.

#

s.license = { :type => "MIT", :file => "LICENSE" }

โ€•โ€•โ€• Author Metadata โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

Specify the authors of the library, with email addresses. Email addresses

of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also

accepts just a name if you'd rather not provide an email address.

#

Specify a social_media_url where others can refer to, for example a twitter

profile URL.

#

s.authors = {"evermeer" => "[email protected]"}
s.social_media_url = "http://twitter.com/evermeer"

โ€•โ€•โ€• Platform Specifics โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

If this Pod runs only on iOS or OS X, then specify the platform and

the deployment target. You can optionally include the target after the platform.

#
s.ios.platform = :ios, "9.0"
s.osx.platform = :osx, "10.11"

โ€•โ€•โ€• Deployment targets โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

Specify the minimum deployment target

#
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.9"

s.watchos.deployment_target = '2.0'

s.tvos.deployment_target = '9.0'

โ€•โ€•โ€• Source Location โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

Specify the location from where the source should be retrieved.

Supports git, hg, bzr, svn and HTTP.

#

s.source = { :git => "https://github.com/evermeer/EVURLCache.git", :tag => s.version.to_s }

โ€•โ€•โ€• Source Code โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

CocoaPods is smart about how it includes source code. For source files

giving a folder will include any h, m, mm, c & cpp files. For header

files it will include any header in the folder.

Not including the public_header_files will make all headers public.

#

s.source_files = 'EVURLCache/Pod/*'

โ€•โ€•โ€• Project Linking โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

Link your library with frameworks, or libraries. Libraries do not include

the lib prefix of their name.

#

s.ios.frameworks = "Foundation", "MobileCoreServices"
s.osx.frameworks = "Foundation", "CoreServices"

โ€•โ€•โ€• Project Settings โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

#

If your library depends on compiler flags you can set them in the xcconfig hash

where they will only apply to your library. If you depend on other Podspecs

you can include multiple dependencies to ensure it works.

s.requires_arc = true

In cocoapods version 1 ReachabilitySwift does not work as a dependency. For now the file is included in EVURLCache

s.dependency "ReachabilitySwift"

end```
``````

awaiting input

Most helpful comment

I've got an open PR to cocoapods-trunk improving this. In the meantime, try running pod spec lint --verbose

All 3 comments

I've got an open PR to cocoapods-trunk improving this. In the meantime, try running pod spec lint --verbose

pod spec lint --verbose will give me the following output. The platform specification worked before.

 -> EVURLCache.podspec
    - ERROR | spec: The specification defined in `EVURLCache.podspec` could not be loaded.


[!] Invalid `EVURLCache.podspec` file: undefined method `platform=' for #<Pod::Specification::DSL::PlatformProxy:0x007f86a8b6d010>.

 #  from EVURLCache.podspec:45
 #  -------------------------------------------
 #  #
 >  s.ios.platform = :ios, "9.0"
 #  s.osx.platform = :osx, "10.11"
 #  -------------------------------------------


Analyzed 1 podspec.

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

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0.beta.8/lib/cocoapods/command/spec/lint.rb:77:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0.beta.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0.beta.8/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0.beta.8/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Could it be that this error comes up because I specified:

s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.9"

when i remove the platform specification the error goes away

Yeah, s.ios.platform is no good, you need to set individual deployment targets if you support multiple platforms.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Curtis-Halbrook picture Curtis-Halbrook  ยท  3Comments

sonu5 picture sonu5  ยท  3Comments

dawnnnnn picture dawnnnnn  ยท  3Comments

pronebird picture pronebird  ยท  3Comments

pallaviMN picture pallaviMN  ยท  3Comments