##Pod私有库制作
####目录
+安装CocoaPods
+创建远程内部私有Spec Repo仓库
+模板创建pod库
+编辑***.podspec文件
+验证本地是否通过
+关联本地仓库,并推送到远程仓库,打标签
+推送***.podspec到远程
+验证远程是否通过
+验证私有仓库是否可用,pod集成私有库
####1.安装CocoaPods
####2.模板创建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
是否要在库中包含演示应用程序?
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' => '[email protected]' }
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.关联本地仓库,并推送到远程仓库,打标签
项目关联到git远程仓库
代码推送到远程
打标签tag
####5.验证本地是否通过
```
pod lib lint
```
LTYPProject passed validation.
####6.创建远程内部私有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到远程
```
//推送.podspec
pod repo push LTYP LTYPProject.podspec
```
####8.验证远程是否通过
```
pod spec lint WBAvoidCrash.podspec
```
####9.验证私有仓库是否可用,pod集成私有库