- 首先你需要有一個自我感覺寫的差不多的庫蟹腾。
- 注冊 trunk
// 指令建議郵箱名和用戶名與自己的github同步
// 之后去自己的郵 箱中找到該郵件點擊驗證的鏈接完成注冊喇颁。
pod trunk register 1363852560@qq.com 'CoderXSLee' -- verbose
- 查看自己注冊信息
pod trunk me
- 配置自己的podspec文件
Pod::Spec.new do |s|
# 項目名稱
s.name = 'CSNetworking'
# 描述一下項目的作用
s.summary = 'On the basis of AFNetworking encapsulation.'
# 版本號
s.version = '1.0.8'
# 開源許可證
s.license = { :type => 'MIT', :file => 'LICENSE' }
# 作者信息
s.authors = { 'CoderXSLee' => '1363852560@qq.com' }
# 所支持的系統(tǒng)以及版本號
s.platform = :ios, '7.0'
s.ios.deployment_target = '7.0'
# 資源地址鏈接
s.source = { :git => 'https://github.com/CoderXSLee/CSNetworking.git', :tag => s.version.to_s }
#
s.requires_arc = true
# 文件
s.source_files = 'CSNetworking/**/*.{h,m}'
# 頭文件
s.public_header_files = 'CSNetworking/*.{h}'
# 所用到的系統(tǒng)類庫
# s.frameworks = 'CoreFoundation', 'CoreGraphics', 'Foundation', 'MobileCoreServices', 'QuartCore', 'Security', 'SystemConfiguration', 'UIKit'
# 所用到 cocoapods 中的其他類庫
s.dependency 'AFNetworking', '~>3.1.0'
s.dependency 'MJExtension', '~>3.0.13'
s.dependency 'YYCache', '~>1.0.3'
end
- 上傳代碼 (假設(shè)已經(jīng)上傳至 github)
再打一下 tag
git tag '1.0.0'
git push --tags
- 提交自己的podspec文件
pod trunk push CSNetworking.podspec
- 搜索
pod search CSNetworking
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者