我在項目中第一次使用pod。我創建了一個新的項目,並遵循以下流程:通過命令行安裝pod時的問題
從github上下載主站,終端要求我做手工
觸發:莢初始化方法。此命令生成的Podfile在我的Xcode項目文件夾
然後我在POD文件添加了一行:
pod 'Alamofire', '2.0.2'
4。然後我解僱pod install
指揮和我收到以下錯誤在終端窗口:
Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
我下面這個教程: https://www.raywenderlich.com/97014/use-cocoapods-with-swift 請對這一問題提出解決辦法。 以下是我莢文件:
platform :ios, "8.0"
use_frameworks!
target 'PodsTest' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for PodsTest
pod 'Alamofire', '2.0.2'
target 'PodsTestTests' do
inherit! :search_paths
# Pods for testing
end
target 'PodsTestUITests' do
inherit! :search_paths
# Pods for testing
end
end
step-4應該是pod安裝命令 –
是的,那是錯誤的,我編輯我的問題 –
你如何在Pod文件中提到Alamofire的pod命令?你能告訴我嗎? @ V-Xtreme –