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.
pushing my library to cocoapods
I got the error:
[!] Unable to interpret the specified path as a pod spec.
`````` ruby
Pod::Spec.new do |s|
#
#
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"
#
#
s.license = { :type => "MIT", :file => "LICENSE" }
#
#
#
s.authors = {"evermeer" => "[email protected]"}
s.social_media_url = "http://twitter.com/evermeer"
#
#
s.ios.platform = :ios, "9.0"
s.osx.platform = :osx, "10.11"
#
#
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.9"
#
#
s.source = { :git => "https://github.com/evermeer/EVURLCache.git", :tag => s.version.to_s }
#
#
s.source_files = 'EVURLCache/Pod/*'
#
#
s.ios.frameworks = "Foundation", "MobileCoreServices"
s.osx.frameworks = "Foundation", "CoreServices"
#
s.requires_arc = true
end```
``````
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.
Most helpful comment
I've got an open PR to cocoapods-trunk improving this. In the meantime, try running
pod spec lint --verbose