我正在通过这个很棒的教程创建pod。 https://www.raywenderlich.com/99386/create-cocoapod-swift
我使用Objective C而不是Swift。 此步骤发生错误:
pod repo push MyProj MyProj.podspec --verbose
Output:
Validating spec
MyProj (0.1.0) - Analyzing on iOS 9.0 platform.
Preparing
Cloning spec repo `******` from `https://github.com/******/PodSpecs.git`
$ /Applications/Xcode.app/Contents/Developer/usr/bin/git clone https://github.com/******/PodSpecs.git ******
Cloning into '******'...
warning: You appear to have cloned an empty repository.
-> MyProj (0.1.0)
- ERROR | [iOS] unknown: Encountered an unknown error (Unable to create a source with URL https://github.com/******/PodSpecs.git
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/sources_manager.rb:42:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:654:in `block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:653:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:144:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `block in download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:373:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:269:in `block in perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:263:in `perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/validator.rb:81:in `validate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:125:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:64:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `'
) during validation.
[!] The `MyProj.podspec` specification does not validate.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:130:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:119:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/repo/push.rb:64:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `'
My podspec file:
Pod::Spec.new do |s|
s.platform = :ios
s.ios.deployment_target = '9.0'
s.name = "MyProj"
s.summary = "MyProj lets a user create his own timer."
s.requires_arc = true
s.version = "0.1.0"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "*** ***" => "***@***.com" }
s.homepage = "https://github.com/******/MyProj"
s.source = { :git => "https://github.com/******/MyProj.git", :tag => "#{s.version}"}
s.framework = "UIKit"
s.dependency 'ReactiveCocoa', '~> 2.5.0'
s.source_files = "MyProj/**/*.{h,m}"
s.resources = "MyProj/**/*.{png,jpeg,jpg,storyboard,xib}"
end
我在教程中完成了之前的所有步骤。
使用最新版本的cocoapods。
如何解决此错误?
我将不胜感激任何帮助!