一询枚、前往GitHub創(chuàng)建自己的項(xiàng)目
417D9FEE-8FEF-4DDC-B2A5-C138250D22FE.png
二立磁、clone到本地
git clone https://github.com/UniverseJun/XXXXXXX.git
三殷费、終端進(jìn)入目錄創(chuàng)建podspec文件
pod spec create ZJAlertView
四漏麦、打開(kāi)podspec文件(MacDown含衔、sublime等)
Pod::Spec.new do |s|
s.name = "ZJAlertView"
s.version = "0.0.1"
s.summary = "A custom subassembly."
s.description = <<-DESC
A custom subassembly A custom subassembly A custom subassembly
DESC
s.homepage = "https://github.com/UniverseJun/ZJAlertView"
s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "姓名" => "郵箱" }
s.platform = :ios
s.source = { :git => "https://github.com/UniverseJun/ZJAlertView.git", :tag => "0.0.1" }
s.source_files = "Classes", "ZJAlertView/**/*.{h,m}"
s.exclude_files = "Classes/Exclude"
s.public_header_files = "ZJAlertView/**/*.h"
s.requires_arc = true
end
五职员、為Pod添加版本號(hào)
set the new version to 0.0.1
set the new tag to 0.0.1
六拒贱、驗(yàn)證
pod lib lint
pod lib lint ZJAlertView.podspec --no-clean 在有提示使用 --no-clean的情況下使用
驗(yàn)證成功提醒
-> ZJAlertView (0.0.1)
ZJAlertView passed validation.
七瘾境、提交到github倉(cāng)庫(kù)
git add -A && git commit -m "提交注釋"
git tag '0.0.1'
git push --tags
git push origin master
八铐刘、提交到cocoapods
1陪每、注冊(cè)trunk
pod trunk register xxx.@xxx.xx "作者名" --verbose
2、進(jìn)郵箱驗(yàn)證
3、驗(yàn)證注冊(cè)成功
pod trunk me
- Name: XXXX
- Email: XXXXXXXXX@163.com
- Since: May 18th, 20:47
- Pods:
- ZJAlertView
- Sessions:
- May 18th, 20:47 - September 23rd, 21:40. IP: 000.000.000.201
4奶稠、發(fā)布
pod trunk push xxx.podspec --verbose
九俯艰、搜索
pod search ZJAlertView
祝你們成功 ! ! !