安装
sudo gem install cocoapods-pod-merge
gem install bundler
bundle init 创建 Gemfile文件 配置 cocoapods 版本 及 插件位置
bundle install
MergeFile
cd 到工程目录下 进行 合并文件创建
vim MergeFile
文件编写
group NAME
end
group 里面的库相互依赖 需要添加
group NAME
has_depencies!
end
报错 swift_version不一致 添加
group NAME
swift_version! '5.0'
end
podfile 文件编写
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
plugin 'cocoapods-pod-merge'
target 'General' do
use_frameworks!
inhibit_all_warnings!
pod 'UI', :path=>'MergedPods/UI'
pod 'OCUI', :path=>'MergedPods/OCUI'
end
pod install 或者 bundle exec pod install
引用方式
import xx.xxx
ruby 升级
brew update
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile