Cocoapods公開(kāi)的Pod

1.登錄https://github.com/,隨便見(jiàn)一個(gè)倉(cāng)庫(kù)
2.復(fù)制倉(cāng)庫(kù)地址,建議Sourcetree克隆到本地,方便提交
3.找到一個(gè)*****.podspec文件,可以先pod本地文件,驗(yàn)證podspec的正確

Pod::Spec.new do |s|

      s.name         = "DMCMNLabel"
      s.version      = '2.0.0'
      s.summary      = "測(cè)試"
      s.description  = <<-DESC
                        測(cè)試
                       DESC

      s.homepage     = "https://github.com/***/test"
      s.license      = "MIT"
      s.author       = { "dmc" => "809***875@qq.com" }
      s.platform     = :ios, "9.0"
      s.ios.deployment_target = "9.0"
      s.source       = { :git => "https://github.com/***/test", :tag => "#{s.version}" }
      s.frameworks = "UIKit", "Foundation"
      s.requires_arc = true
      s.static_framework = true
 
      #s.dependency 'SDWebImage'
      #s.dependency 'AFNetworking'
      #s.dependency 'XhlNetWorking/API'

      s.source_files  = "DMCMNLabel/**/*.{h,m}"
    end

1.版本要跟xxx.podspec一致, cd到當(dāng)前目錄

git tag -a 0.0.1 -m "version 0.0.1"
git push origin 0.0.1

2.驗(yàn)證源代碼與xxx.podspec文件配置是否正確(xxx不能重復(fù)),第一次需要,后續(xù)更新省略此步驟

 pod spec lint xxx.podspec

3.提交spec到Specs倉(cāng)庫(kù)

 pod lib lint xxx.podspec --allow-warnings --use-libraries

4.將.podspec文件提交到gitHub上

pod trunk push 
pod trunk push --allow-warnings//報(bào)錯(cuò)可以用這句

首次需要登錄,點(diǎn)擊郵件驗(yàn)證即可

 pod trunk register xxx@example.com 'nikename'

私有pod

pod 'xxx', :path => '~/本地路徑'
pod 'xxx', :podspec => 'https://github.com/AssassinsDevilMayCry/test/xxx.podspec'
//修改源頭
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/AssassinsDevilMayCry/test/xxx.podspec'
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容