美文网首页
Pod 私有库

Pod 私有库

作者: lionnner | 来源:发表于2019-04-26 10:06 被阅读0次

前言

*终端执行
 pod repo list
repo master
  • 1建立自己的私有Spec.git

    假如以码云为例:https://gitee.com/mlionnner/LionnnerSpec.git
    
LionnnerSpec
  • 2将建立的私有Spec.git添加到本地

 pod repo add NAME URL [BRANCH]
 Eg: pod repo add MSpec https://gitee.com/mlionnner/LionnnerSpec.git

再次执行

 pod repo list
repolist.png
  • 3新建另外的一个仓库并上传自己的代码

 例如: https://gitee.com/mlionnner/MLView.git
MLView.git
 假如我想上传 MLView文件内的所有代码文件
MLView
  • 4创建 podspec文件

 进入到本地仓库的根目录
cd /Users/lvjialin/lionnner/MLView 
fit1
 pod spec create [NAME|https://github.com/USER/REPO]
Eg:  pod spec create MLView
生成了如下的文件
spec create
  • 5编辑podspec文件

  spec.homepage     = "https://gitee.com/mlionnner/MLView"
  spec.license      = "MIT"
  spec.platform     = :ios, "8.0"
  spec.source       = { :git => "https://gitee.com/mlionnner/MLView.git", :tag => "#{spec.version}" }
  spec.source_files  = "MLView/**/MLView/*.{h,m}"
#spec.exclude_files = "Classes/Exclude"

podspecinit

修改后


podspecupdate
  • 6上传

将MLView的仓库打上tag 0.0.1

终端执行
 pod lib lint
 pod repo push MSpec MLView.podspec --allow-warnings

相关文章

网友评论

      本文标题:Pod 私有库

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