当我运行荚规格棉布时,我一直会收到验证错误。我尝试了各种版本的pod规范文件,但它仍然没有通过。我创建了一个快速文件来指向github中的3.0版本,以及所有其他避免这个问题的方法。这是我拥有的podspec文件:
Pod::Spec.new do |s|
s.name = "SwiftImageCarousel"
s.version = "1.0.0"
s.summary = "SwiftImageCarousel is an easy-to-use carousel.”
s.description = "SwiftImageCarousel is an easy-to-use carousel. Just give it the image URLs, let it do the rest for you!”
s.homepage = “https://github.com/Centroida/SwiftImageCarousel"
s.license = "MIT"
s.platform = :ios, "10.0"
s.source = { :git => "https://github.com/Centroida/SwiftImageCarousel.git”, :tag => “1.0.0” }
s.source_files = "SwiftImageCarousel", "SwiftImageCarousel/**/*.{h,m,swift,storyboard}”
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3' }
end
!] Invalid `SwiftImageCarousel.podspec` file: syntax error, unexpected tCONSTANT, expecting keyword_end
...cription = "SwiftImageCarousel is an easy-to-use carousel. ...
... ^
SwiftImageCarousel.podspec:5: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
...usel is an easy-to-use carousel. Just give it the image URLs...
... ^
SwiftImageCarousel.podspec:5: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
... give it the image URLs, let it do the rest for you!”
... ^
SwiftImageCarousel.podspec:5: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
SwiftImageCarousel.podspec:6: syntax error, unexpected tLABEL
s.homepage = “https://github.com/Centroida/SwiftImageCarousel"
^
SwiftImageCarousel.podspec:6: unknown regexp options - gthb
SwiftImageCarousel.podspec:6: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
SwiftImageCarousel.podspec:7: syntax error, unexpected tCONSTANT, expecting keyword_end
s.license = "MIT"
^
SwiftImageCarousel.podspec:8: syntax error, unexpected tFLOAT, expecting keyword_end
s.platform = :ios, "10.0"
^
SwiftImageCarousel.podspec:9: syntax error, unexpected tIDENTIFIER, expecting keyword_end
...source = { :git => "https://github.com/Centroida/Swift...
... ^
SwiftImageCarousel.podspec:9: unknown regexp options - gthb
SwiftImageCarousel.podspec:9: syntax error, unexpected ',', expecting keyword_end
...oida/SwiftImageCarousel.git”, :tag => “1.0.0” }
... ^
SwiftImageCarousel.podspec:9: no .<digit> floating literal anymore; put 0 before dot
...eCarousel.git”, :tag => “1.0.0” }
... ^
SwiftImageCarousel.podspec:10: unterminated string meets end of file
SwiftImageCarousel.podspec:10: syntax error, unexpected end-of-input, expecting keyword_end.发布于 2017-01-16 19:11:24
卷曲的引号会不会带来麻烦?
发布于 2017-01-17 08:56:37
取自https://www.raywenderlich.com/97014/use-cocoapods-with-swift
注意:您不应该使用TextEdit编辑Podfile,因为它喜欢用更具图形吸引力的排版引号替换标准引号。这可能导致CocoaPods混淆并导致抛出错误,因此最好使用Xcode或其他编程文本编辑器来编辑您的Podfile.。
事实证明,使用正确的引号非常重要。去做吧!或浪费一天与此:)
https://stackoverflow.com/questions/41683403
复制相似问题