pod spec create xxxx
# 简介
Pod::Spec.new do |spec|
# 项目名
spec.name = "xxx"
# 版本号
spec.version = "0.0.1"
# 介绍
spec.summary = "A short description of xxx."
# 简介
spec.description = <<-DESC
这是一个例子
DESC
# 主页
spec.homepage = "http://EXAMPLE/xxx"
# 开源协议
spec.license = { :type => "MIT", :file => "FILE_LICENSE" }
# 开发者
spec.author = { "xxx" => "xxx@qq.com" }
# 支持的平台和版本
spec.platform = :ios, "9.0"
# 项目地址,以及对应的tag,版本号必须和项目中的tag保持一致
spec.source = { :git => "http://EXAMPLE/xxx.git", :tag => "#{spec.version}" }
# 需要的文件
spec.source_files = "Classes", "Classes/**/*.{h,m}"
# 列表中要踢出的文件
spec.exclude_files = "Classes/Exclude"
end
git add .
git commit -m "xxx"
git push
git tag -a xxx -m "xxx"
git push origin --tags
pod trunk me
# 如果注册成功后会显示, 名字,邮箱,注册时间等信息。如果没有注册,进行注册
pod trunk register xxx.@qq.com "name"
# 成功后,会收到邮件,点击验证
pod trunk push xxx.podspec --allow-warnings --verbose
# 成功后会看到
原文:https://www.cnblogs.com/jisa/p/14892902.html