【发布时间】:2014-05-19 13:26:01
【问题描述】:
我是 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
有人可以帮我解决这个问题吗? 谢谢大家,如果这个问题很“菜鸟级别”,我很抱歉:)。
【问题讨论】:
-
最好将整个 pod-spec 文件添加到这个问题中。
-
当然!我只是编辑原始帖子:D。感谢您的快速回答!
-
两件事。我相信您应该使用“pod spec lint”来测试您的 podspec。我试过你的代码并验证得很好。请看下面我的回答。其次,不要以非正式的方式写你的 SO 问题。阅读起来很麻烦,给问题增加了噪音,并且可能会被可以提供帮助的人跳过。它还有助于使非英语使用者难以阅读。正式、准确和简洁。 StackoverFlow Hates Fun
-
感谢您的帮助和关于非正式语言的建议。我真的很感激。
-
没问题。祝你好运。