Pod私有庫制作

##Pod私有庫制作

####目錄

+安裝CocoaPods

+創(chuàng)建遠(yuǎn)程內(nèi)部私有Spec Repo倉庫

+模板創(chuàng)建pod庫

+編輯***.podspec文件

+驗證本地是否通過

+關(guān)聯(lián)本地倉庫,并推送到遠(yuǎn)程倉庫,打標(biāo)簽

+推送***.podspec到遠(yuǎn)程

+驗證遠(yuǎn)程是否通過

+驗證私有倉庫是否可用,pod集成私有庫

####1.安裝CocoaPods

####2.模板創(chuàng)建pod庫

```

pod lib create LTYPProject

```

```

# 你想使用哪個平臺?

What platform do you want to use?? [ iOS / macOS ]

?> iOS

# 庫語言選擇?

What language do you want to use?? [ Swift / ObjC ]

?> ObjC

是否要在庫中包含演示應(yīng)用程序?

Would you like to include a demo application with your library? [ Yes / No ]

?> Yes

# 你要使用哪個測試框架?

Which testing frameworks will you use? [ Specta / Kiwi / None ]

?> None

# 是否要UI測試?

Would you like to do view based testing? [ Yes / No ]

?> NO

# 類名前綴?

What is your class prefix?

?> LTYP

```

####3.編輯.podspec文件

```

Pod::Spec.new do |s|

? s.name? ? ? ? ? ? = 'LTYPProject'

? s.version? ? ? ? ? = '0.2.0'

? s.summary? ? ? ? ? = 'LTYPProject_test'

# 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://gitee.com/YiHong_Project/LTYPHttpManager'

? # s.screenshots? ? = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'

? s.license? ? ? ? ? = { :type => 'MIT', :file => 'LICENSE' }

? s.author? ? ? ? ? = { 'yihongMacPro' => '278411540@qq.com' }

? s.source? ? ? ? ? = { :git => 'https://gitee.com/YiHong_Project/LTYPHttpManager.git', :tag => s.version.to_s }

? # s.social_media_url = 'https://twitter.com/'

? s.ios.deployment_target = '8.0'

? s.source_files = 'LTYPProject/Classes/**/*'


? # s.resource_bundles = {

? #? 'LTYPProject' => ['LTYPProject/Assets/*.png']

? # }

? # s.public_header_files = 'Pod/Classes/**/*.h'

? # s.frameworks = 'UIKit', 'MapKit'

? # s.dependency 'AFNetworking', '~> 2.3'

```

####4.關(guān)聯(lián)本地倉庫,并推送到遠(yuǎn)程倉庫,打標(biāo)簽

項目關(guān)聯(lián)到git遠(yuǎn)程倉庫

代碼推送到遠(yuǎn)程

打標(biāo)簽tag

####5.驗證本地是否通過

```

pod lib lint

```

LTYPProject passed validation.

####6.創(chuàng)建遠(yuǎn)程內(nèi)部私有Spec Repo倉庫

```

//查看所有repo源

pod repo

//刪除master

pod repo remove master

//添加.specs repo源

pod repo add LTYP https://gitee.com/YiHong_Project/LTYP_Specs.git

```

####7.推送***.podspec到遠(yuǎn)程

```

//推送.podspec

pod repo push LTYP LTYPProject.podspec

```

####8.驗證遠(yuǎn)程是否通過

```

pod spec lint WBAvoidCrash.podspec

```

####9.驗證私有倉庫是否可用,pod集成私有庫

最后編輯于
?著作權(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ù)。

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

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