pods 私有库

2020-03-02  本文已影响0人  Janek_m

pod repo add JKReverse(项目名) https://github.com/shuyujin/JKReverse.git(项目git)

然后 触发上面命令展示出

在里面添加你的代码文件仓库名.podspec 描述文件、还有.swift-version

JKReverse(项目名)

pod spec create JKReverse(项目名)

echo "3.0" > .swift-version (swift 才用)

JKPrevent.podspec 修改文件 -- 码云

Pod::Spec.new do |s|
  s.name         = "MyAdditions" # 项目名称
  s.version      = "0.0.1"        # 版本号 与 你仓库的 标签号 对应
  s.license      = "MIT"          # 开源证书
  s.summary      = "私人pod代码" # 项目简介

  s.homepage     = "https://git.oschina.net/baiyingqiu/MyAdditions" # 仓库的主页
  s.source       = { :git => "https://git.oschina.net/baiyingqiu/MyAdditions.git", :tag => "#{s.version}" }#你的仓库地址,不能用SSH地址
  s.source_files = "MyAdditions/*.{h,m}" # 你代码的位置, BYPhoneNumTF/*.{h,m} 表示 BYPhoneNumTF 文件夹下所有的.h和.m文件
  s.requires_arc = true # 是否启用ARC
  s.platform     = :ios, "7.0" #平台及支持的最低版本
  # s.frameworks   = "UIKit", "Foundation" #支持的框架
  # s.dependency   = "AFNetworking" # 依赖库
  
  # User
  s.author             = { "BY" => "qiubaiyingios@163.com" } # 作者信息
  s.social_media_url   = "http://qiubaiying.github.io" # 个人主页

end
(JKPrevent.podspec)
pod lib lint  -- 验证 校验本地podspec文件
pod spec lint --验证 校验本地与远程podspec文件

一般出现错误警告,需要添加 --private 或者 --allow-warnings,就可以通过验证
pod lib lint --allow-warnings
这个是GitHub~去掉 成功结果

提交代码--然后如下

将描述文件推送到版本库

将项目打上标签推到远程仓库,`标签号` 和 `版本号对应` 都是0.0.1

最后将我们的代码仓库的描述信息,push 到我们的版本仓库中

 pod repo push MyRepo(项目名) MyAdditions.podspec(项目.**) --allow-warnings

完成之后

之后就是完成成功!!!!!

上一篇 下一篇

猜你喜欢

热点阅读