自定义CocoaPods私有库

生成podspec 文件命令:(以Uagent 为例)

pod spec create  Uagent.podspec
文件内容主要部分修改如下
#
#  Be sure to run `pod spec lint Uagent.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|
  s.name         = "Uagent"
  s.version      = "0.0.1"
  s.summary      = "自定义** 系统."
  s.homepage     = "http://www.****.com"
  s.license      = "MIT"
  s.author       = { "zhangsan" => "[email protected]" }
  s.platform     = :ios, "8.0"

  s.source       = { :path => "." }
  s.source_files  = "Uagent/**/*.{h,m}"

  s.resources = "Uagent/*.xib", "Uagent/Other/*.xib"
  s.requires_arc = true
  s.dependency "YTKNetwork", "1.1.0"
  s.dependency "MJExtension", "2.5.16"

 end

自定义pod file 安装命令

  pod 'Uagent', :path => './Uagent/'

目录结构

自定义CocoaPods私有库_第1张图片
image.png

你可能感兴趣的:(自定义CocoaPods私有库)