安装用于 firebase 的 cocoapods 挂起并冻结
installing cocoapods for firebase hangs and freeze
最近遇到了一个好像无法解决的问题。我曾经将 pods 用于我的 swift 项目并且效果很好。今天,重新尝试使用它来连接到 firebase,这似乎是不可能的。
为了解决这个问题,首先,我从 mac 中完全删除了 cocoapods,然后重新下载最新版本。
sudo gem install cocoapods
然后忽略以确保它已完全下载 我使用了这个命令
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 网站中提到的所有步骤,直到我必须在我的项目上安装 pods 的步骤。
所以我去了我的项目目录 ==> 并写了
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/repos/。”有一个名为 master 的目录,里面什么都没有。
什么也没发生。
请不要删除我的post也不要将其标记为重复,我已经完成了所有其他问题,但我做不到它锻炼。请帮我让它工作
pod install
,然后你可以看到这一行出现:
Setting up CocoaPods master repo
它可能会在那里停留很长时间。
你可以cd ~/.cocoapods
,然后du -sh *
每隔几秒,如果你怀疑works.You是否会看到尺寸变大。
$ du -sh *
9.7M repos
$ du -sh *
14M repos
$ du -sh *
20M repos
等待下载completed.Then正常
对我来说,
时完成
$ du -sh *
748M repos
最近遇到了一个好像无法解决的问题。我曾经将 pods 用于我的 swift 项目并且效果很好。今天,重新尝试使用它来连接到 firebase,这似乎是不可能的。 为了解决这个问题,首先,我从 mac 中完全删除了 cocoapods,然后重新下载最新版本。
sudo gem install cocoapods
然后忽略以确保它已完全下载 我使用了这个命令
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 网站中提到的所有步骤,直到我必须在我的项目上安装 pods 的步骤。 所以我去了我的项目目录 ==> 并写了
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/repos/。”有一个名为 master 的目录,里面什么都没有。
什么也没发生。
请不要删除我的post也不要将其标记为重复,我已经完成了所有其他问题,但我做不到它锻炼。请帮我让它工作
pod install
,然后你可以看到这一行出现:Setting up CocoaPods master repo
它可能会在那里停留很长时间。
你可以
cd ~/.cocoapods
,然后du -sh *
每隔几秒,如果你怀疑works.You是否会看到尺寸变大。$ du -sh * 9.7M repos $ du -sh * 14M repos $ du -sh * 20M repos
等待下载completed.Then正常
对我来说,
时完成 $ du -sh *
748M repos