[组件化开发]pod Specs 远程私有库

/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

转载于:https://my.oschina.net/zhaodacai/blog/895112

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值