前提:假设你本地已经安装好cocoapods环境
pod lib create 项目名称
a.获取远端仓库地址
b.git clone URL到本地磁盘
c.把 b clone到本地的.git目录copy到1创建的项目根目录下
d.把 upload.sh脚本copy到1创建的项目根目录下(如下是示例脚本)
a.新增完工具类或组件勿忘修改项目根目录下 eg:NIUIToolsPodSwift.podspec 文件里内容
b.勿忘修改upload.sh脚本里内容
# 私有索引库地址
source 'https://gitee.com/nixs/nispec.git'
# github公有索引库地址
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'swift002' do
use_frameworks!
# 屏蔽所有第三方框架警告
inhibit_all_warnings!
#注意如下格式
#pod 'lib', : git => 'url', :tag => 'version'
#注意:只能使用 “ => ” 符号;
#pod 'NIUIToolsPodSwift', :git => 'https://gitee.com/nixs/niuitools-pod-swift.git', :tag => '0.1.2'
pod 'NIUIToolsPodSwift','0.1.2'
pod 'NIUIToolsPod'
# 更改所有第三方框架 Target 版本
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
需要私有库制作全流程脚本的私信个人WX: wvqusrtg