根據Alamofire官方、PKHUD官方pod file應該是
pod 'Alamofire', '~> 4.7'
pod 'PKHUD', '~> 5.0'
結果pod install會遇到如下錯誤
[!] CocoaPods could not find compatible versions for pod "Alamofire":
In Podfile:
Alamofire (~> 4.7)
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.7)`.
實際上用pod search也的確是找不到Alamofire 4.7版、PKHUD 5.0版,解決方式參考CocoaPods Guides - The Podfile的From a podspec in the root of a library repo.
修正後的pod file為
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.7.0'
pod 'PKHUD', :git => 'https://github.com/pkluz/PKHUD.git', :branch => 'release/swift4'
再pod install成功執行如下
沒有留言:
張貼留言