我正在创建一个私人可可豆荚,下面是pod规格。
我的Podspec是
Pod::Spec.new do |s|
s.name = 'RSCrashAdapter'
s.version = '1.0.0'
s.platform = :ios, ‘6.0’
s.summary = ‘Crash Reporting Tool’
s.homepage = 'http://rsjs001:7990/scm/boot/rcrai.git'
s.author = { ‘Sushree Swetanka’ => ’s’ushree.swetanka@rishabhsoft.com }
s.source = { :git => 'http://rsjs001:7990/scm/boot/rcrai.git', :tag => s.version.to_s }
s.license = { :type => 'New BSD License', :file => 'LICENSE' }
s.source_files = '*.{h,m}'
s.requires_arc = true
end
我在终端中收到以下错误:在evey规范中它给了我错误..
$ pod spec lint
-> samplePod.podspec
- ERROR | [spec] The specification defined in `samplePod.podspec` could not be loaded.
[!] Invalid `samplePod.podspec` file: samplePod.podspec:3: no .<digit> floating literal anymore; put 0 before dot
spec.version = ‘1.0.0’
^
samplePod.podspec:3: syntax error, unexpected tFLOAT, expecting '('
spec.version = ‘1.0.0’
^
samplePod.podspec:4: syntax error, unexpected =>, expecting keyword_end
spec.license = :type => 'BSD'
^
samplePod.podspec:6: syntax error, unexpected =>, expecting keyword_end
spec.authors = 'Tony Million' => 'tonymillion@gmail.com'
^
samplePod.podspec:8: syntax error, unexpected =>, expecting keyword_end
...pec.source = :git => 'https://github.com/tonymill...
... ^
samplePod.podspec:8: syntax error, unexpected ',', expecting keyword_end
.../tonymillion/Reachability.git', :tag => 'v3.1.0'
... ^. Updating CocoaPods might fix the issue.
Analyzed 1 podspec.
[!] The spec did not pass validation.
请帮我解决规格错误....
答案 0 :(得分:4)
您应该在此字符"
(&#34; 1.0.0&#34;)之间准确填写一个版本号,同时您的‘
应该是'
,而不是其他任何人。
答案 1 :(得分:2)
当您在TextEdit中打开它时,问题与pod文件中的“和”符号有关。只需用&#34;更新所有“和”和&#34;。
答案 2 :(得分:0)
终于得到了答案。 在xcode中打开podspec并替换其中的所有引号并再次输入。 textEdit将引号更改为cocoapods不支持的引号。
答案 3 :(得分:0)
就我而言,我使用了错误的podspec文件名。
pod lib lint WrongPodName.podspec
但是正确的广告连播名称是
pod lib lint MyPodName.podspec
您需要输入ls
命令并检查确切的podspec文件名。