最近我遇到了一個問題,它似乎無法解決。我曾經爲我的swift項目使用pod,並且運行良好。今天,重新使用它連接到Firebase,這似乎是不可能的。 要解決這個問題,首先,我從我的Mac中完全刪除cocoapods,然後重新下載最新版本。安裝cocoapods for firebase掛起並凍結
sudo gem install cocoapods
然後ignorer,以確保它完全下載我用這個命令
gem list --local | grep cocoapods
,其結果是
cocoapods (1.0.1)
cocoapods-core (1.0.1)
cocoapods-deintegrate (1.0.0)
cocoapods-downloader (1.0.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.0.0)
cocoapods-try (1.0.0)
然後我創建了一個新的Xcode項目,並把它稱爲「cocoapodsTesting」 。然後,我完成了Firebase網站中提到的所有步驟,直到我必須在我的項目中安裝Pod。 所以我去了我的項目目錄==>,寫
pod init
然後我打開POD文件並更改內容如下:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'cocoapodsTesting' do
pod ‘Firebase’
use_frameworks!
# Pods for cocoapodsTesting
target 'cocoapodsTestingTests' do
inherit! :search_paths
# Pods for testing
end
target 'cocoapodsTestingUITests' do
inherit! :search_paths
# Pods for testing
end
end
,然後我用命令:
pod install
那麼這行出現:
Setting up CocoaPods master repo
然後它永遠保持不變。於是我閉上了終端並重新打開它,併到同一個目錄中,並使用此命令
pod repo remove master
然後我得到這樣的:
[!] repo master does not exist
Usage:
$ pod repo remove NAME
Deletes the remote named `NAME` from the local spec-repos directory at
`~/.cocoapods/repos/.`
Options:
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
然後我去「〜/ .cocoapods /回購/「。有一個名爲master的目錄,裏面什麼也沒有。
沒有任何反應。
請不要刪除我的帖子,不要將它標記爲重複,我已經通過了所有其他問題,我不能讓它鍛鍊。請幫我做這個工作
嘗試使用'吊艙安裝--verbose' – Shubhank
下面是結果準備 設置的CocoaPods掌握回購 克隆規範回購'master'的是完成從'https:// github.com/CocoaPods/Specs.git'(分支'master') $/usr/bin/git clone https://github.com/CocoaPods/Specs.git master 克隆到'master '... –
你的網速是多少? – Shubhank