建立自己的Cocoapods

1.创建自己的name.spec文件

$ pod spec create NAME

 2.修改自动生成的spec文件

Pod::Spec.new do |s|
s.name         = 'XMTopScrollView'
s.version      = '0.0.1'
s.license      = 'MIT'
s.summary      = 'top scroll category class.'
s.description  = %{XMTopScrollView is a top scroll category class.}
s.homepage     = 'https://github.com/rgshio/XMTopScrollView'
s.author       = { 'rgshio' => 'xzy0819@qq.com' }

s.source       = { :git => 'https://github.com/rgshio/XMTopScrollView.git', :tag => "v#{s.version}" }

s.source_files = 'Classes/XMTopScrollView/*'
s.resource = 'Classes/XMTopScrollView/XMTopCell.xib'
s.ios.frameworks = 'Foundation', 'UIKit'
s.ios.deployment_target = '7.0' # minimum SDK with autolayout

s.requires_arc = true

end

 3.添加tag

$ git tag 0.0.1
$ git push --tags

 4.验证spec文件

$ pod spec lint

5.提交spec文件

$ pod trunk push NAME.podspec

 6.注册(You need to register a session first)

$ pod trunk register name@163.com 'rgshio' --description='macbook air'
PS1:name@163.com,验证邮箱,填写自己的
PS2:rgshio,名称

 

posted on 2015-12-21 15:21  rgshio  阅读(328)  评论(0编辑  收藏  举报

导航