iOS Cocoapods发布笔记

前提

项目已提交到远程仓库,比如 github.


发布

进入项目目录:

1.创建以 项目名 为前缀的.podspec 文件
pod spec create JHFrameLayout

2.修改JHFrameLayout.podspec 文件内容
在创建好的模板文件上进行修改:
更多参数请求参见模板。

Pod::Spec.new do |s|
  s.name         = 'JHFrameLayout'
  s.summary      = 'A simple methods for frame layout.'
  s.version      = '1.0.1'
  s.license      = { :type => 'MIT'}
  s.authors      = { 'Haocold' => 'xjh093@126.com' }
  s.homepage     = 'https://github.com/xjh093/JHFrameLayout'
  s.source       = { :git => 'https://github.com/xjh093/JHFrameLayout.git', :tag => s.version}
  s.source_files = 'JHFrameLayout/*.{h,m}'
  s.requires_arc = true
  s.framework    = 'UIKit'
  s.ios.deployment_target = '6.0'
 #s.frameworks   = 'UIKit','Foundation'
 #s.dependency "YYModel", "~> 1.0.4"
 #s.dependency "AFNetworking"
end

3.添加 git add .

3.提交 git commit -m "添加 .podspec 文件"

4.推送 git push origin

5.打tag git tag 1.0.0

6.推送tag git push --tags

7.推送JHFrameLayout.podspec 文件 pod trunk push --allow-warnings
执行此步,前提是已经注册了trunk 账号
注册:pod trunk register 邮箱地址 'Your Name'
执行此步前,省略了验证 pod spec lint JHFrameLayout.podspec

8.成功

   Congrats

   JHFrameLayout (1.0.0) successfully published
   March 9th, 00:01
   https://cocoapods.org/pods/JHFrameLayout
   Tell your friends!

参考:
如何发布自己的开源框架到CocoaPods

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

豪冷啊

你的鼓励是对我的认可!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值