我是iOS編程和cocoaPods世界的新手,我有一個「pod lib lint」的問題(其實我有很多問題,因爲我還在學習:P) 。 問題是我的podspec文件位於不同文件夾中的兩個不同文件中。在第一個中,當我執行「pod lib lint」時,它說一切正常,但在第二個中(這是第一個但是在cocoaPods項目中,準備好執行pull請求的副本)會引發此錯誤:cocoapods中source_files的問題
- 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 [email protected] or just comment here ;-)
DESC
s.homepage = "http://www.omitsis.com/"
s.license = 'MIT'
s.author = { "Omitsis Consilting S.L." => "[email protected]" }
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
有人可以幫我解決這個問題,好嗎? 感謝大家,我很抱歉,如果這個問題是相當「noob級」:)。
最好將整個pod-spec文件添加到此問題。 – ajmccall
當然!我只是編輯原文:D。謝謝你們的快速響應! –
兩件事。我相信你應該使用'pod spec lint'來測試你的podspec。我試着對你的代碼進行驗證。請參閱下面的答案。其次,不要以非正式的方式編寫你的SO問題。閱讀起來很麻煩,給這個問題增加了噪音,可能會被可以幫助的人忽略。這也有助於使非英語讀者很難閱讀。要正式,精確和簡潔。 [StackoverFlow Hates Fun](http://blog.stackoverflow.com/2010/01/stack-overflow-where-we-hate-fun/) – ajmccall