CocoaPods创建本地私有库、远程私有库和公有库

pod库创建过程

  • 创建工程
  • 更新本地索引库
  • 手动创建本地私有库
  • 创建自己的pod库
  • 部署您的库

创建工程

  • git remote add origin [https://code.adress.com.git]关联远程代码
  • 拷贝远程库git clone [https://code.adress.com.git],进入拷贝工程的目录,git commit -am 'init'本地提交
  • git log查看本地提交记录,git push提交到远程

更新本地索引库

  • pod repo查看远程及本地索引库地址
  • pod repo update更新本地索引库

手动创建本地私有库

  • 创建工程目录TestProject
  • 创建Test、及TestLib目录
  • 在 TestLib目录下创建Classes目录,并touch **.m **.h创建文件,并git init创建git,本地提交
  • 在 Test文件夹下创建Test demo工程
  • 在 TestLib目录下pod spec create TestLib创建索引库,并修改,其中source地址指向空即可。
  • 在 Test工程目录下pod init,修改生成的Podfile,添加本地库pod ’TestLib‘, :path=>'../TestLib'
  • pod install完成本地库安装

<

你可能感兴趣的:(iOS组件化,iOS代码管理,objective-c,ios,cocoapods)