- 創(chuàng)建私有庫的索引文件repoA:
pod repo add repoA repoA_url
- 創(chuàng)建私有庫podA:
pod lib create podA
- 編輯podA代碼
- 遠程倉庫新建項目podA,注意不要勾選創(chuàng)建.md文件那些選項
- 打開podA.podspec文件,編輯好信息(可參考最后的example)
- podA推送到遠程:
git remote add origin https://github.com/JW-chenjingwei/podA.git
git branch -M main
git push -u origin main
- 打上tag:
git tag 0.1.0
git push —tag
- 檢查podA是否通過:
pod repo lint podA
- 把podA和私有庫索引repo關(guān)聯(lián)起來
pod repo push repoA podA.podspec
- 檢查是否成功:
pod search podA
Example:podA.podspec信息
Pod::Spec.new do |s|
s.name = 'PersonalEnglishLib'
s.version = '0.1.0'
s.summary = '這是一個說英語很牛逼的框架,逼很牛,你忍一下'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.homepage = 'https://github.com'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { ‘XX’ }
s.source = { :git => 'https://github.com/JW-chenjingwei/PersonalEnglishLib.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.source_files = 'PersonalEnglishLib/Classes/**/*'
# s.resource_bundles = {
# 'PersonalEnglishLib' => ['PersonalEnglishLib/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
12. 可能會出現(xiàn)的錯誤提示,要求輸入github賬號密碼時提示需要使用access tokens,解決方法就是在github的devlep settiing里創(chuàng)建access tokens,在電腦里的鑰匙串中搜索github,刪除之前保存的github賬號密碼,下次要求輸入密碼的時候輸入access tokens即可
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。