在 cocoapods 版本 1.0.0.rc.2 中获取“0 pods 被发现”

Get "0 pods were found" in cocoapods version 1.0.0.rc.2

我通过 运行ning 这个命令

安装了 cocoapods
sudo gem install cocoapods --pre

但是当我运行命令

pod list

我得到“0 pods 被发现” 请帮我解决这个问题。

您首先需要安装 CocoaPods。 CocoaPods 在 Ruby

上运行

幸运的是,Mac OS X(自 OS X 10.7 Lion 起)的所有最新版本都已安装 Ruby。所以你需要做的就是更新 RubyGems

为此,打开终端并输入以下命令:

sudo gem update --system

接下来,您需要安装 CocoaPods。为此,请在终端中键入此命令:

sudo gem install cocoapods

最后,在Terminal中输入这个命令完成Cocoa的设置Pods:pod setup

打开终端并使用 cd 命令导航到包含您的项目的目录:

cd ~/Path/To/Folder/Containing/yourProject

接下来输入这个命令:pod init

这将为您的项目创建一个默认的 Podfile。 Podfile 是您定义项目所依赖的依赖项的地方。键入此命令以使用 Xcode 打开 Podfile 进行编辑:

open -a Xcode Podfile

platform :ios, '7.0' pod 'apptentive-ios'//编写你想在cocopods中使用的框架

保存并关闭 pod 文件。您现在需要告诉 CocoaPods 为您的项目“安装”依赖项。为此,请在终端中输入以下命令(确保您仍在包含 ShowTracker 项目和 Podfile 的目录中):

 pod install

非常重要!从现在开始,正如命令行警告中提到的,您必须始终打开工作区 (ShowTracker.xcworkspace) 而不是项目!现在您需要为该项目添加两个依赖项。您现在可以在工作区的 Pods 目标中找到它,而不是从命令行打开 PodFile。

您是否从终端收到安装成功的消息?

Fetching: cocoapods-core-1.0.0.rc.2.gem (100%) Successfully installed cocoapods-core-1.0.0.rc.2 Fetching: claide-1.0.0.rc.1.gem (100%) Successfully installed claide-1.0.0.rc.1 Fetching: cocoapods-deintegrate-1.0.0.rc.2.gem (100%) Successfully installed cocoapods-deintegrate-1.0.0.rc.2 Fetching: cocoapods-downloader-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-downloader-1.0.0.rc.1 Fetching: cocoapods-plugins-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-plugins-1.0.0.rc.1 Fetching: cocoapods-search-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-search-1.0.0.rc.1 Fetching: cocoapods-stats-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-stats-1.0.0.rc.1 Fetching: cocoapods-trunk-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-trunk-1.0.0.rc.1 Fetching: cocoapods-try-1.0.0.rc.1.gem (100%) Successfully installed cocoapods-try-1.0.0.rc.1 Fetching: molinillo-0.4.5.gem (100%) Successfully installed molinillo-0.4.5 Fetching: xcodeproj-1.0.0.rc.2.gem (100%) Successfully installed xcodeproj-1.0.0.rc.2 Fetching: fourflusher-0.3.0.gem (100%) Successfully installed fourflusher-0.3.0 Fetching: cocoapods-1.0.0.rc.2.gem (100%) Successfully installed cocoapods-1.0.0.rc.2 Parsing documentation for cocoapods-core-1.0.0.rc.2 Installing ri documentation for cocoapods-core-1.0.0.rc.2 Parsing documentation for claide-1.0.0.rc.1 Installing ri documentation for claide-1.0.0.rc.1 Parsing documentation for cocoapods-deintegrate-1.0.0.rc.2 Installing ri documentation for cocoapods-deintegrate-1.0.0.rc.2 Parsing documentation for cocoapods-downloader-1.0.0.rc.1 Installing ri documentation for cocoapods-downloader-1.0.0.rc.1 Parsing documentation for cocoapods-plugins-1.0.0.rc.1 Installing ri documentation for cocoapods-plugins-1.0.0.rc.1 Parsing documentation for cocoapods-search-1.0.0.rc.1 Installing ri documentation for cocoapods-search-1.0.0.rc.1 Parsing documentation for cocoapods-stats-1.0.0.rc.1 Installing ri documentation for cocoapods-stats-1.0.0.rc.1 Parsing documentation for cocoapods-trunk-1.0.0.rc.1 Installing ri documentation for cocoapods-trunk-1.0.0.rc.1 Parsing documentation for cocoapods-try-1.0.0.rc.1 Installing ri documentation for cocoapods-try-1.0.0.rc.1 Parsing documentation for molinillo-0.4.5 Installing ri documentation for molinillo-0.4.5 Parsing documentation for xcodeproj-1.0.0.rc.2 Installing ri documentation for xcodeproj-1.0.0.rc.2 Parsing documentation for fourflusher-0.3.0 Installing ri documentation for fourflusher-0.3.0 Parsing documentation for cocoapods-1.0.0.rc.2 Installing ri documentation for cocoapods-1.0.0.rc.2 13 gems installed