1

我是 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

我在谷歌上搜索了一下,很多人都遇到了这个错误的问题,但是没有人说根据路径有问题。

我的 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

有人可以帮我解决这个问题吗?感谢大家,如果这个问题相当“菜鸟级别”,我很抱歉:)。

4

1 回答 1

0

我相信您正在尝试通过CocoaPods Specs将您的Count Down添加为公共 pod ?太棒了,方法如下。

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

  • 在本地克隆 CocoaPods/Specs。
  • 在一次提交中,将您的 Pod 的文件夹添加到主列表中,并按照创建 Pod 存储库部分中描述的格式添加 Spec。
  • 运行pod spec lint以检查错误。
  • 如果 linter 产生错误或警告,请修复它们并返回第 3 步。如果没有,请继续。
  • 向主Specs Repo提出拉取请求

但是随着CocoaPods 0.33的未来版本,您应该能够使用新pod trunk命令轻松完成此操作。

于 2014-05-20T09:37:32.870 回答