如何配置podsec文件swift项目

问题描述 投票:0回答:1

我在pods验证过程中得到了错误。(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' => '[email protected]' }
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
ios swift cocoapods
1个回答
1
投票
  1. Git源应指定标记 - 在代码中添加标记。因为你可以看到1.0是s.version中指定的版本是1.0所以推送标签1.0。
  2. 描述应该比摘要更长,所以添加更多内容。
  3. 如果您尚未将文件添加到classes目录,请执行此操作并在s.source_files下的podsec中指定所有添加的文件
  4. 如果还没有,则需要添加LICENSE文件。

编辑:

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

© www.soinside.com 2019 - 2024. All rights reserved.