/Users/point/.cocoapods //本地
/Users/point/Library/Caches/CocoaPods/Pods //本地下载缓存
https://github.com/CocoaPods/Specs //远程
pod spec create name //创建 name.podspec
https://guides.cocoapods.org/making/getting-setup-with-trunk.html //指南
pod trunk register orta@cocoapods.org 'Orta Therox' —description='macbook air' //注册
pod trunk push name.podspec //提交 specs
====================================
pod 本地的私有库
pod 'download', :path => './LocalLib/download/' //找到 podspec
1/
git init
git add .
git commit -a -m 'ddd' //初始化git
2
pod spec create name //创建 name.podspec classes 同级
修改 a.summary
修改 a.description
a.lincense s.source_files s.source
3/ 集成到宿主工程
pod init
pod 'download', :path => './LocalLib/download/' //找到 podspec
4/生成测试工程
pod lib create
=================================================
远程私有库
*****/
创建自己的远程索引库
pod repo add ***
/Users/point/.ssh
ssh-keygen 生成ssh
pod repo 查看本地索引库
=======================
//生成 开发 源文件文件
/****
pod lib create
报错 `require': cannot load such file -- xcodeproj (LoadError)
首先升级了一下 ruby brew install ruby
然后
sudo gem uninstall xcodeproj
sudo gem uninstall cocoapods
sudo gem install xcodeproj
sudo gem install cocoapods
代码上传到远程 私有库
pod lib init // podspec验证
pod spec init //远程验证
git tag '0.0.1'
git tag -d '0.0.1' //删除本地tag
git push origin:0.0.1 //删除远程tag
git push --tags
pod repo push name name.podspec
//共享远程共有 远程私有
source 'git@git.coding.net:seemygo_wangshunzi/XMGFMSpecs.git'
source 'https://github.com/CocoaPods/Specs.git'
// 子框架
s.subspec 'Tool' do |t|
t.source_files = 'XMGFMBase/Classes/Tool/**/*'
n.dependency 'AFNetworking' //依赖
end
=========== 图片资源 组件化注意!!
cartool car 图片
NSBundle *currentBundle = [NSBundle bundleForClass:[self class]];
NSString *imagePath = [currentBundle pathForResource:@"tabbar_bg@2x.png" ofType:nil inDirectory:@"name.bundle"];
mkdir DCTestPod
cd DCTestPod
git init
echo "# DCTestPod" >> README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.coding.net/qq327532817/DCTestPod.git
git push -u origin master