如何配置podsec文件swift项目

时间:2017-12-23 07:58:27

标签: ios swift cocoapods

我在验证pod时遇到了错误。(pod lib lint)

https://i.stack.imgur.com/9QuWq.png

我的Podsec文件配置为:

Pod::Spec.new do |s|
s.name             = 'DrawPDF'
s.version          = '1.0'
s.summary          = 'Draw PDF below of iOS 11'

s.description      = <<-DESC
Draw PDF below of iOS 11
DESC

s.homepage         = 'https://github.com/vishalkalola1/DrawPDF.git'
s.license          = { :type => 'MIT', :file => 'LICENSE' }
s.author           = { 'vishal patel' => 'vishalkalola196@gmail.com' }
s.source           = { :git => 'https://github.com/vishalkalola1/DrawPDF.git', :commit=> "8b6aa147c56d2e1685d4ffb15ed6d689d67f4c4d" }

s.ios.deployment_target = '8.0'
s.source_files = 'DrawPDF/VTablePDFCreationSwift/VTablePDFCreation/VPDFTableCreation/*.{swift}'

end

1 个答案:

答案 0 :(得分:1)

  1. Git源应指定标记 - 在代码中添加标记。由于您可以看到1.0是 s.version 中指定的版本 1.0 所以推送标记1.0
  2. 说明应该比摘要更长,因此请添加更多内容。
  3. 如果您尚未将文件添加到目录,请执行此操作,并在 s.source_files podsec 中指定所有添加的文件>
  4. 如果您没有,则需要添加 LICENSE 文件。
  5. 修改

    如果您的文件中有任何类,则需要添加打开访问说明符,并且还必须将其添加到所有重写的方法中。 您可以添加公开 公开私有