Podspec汇总

一、引用方式

公库

pod 'xx'
pod 'xx', '1.0'
pod 'xx', '.path'
pod 'xx', '.git'

私有

  pod 'XTProtocolManager', :path=>'../XTProtocolManager/XTProtocolManager.podspec'
end

二、本地pod

pod spec create ModuleName
subspec 需要描述好子目录
如果子目录还有目录,就是要指定好,其实用**也可以;
source

 s.source       = { :git => "./XTProtocomManager", :tag => s.version }
s.source = { :git => "https://github.com/dingpuyu/XTProtocolManager.git", :commit => "881daa" }
s.source = { :git => "https://github.com/dingpuyu/XTProtocolManager.git", :tag => 0.0.1 }
s.source = { :git => "https://github.com/dingpuyu/XTProtocolManager.git", :tag => s.version }

source_file
require_arc
resource
prefixheader
privateheader
exclude

三、链接(都可以分平台)

deployment_target
framework = uikit、
dependency
library = c++
static_library=true
xcconfig = {key=value}
ios.pod_target_xcconfig = {key=value}

四、私有库

pod repo add xxx git地址
ls ./cocoapod/repos
pod repo push XTPrivateLib XTProtocolManager.podspec

你可能感兴趣的:(Podspec汇总)