CocoaPods-更新官方pod库版本

  1. 修改podspec文件,更新好对应的s.version版本号。
  2. 将库文件上传到对应的代码仓库,打好tag。
  3. 进入项目目录,清缓存,校验podspec文件
1
2
3
4
5
6
7
8
# 清除 pod 缓存
pod cache clean --all

# 校验
pod lib lint XXXXX.podspec

# 提交到官方索引仓库
pod trunk push XXXXX.podspec
  1. 如果提示You need to register a session first.
1
2
3
4
5
// 报错
[!] You need to register a session first.

// 重新注册一下,然后CocoaPods会发送一封邮件到你的邮箱,按照提示打开一个连接激活就ok拉,最后再重复前面步骤,提交到CocoaPods官方仓库
pod trunk register 邮箱 '名字' --description='description'
  1. 发布成功后执行pod repo update更新本地索引库。
  2. 执行pod search XXXX,看看是否已经是最新版本。
  3. 撤回版本
1
2
# 撤回 XXXXX 库的 1.2.2 版本
pod trunk delete XXXXX(pod库名字) 1.2.2

附录:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pod tunk session # 操作相关命令
Usage:

$ pod trunk COMMAND

Interact with the CocoaPods API (e.g. publishing new specs)

Commands:

+ add-owner Add an owner to a pod
+ delete Deletes a version of a pod.
+ deprecate Deprecates a pod.
+ info Returns information about a Pod.
+ me Display information about your sessions
+ push Publish a podspec
+ register Manage sessions
+ remove-owner Remove an owner from a pod

Options:

--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command

CocoaPods-更新官方pod库版本
https://dnacore.github.io/post/e34942d8-7f15-4ca6-bd2e-90f323bada1d.html
作者
DNACore
发布于
2019年8月29日
更新于
2023年7月12日
许可协议