2014-05-19 34 views
1

我是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級」:)。

+0

最好將整個pod-spec文件添加到此問題。 – ajmccall

+0

當然!我只是編輯原文:D。謝謝你們的快速響應! –

+0

兩件事。我相信你應該使用'pod spec lint'來測試你的podspec。我試着對你的代碼進行驗證。請參閱下面的答案。其次,不要以非正式的方式編寫你的SO問題。閱讀起來很麻煩,給這個問題增加了噪音,可能會被可以幫助的人忽略。這也有助於使非英語讀者很難閱讀。要正式,精確和簡潔。 [StackoverFlow Hates Fun](http://blog.stackoverflow.com/2010/01/stack-overflow-where-we-hate-fun/) – ajmccall

回答

0

我相信你嘗試添加您的倒計時如通過的CocoaPods規格公共莢?真棒,這是如何。

它是目前的手動過程來做到這一點(從​​)

  • 克隆的CocoaPods /規格本地。
  • 在一次提交中,將Pod的文件夾添加到主列表以及創建Pod回購部分中描述的格式的Spec。
  • 運行pod spec lint來檢查錯誤。
  • 如果棉絨發出錯誤或警告,請修復它們並返回步驟3.如果不是,請繼續。
  • 將您的pull request設爲主Specs Repo

但隨着未來的CocoaPods 0.33版本中,您應該能夠與新的pod trunk命令這樣做容易得多。

+0

謝謝!我最後做了podspec沒有錯誤,並提出了請求! –