2
我有一個Objective-C庫,我正在嘗試將podspec更新爲cocoapods。當我這樣做「莢規範皮棉」命令,我收到以下錯誤:Cintapods的棉絨失敗
[!] The spec did not pass validation, due to 1 error.
[!] The validator for Swift projects uses Swift 3.0 by default, if you are using a different version of swift you can use a `.swift-version` file to set the version for your Pod. For example to use Swift 2.3, run:
`echo "2.3" > .swift-version`.
這裏是我的podspec文件:
Pod::Spec.new do |s|
s.name = "OSwitch"
s.version = "0.2.0"
s.license = { :type => "MIT", :file => "LICENSE" }
s.summary = "OSwitch is a customisable switch control writen in Objective C."
s.homepage = 'https://github.com/OyaSaid/OSwitch'
s.source = { :git => 'https://github.com/OyaSaid/OSwitch.git', :tag => s.version.to_s }
s.platform = :ios, "7.0"
s.ios.frameworks = ['UIKit', 'Foundation']
s.source_files = 'OSwitch/Classes/**/*.{h,m}'
s.requires_arc = true
end
時,我有一個客觀的C庫爲什麼這個節目。我該如何解決這個問題?
感謝
謝謝!有效。 – Oya
也可以將它指定爲參數,比如'pod spec lint --swift-version = 2.3' –
嘿,我在終端中使用了這個命令,但沒用。沒有快速的版本文件被創建。你可以解釋或編輯你的答案,並附上一些截圖。 –