我們的podspec 要push 到 cocoapods 上需要先注冊帳號(hào),用以下指令
官方文檔
& 注冊你的郵箱
參1 你的郵箱: 一會(huì)要驗(yàn)證的
參2 '你的名稱': 注意需要 '' , 就是你的名稱, 沒什么好說的
參3 --description: 描述,方便以后識(shí)別
參4 --verbose: 表示打印詳細(xì)信息
pod trunk register 你的郵箱 '你的名稱' --description=`Personal Laptop` --verbose
之后回車后, 會(huì)看到圖1這些信息, 然后登陸你的郵箱, 可能在垃圾箱里會(huì)看到郵件, 然后它會(huì)給你一個(gè)地址, 你打開地址, 最后看到圖二效果

圖1
看到圖二, 你可以回到終端Push 你的Lib 了.

圖2
& 查看你的信息/ 發(fā)布的Pods等, 這個(gè)指令還是比較有用的
pod trunk me
& 查看pods 的信息 , 看到version/Owners等
pod trunk info podName
& 刪除 pod 中的版本
pod trunk delete podName VERSION
- 最后講一點(diǎn)注意的,如果你的項(xiàng)目允許別人上傳的話,你需要添加他/她為owner
pod trunk add-owner PODName OWNER-EMAIL(他/她的郵箱,當(dāng)然是已經(jīng)在trunk注冊過的)
- 如果報(bào)session 失效
* Authentication token is invalid or unverified. Either verify it with the email that was sent or register a new session.
請run: pod trunk register yourEmail@example.com
之后email 會(huì)收到一條鏈接, 點(diǎn)擊就可以驗(yàn)證了