本地私有库的实现 pod

 参考 https://www.jianshu.com/p/9183cded6b2e

1,查看

pod repo 查看本地 pod 目录信息

2, 创建spec

pod spec create LocaPod

3.修改spec 文件 

//.summary    摘要信息(短一点)
//.description  库的描述信息
//.license        协议,删掉括号中内容
//.author        作者, xxx => 3134@qq.com
//source   本地库, git需要改成空的
  s.source       = { :git => "", :tag => "#{s.version}" }
//.source_files   过滤文件(*表示文件 .h .m )
匹配文件,其中BaseLib为目标文件夹, ** 表示包含BaseLib下的所有文件
 s.source_files  = "BaseLib", "BaseLib/**/*.{h,m}"

例子:

Pod::Spec.new do |s|
 
  s.name         = "localpod"
  s.version      = "0.0.1"
  s.summary      = "A short description of localpod."

  s.homepage         = 'http://gitxxx/rcrn'
  s.source           = { :git => '' }
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'xxx' => 'xxx@qq.com'}
  s.source_files = 'Source/*.swift'
  s.ios.deployment_target = "11.0"

end

4, 集成进入项目pod中

pod 'Base', :path => '../Base'         //需要指定路径,组件所在的路径,以当前 podfile 的路径开始向前找    //注释: ' ../'  的作用是跳出当前目录,回到上一个目录
pod install
原文地址:https://www.cnblogs.com/daxueshan/p/6901438.html