自定义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" => "zhangsan@qq.com" }
  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/'

目录结构

image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容