CocoaPods打包發(fā)布學(xué)習(xí)

  1. 登錄cocoapods #若網(wǎng)易郵箱收不到郵件,換其他家的郵箱試試
    $ pod trunk register orta@cocoapods.org 'Orta Therox' --description='macbook air'

  2. 查看登錄狀態(tài)
    $ pod trunk me

  3. 創(chuàng)建podspec
    // 對已有項(xiàng)目創(chuàng)建spec
    $ pod spec create YourProject
    // 利用pod創(chuàng)建lib庫
    $ pod lib create MyLibrary

  4. 驗(yàn)證本地podspec
    $ pod spec lint [NAME.podspec]

  5. 發(fā)布podspec到cocoapods
    $ pod trunk push [NAME.podspec]
    --allow-warnings #忽略警告

  6. 查看某個包的信息
    $ pod trunk info NAME

  7. 刪除podspec(pod v1.0.0.beta.1版本才開始支持)
    $ pod trunk delete NAME VERSION

  8. 添加團(tuán)隊(duì)開發(fā)成員
    $ pod trunk add-owner pod_name kyle@cocoapods.org

ext1. 創(chuàng)建私有倉庫
$ pod repo add REPO_NAME SOURCE_URL

ext2. 檢查倉庫是否可用
$ cd ~/.cocoapods/repos/REPO_NAME
$ pod repo lint .

ext3. 發(fā)布包到私有倉庫
$ pod repo push REPO_NAME SPEC_NAME.podspec

ext4. 移除私有倉庫
$ pod repo remove [name]

==== pod 指令 ===
$ pod --help
Usage:

$ pod COMMAND

  CocoaPods, the Cocoa library package manager.

Commands:

+ cache      Manipulate the CocoaPods cache
+ init       Generate a Podfile for the current directory.
+ install    Install project dependencies to Podfile.lock versions
+ ipc        Inter-process communication
+ lib        Develop pods
+ list       List pods
+ outdated   Show outdated project dependencies
+ package    Package a podspec into a static library.
+ plugins    Show available CocoaPods plugins
+ repo       Manage spec-repositories
+ search     Search for pods.
+ setup      Setup the CocoaPods environment
+ spec       Manage pod specs
+ trunk      Interact with the CocoaPods API (e.g. publishing new specs)
+ try        Try a Pod!
+ update     Update outdated project dependencies and create new Podfile.lock

Options:

--silent     Show nothing
--version    Show the version of the tool
--verbose    Show more debugging information
--no-ansi    Show output without ANSI codes
--help       Show help banner of specified command
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容