IOS 上傳自己的庫到cocoapod

來源:互聯網
上載者:User

標籤:register   源檔案   tags   detail   選項   依賴庫   work   使用   csdn   

參考:http://www.cnblogs.com/SimonGao/p/4987668.html

參考:http://www.cnblogs.com/yueyuanyueyuan/p/5560954.html

參考:http://blog.csdn.net/wzzvictory/article/details/20067595

參考:http://www.jianshu.com/p/d7d1942dd3f1

 

1. 工程
  • 引用的第三方庫,不能用#import<> 而用#import"" 設定功能的搜尋選項 "Always search user paths"為YES
  • 庫裡的檔案不要有測試工程
  • 上傳到github
2. 製作2.1. 添加 .podspec 檔案2.1.1.  建立
  • 必須檔案
  • 使用命令 pod spec create name.podspec
  • 或者直接拷貝一份
2.1.2.  新增內容
  • 必須
  • 來到倉庫根目錄
  • 添加pods依賴庫需要一個描述檔案,並且檔案名稱要和依賴庫的名稱一樣。
  • s.source_files 是源檔案路徑
Pod::Spec.new do |s|  s.name         = "ColorfulWoodUIBase"  s.version      = "1.0.1"  s.summary      = "User Interface Design."  s.homepage     = "https://github.com/gs01md"  s.license      = "MIT"  s.author       = { "ColorfulWood" => "[email protected]" }  s.source       = { :git => "https://github.com/gs01md/ColorfulWoodUIBase.git", :tag => "#{s.version}" }  s.source_files = "ColorfulWoodUIBase/ColorfulWoodUIBase/**/*"  s.platform     = :ios  s.frameworks   = ‘UIKit‘  s.dependency    ‘Masonry‘end

 

2.2. 上傳 podspec檔案2.1.1. 為 pod 添加版本號碼並打上tag
git tag -m "first release ColorfulWoodUIBase with podspec" "1.0.1"git push --tags

 

2.1.2. 驗證
pod lib lint ColorfulWoodUIBase.podspec

 

2.1.3. 註冊
pod trunk register [email protected] "ColorfulWood" --description="macbook pro"

 

2.1.4. 上傳
 pod trunk push ColorfulWoodUIBase.podspec

 

IOS 上傳自己的庫到cocoapod

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.