如何使项目能够使用 CocoaPods

  • 时间:
  • 浏览:0

转到项目目录的根目录并执行 pod init - >这将为您的项目加上另另一个 基本的Podfile。

加上CocoaPods依赖到管理项目中的步骤:

从此,您应该使用.xcworkspace文件打开项目而都在.xcproject打开项目。

From here on, you should use .xcworkspace file instead of .xcproject.

Steps to add CocoaPods to manage dependencies in your project:

运行pod install,它将获取您加上的所有内外部依赖项,并将其与项目的.xcworkspace文件相关联。由于您这样此文件,则将为您生成此.xcworkspace文件。

Go to the root of your project directory and execute pod init -> This will add a base Podfile to your project.

Run pod install which will fetch all the external dependencies mentioned by you, and associate it with a .xcworkspace file of your project. This .xcworkspace file will be generated for you if you already do not have one.

sudo gem install CocoaPods -> This installs CocoaPods as a piece of software on your machine.

以上。

How about ??What to do??

Add the external dependencies that you have to this Podfile by editing it.

sudo gem install CocoaPods 执行它都要将一份CocoaPods软件安放到 您的计算机上。

通过编辑它来加上您对此Podfile的内外部依赖项。