我使用pod spec create
在我的项目(Swift)文件夹中创建.podspec文件。在项目文件夹内,源文件在Source文件夹中,demo项目在Example文件夹中。 LICENSE也被创建了。
但规范没有通过验证,我收到了The spec did not pass validation, due to 2 errors
这是我的PodSpec文件:
Pod::Spec.new do |s|
s.name = "StickerTextView"
s.version = "0.1.0"
s.summary = "add text(multiple line support) to imageView, edit, rotate or resize them as you want, then render the text on image"
s.homepage = "https://github.com/luiyezheng/StickerTextView"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "luiyezheng" => "luiyezheng@126.com" }
s.source = { :git => "https://github.com/luiyezheng/StickerTextView.git", :tag => "0.1.0" }
s.platform = :ios, "8.0"
s.source_files = "Source"
s.requires_arc = false
s.frameworks = "UIKit"
end
以下是错误的详细信息:
[!] Error installing StickerTextView
-> StickerTextView (0.1.0)
- ERROR | name: The name of the spec should match the name of the file.
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/local/bin/git clone https://github.com/luiyezheng/StickerTextView.git /tmp/d20160422-22078-3jc64h --single-branch --depth 1 --branch 0.1.0
Cloning into '/tmp/d20160422-22078-3jc64h'...
warning: Could not find remote branch 0.1.0 to clone.
fatal: Remote branch 0.1.0 not found in upstream origin
) during validation.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 2 errors.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command/spec/lint.rb:77:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'