關于使用本地制作Library
服務器上創建對應git管理
git init --bare xx.git
podspec創建
1. git clone git@192.168.3.44:some-code.git
2. 使用xcode創建工程放置到some-code文件夾
3. 進入到somde-code文件夾創建podspec問件: pod spec create library的名稱
4. 修改podspec文件
Pod::Spec.new do |s|
s.name = "LoginPart"
#添加子項目來進行庫的細致劃分,會在同一lib種將其切分為多個不同的小模塊,然后根據模塊添加依賴關系
s.subspec 'FloatPart' do |cs|
cs.source_files = "LoginPart/LoginPart/FloatPart/**/*.{h,m}"
cs.resources ="LoginPart/LoginPart/FloatPart/**/*.png"
cs.dependency 'Masonry', '~> 1.1.0'
end
s.version = "0.0.2"
s.summary = "用戶登錄 LoginPart."
s.description = <<-DESC
"#{ s.summary }"
DESC
s.homepage = "http://EXAMPLE/LoginPart"
s.license = "MIT"
s.author = { "sk" => "lylapp@163.com" }
s.platform = :ios, "9.0"
s.source = { :git => "git@192.168.3.44:login.git", :tag => "#{s.version}" }
#執行文件 和 xib再此管理配置
從podspec等級文件夾開始
s.source_files = "LoginPart/LoginPart/PartCode/**/*{h,m}", "LoginPart/LoginPart/PartCode/**/*.xib"
s.requires_arc = true
#依賴的庫
s.dependency 'AFNetworking', '~> 3.2.1'
end
git對應的pod使用
pod 'somLibray', :git=>'git@xxxx/yy.git', :tag=>'0.0.1'(:branch:=>'master/dev/feature')