美文网首页
创建一个CocoaPods仓库

创建一个CocoaPods仓库

作者: 和谐共处 | 来源:发表于2019-05-20 18:31 被阅读0次

Step1 注册 CocoaPods

$ pod trunk register your_github_email 'you_user_name' --verbose
#查看注册信息
pod trunk

Step2 创建 .podspec

$ pod spec create your_libname.podspec

Step3 编辑 .podspec


#
#  Be sure to run `pod spec lint HQSegmentPageViewController.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see https://docs.cocoapods.org/specification.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|
  s.name     = 'your_libname'
  s.version  = '1.0.0'
  s.license  =  { :type => 'MIT', :file => 'LICENSE' }
  s.summary  = 'your_libname'
  s.homepage = 'https://github.com/your_name/'
  s.author   = 'your_name'
  s.source   = { :git => 'your_git_address', :tag => s.version }
  s.platform = :ios, '9.0'
  s.source_files  = 'your_libname/*.{h,m}' #根据自己的目录结构做修改
  s.requires_arc = true

end

验证.podsepc

# 验证.podsepc文件是否正确
$ pod lib lint 

Step4 给你的github仓库打tag

#创建标签
$ git tag -a 1.0.0 -m 'your_tag_message' 
#推送到远程
$ git push origin --tags

Step5 发布.podspec

pod trunk push your_libname.podspec

参考

https://github.com/TimOliver/TOCropViewController/blob/master/TOCropViewController.podspec
https://www.jianshu.com/p/d2d98298b1b8
https://www.jianshu.com/p/9a5ec24ff437

相关文章

  • 如何自己写一个iOS第三方库

    CocoaPods 私有仓库的创建(超详细) CocoaPods公有仓库的创建 如果私有库search不到,可以

  • iOS创建App流程

    1、创建对应名称的xcode工程 2、若已安装了cocoaPods 但未创建仓库则直接创建cocoaPods仓库,...

  • 创建私有 CocoaPods 仓库

    创建私有 CocoaPods 仓库

  • CocoaPods之公有仓库的创建

    目录 Cocoapods之安装及使用CocoaPods之公有仓库的创建 一、创建GitHub仓库二、注册Cocoa...

  • CocoaPods 私有仓库的创建教程

    CocoaPods 私有仓库的创建教程 创建私有pod首先需要一个容器,类似于 The CocoaPods Mas...

  • cocoapods创建私有仓库

    利用cocoapods来创建私有仓库步骤 1.创建一个管理私有仓库的容器 2.制作私有仓库 3.验证私有仓库并加入...

  • [iOS]如何进行组件化开发

    一、创建索引库 在git上创建一个仓库 将索引仓库添加至本地~/.cocoapods/repos目录打开终端输入:...

  • 创建cocoaPods仓库

    我们平时会开源一些库到github上,供自己和大家使用,为了使用更方便,大家可以把比较常用的或者比较不错的库支持下...

  • 创建CocoaPods仓库

    1.在github创建仓库 2.创建Pod账号 通过终端指令来操作: pod trunk register xxx...

  • pod 私有库

    如何创建私有 CocoaPods 仓库 制作 CocoaPods 依赖库 cocoapods本地的类库更新方法 使...

网友评论

      本文标题:创建一个CocoaPods仓库

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