美文网首页
共有pod制作

共有pod制作

作者: 盖小聂 | 来源:发表于2018-10-08 11:44 被阅读0次

    1、github创建repository

    填写Repository name(PodName),description,readme file,针对的语言,以及设置开源证书(MIT License)

    2、clone远程github repository至本地电脑,往本地仓库中添加代码

    3、创建podspec文件

    创建podspec文件的命令:pod spec create PodName

    4、编辑podpsec文件

    5、打tag

    查看本地tag:git tag
    删除本地tag:git tag -d “TagName”
    删除远程tag:git tag push origin :refs/tags/TagName

    6、验证podspec文件

    验证podspec文件的命令:pod spec lint PodName.podpsec

    注意:在验证podspec文件的过程中如果遇到报错,且本地执行工程没有报错,报错的问题在本地工程和远程仓库中明显不存在,尝试使用如下命令清除pod cache
    pod cache clean PodName

    7、发布public pod

    发布public pod的命令:pod trunk push PodName

    若没有trunk账号,首先需要注册trunk账号。
    a、查看自己是否注册trunk的命令:pod trunk me
    b、注册trunk的命令:pod trunk register YourEmail “YourName” —verbose
    for example: pod trunk register lhdaily@163.con “JesseRom”

    8、验证public pod是否发布成功

    验证方法:pod search PodName

    如果搜索不到尝试执行如下命令
    rm ~/Libary/Caches/Cocoapods/search_index.json
    pod setup
    重新执行pod search 命令

    参考链接:
    http://www.cocoachina.com/ios/20180308/22509.html

    相关文章

      网友评论

          本文标题:共有pod制作

          本文链接:https://www.haomeiwen.com/subject/msidaftx.html