已安装cocoapods后在项目中使用

一 、cocoapods的步骤

1.打开终端  cd 项目地址

2.在项目中创建  pod init

3.查看新建的pod文件 ls

4.pod install —no-repo-update

5.podfile文件内pod‘第三方名’

6.关闭工程pod install —no-repo-update

pod install,如果之前没有安装过,则安装的是限制的最新版本;如果安装过,则是之前安装过的版本。

pod update,安装的是限制的最新版本。

二、终端的复制

Last login: Tue Apr 17 11:41:42 on ttys000

mcdeMacBook-Pro:~ mc$ cd /Users/mc/Desktop/fuxiday2

mcdeMacBook-Pro:fuxiday2 mc$ pod init

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:129:in `verify_minimum_git_version!':[!]You need at least git version 1.8.5 to use CocoaPods(Pod::Informative)

from /usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:49:in `run'

from /usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/bin/pod:55:in `'

from /usr/local/bin/pod:22:in `load'

from /usr/local/bin/pod:22:in `'

mcdeMacBook-Pro:fuxiday2 mc$ sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer

Password:

mcdeMacBook-Pro:fuxiday2 mc$ pod init

mcdeMacBook-Pro:fuxiday2 mc$ ls

Podfile fuxiday2 fuxiday2.xcodeproj

mcdeMacBook-Pro:fuxiday2 mc$ pod install --no-repo-update

Analyzing dependencies

Downloading dependencies

Generating Pods project

Integrating client project

[!]Please close any current Xcode sessions and use `fuxiday2.xcworkspace` for this project from now on.

Sending stats

Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.

[!]The Podfile does not contain any dependencies.

[!]Automatically assigning platform ios with version 10.3 on target fuxiday2 because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

mcdeMacBook-Pro:fuxiday2 mc$ pod install --no-repo-update

Analyzing dependencies

Downloading dependencies

Installing AFNetworking(3.1.0)

Installing JCore(1.1.3)

Installing JPush(3.0.5)

Generating Pods project

Integrating client project

Sending stats

Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.

[!]Automatically assigning platform ios with version 10.3 on target fuxiday2 because no platform was specified. Please specify a platfo

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容