cocoapods中source_files的问题

时间:2014-05-19 13:26:02

标签: ios cocoapods podspec

我是iOS编程和cocoaPods的新手,我遇到了" pod lib lint" (实际上,我有很多问题,因为我还在学习:P)。 问题是我将podspec文件放在两个不同的文件中,位于不同的文件夹中。在第一个中,当我执行" pod lib lint"它说一切都好,但在第二个(这是第一个的副本,但在cocoaPods项目中,准备做拉动请求)抛出这个错误:

- ERROR | The `source_files` pattern did not match any file.
- WARN  | Unable to find a license file

我用Google搜索了一下,很多人都遇到了这个错误的问题,但没有人根据路径提出任何问题。

"有趣"我的podspec文件的一部分是

Pod::Spec.new do |s|
  s.name             = "countdown"
  s.version          = "0.2.1"
  s.summary          = "Countdown is a class to implement a timer used to do a countdown"
  s.description      = <<-DESC
                       Countdown was created to provide a simple and fast way to create our own countdown in apps that need this feature. This countdown counts in seconds, but when the remaining time is less than one minute it counts in tenths.

As you will see, right now is a very simple class, with just some methods to use, but we will upload more methods as soon as somebody need it.

Please, if you want to help us to improve Countdown, send us your opinion to info@omitsis.com or just comment here ;-)
                       DESC
  s.homepage         = "http://www.omitsis.com/"
  s.license          = 'MIT'
  s.author           = { "Omitsis Consilting S.L." => "info@omitsis.com" }
  s.source           = { :git => "https://github.com/omitsis/countdown-ios.git", :tag => "v0.2.1" }
  s.social_media_url = 'https://twitter.com/omitsis'

  s.requires_arc = true

  s.source_files = 'Classes/ios/*.{h,m}'

  s.ios.exclude_files = 'Classes/osx'
  s.frameworks  = 'XCTest', 'Foundation'
end

有人可以帮我解决这个问题吗? 感谢大家和我很抱歉,如果这个问题非常好,那就是#43; noob level&#34; :)

1 个答案:

答案 0 :(得分:0)

我相信您正尝试通过 CocoaPods Specs 倒计时添加为公共广告连播?太棒了,这是怎么回事。

目前这是一个手动过程(来自docs

  • 在本地克隆CocoaPods / Specs。
  • 在一次提交中,将Pod的文件夹添加到主列表,以及创建Pod Repo部分中描述的格式的Spec。
  • 运行pod spec lint以检查错误。
  • 如果linter产生错误或警告,请修复它们并返回步骤3.如果没有,请继续。
  • pull request设为主Specs Repo

但是,对于 CocoaPods 0.33 的未来版本,您应该可以使用新的pod trunk命令轻松完成此任务。