美文网首页
CocoaPods私有库 podspec

CocoaPods私有库 podspec

作者: hui8685291 | 来源:发表于2022-03-22 16:38 被阅读0次

新建一个本地文件夹
cd 到本地文件夹
pod lib create XXX
cd Example 执行 pod update --no-repo-update

在进行以下步骤之前得在github 或者其他的远程平台 创建代码仓库
接下来:
git remote add origin https://github.com//xxx.git
git status
git add .
git commit -a -m "xxxxx"
如果之前仓库里面有内容 可以 执行拉取 git pull origin master --allow-unrelated-histories
git push origin master 推送到远程平台
给本次提交打上标签
git tag
git tag -a '0.1.0' -m 'xxxxx'
git push origin 0.1.0 (git push --tags)

以上是把本地代码提交到远程仓库的方式

接下来本地索引库提交到远程索引库
首先在远程平台创建一个远程索引库(注:带上初始文件,比如 README.md)以防后续找不到git所属的分支会出现 git:(unknow)
再本地添加索引库与远程索引库关联
pod repo 查看本地库
pod repo add xxx git@github.com:xxx/xxx.git 本地添加关联远程的索引库
pod repo push xxx xxx.podspec --allow-warnings 将本地的podspec 文件添加到本地同时推送到远程索引库内;

其他参考:https://www.jianshu.com/p/047e0948f891?appinstall=0

相关文章

网友评论

      本文标题:CocoaPods私有库 podspec

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