美文网首页
Cocoapods 私有库创建

Cocoapods 私有库创建

作者: 羽裳有涯 | 来源:发表于2019-06-17 10:25 被阅读0次
  • 1、创建新工程。(pod 管理工程)
  • 2、添加QrMockIos 私有库;(在.cocopods/repos/目录下有该工程)
 pod repo add QrMockIos http://192.168.7.197:8083/GeexZbc/QrMockIos.git
  • 3、创建QrMockIos.podspec 文件
pod spec create QrMockIos
  • 4、配置.podspec文件
Pod::Spec.new do |spec|

  spec.name         = "QrMockIos"
  spec.version      = "1.0.0"
  spec.summary      = "网络环境选择"

  spec.description  = <<-DESC
                    网络环境选择和mock扫描环境
                   DESC

  spec.homepage     = "http://192.168.7.197:8083/GeexZbc/QrMockIos.git"
  spec.license      = { :type => "MIT", :file => "FILE_LICENSE" }

  spec.author             = { "zbc101" => "zbc10101@163.com" }
  spec.platform     = :ios, "8.0"

  spec.source       = { :git => "http://192.168.7.197:8083/GeexZbc/QrMockIos.git", :tag => "#{spec.version}" }

  spec.source_files  = "QrMockIos", "QrMockIos/QrMockIos/mock/*.{h,m}"
  # spec.exclude_files = "Classes/Exclude"

  # spec.public_header_files = "Classes/**/*.h"
  spec.dependency "AFNetworking", "~> 3.2.0"

end
  • 5、验证对不对,最好是一个警告都没有,
pod lib lint
pod lib lint --allow-warnings

注:QrMockIos passed validation. 出现这个就成功了。

总结 以上私有库算创建完成

在别的工程可以引用

pod 'QrMockIos', :git => 'http://192.168.7.197:8083/GeexZbc/QrMockIos.git', :tag => '1.0.0'
pod 'QrMockIos', :git => 'http://192.168.7.197:8083/GeexZbc/QrMockIos.git', :inhibit_warnings => true ,:commit => '2daff42'

相关文章

网友评论

      本文标题:Cocoapods 私有库创建

      本文链接:https://www.haomeiwen.com/subject/htyofctx.html