Pod公共库

  • GitHub新建自己的git repository

  • 将项目clone到本地

git clone git@github.com:xxx/xxx.git
  • 初始化好项目,将Pod库文件建立好目录

PodFileDirectory.png

  • 给仓库创建个podspec文件
pod spec create xxx git@github.com:xxx/xxx.git

CreatePodSpec.png

  • 编写xxx.podspec文件

项目中不做子目录分层显示

Pod::Spec.new do |s|
s.name             = "xxx"
s.version          = "0.0.6"
s.summary          = "Custom Category used on iOS."
s.description      = <<-DESC
                     Custom Category used on iOS, which implement by Objective-C.
                     DESC
s.homepage         = "https://github.com/xxx/xxx"
s.license          = 'MIT'
s.author           = { "xxx" => "xxx@gmail.com" }
s.platform         = :ios, '7.0'
s.source           = { :git => "https://github.com/xxx/xxx.git", :tag => s.version }
s.source_files     = 'xxx/**/*'
s.requires_arc     = true
end

项目中做子目录分层显示

Pod::Spec.new do |s|
  s.name             = "xxx"
  s.version          = "0.0.6"
  s.summary          = "Custom Category used on iOS."
  s.description      = <<-DESC
                       Custom Category used on iOS, which implement by Objective-C.
                       DESC
  s.homepage         = "https://github.com/xxx/xxx"
  s.license          = 'MIT'
  s.author           = { "xxx" => "xxx@gmail.com" }
  s.platform         = :ios, '7.0'
  s.source           = { :git => "https://github.com/xxx/xxx.git", :tag => s.version }
  s.requires_arc     = true

# UIView 和 EasyLog 在工程中以子目录显示
  s.subspec 'UIView' do |ss|
    ss.source_files = 'xxx/UIView/*.{h,m}'
  end

  s.subspec 'EasyLog' do |ss|
    ss.source_files = 'xxx/EasyLog/*.{h,m}'
  end

end

s.source_files = ' ' 的多种写法

s.source_files = 'xxx/UIView/*.{h,m}'

表示xxx/UIView/目录下的所有.h.m文件


s.source_files = 'xxx/**/*

表示xxx/目录下所有文件,包括子目录下所有文件。 **/*表示递归

当有多个文件时,应用,隔开

s.source_files = 'MMDrawerController/MMDrawerController.{h,m}', 'MMDrawerController/UIViewController+MMDrawerController*'

  • 把当前版本上传到GitHub,并打上tag(版本号) 即tag => s.version 并确保tag push到GitHub
git push origin --tags

PushTags.png

  • 检查xxx.podspec文件是否编写正确
pod lib lint

CheckPodSpec.png

  • 将xxx.podspec文件上传给CocoaPods

pod Trunk 注册

pod trunk register xxx@gmail.com  'xxx'

检查成功与否,登录邮箱,点击确认,终端输入:

pod trunk me

PodTrunk.png

  • 上传xxx.podspec 到 CocoaPods/repo
pod trunk push xxx.podspec
  • 检测是否上传成功
pod search xxx

PushSearchCheck.png

参考:

如何制作自己的Pod库

Guides Cocoapods

MMDrawerController

华为云配置k8s远程仓库的具体步骤如下: 1. 首先,您需要在华为云上创建一个容器仓库,用于存储您的镜像。您可以使用华为云容器镜像服务(CCE)或者云容器引擎(CCE)来创建容器仓库。 2. 在创建容器仓库时,您需要选择适合您的存储类型,例如公共或私有存储。您还可以选择存储的地域和命名空间。 3. 在创建容器仓库后,您需要将您的k8s集群与华为云容器仓库进行关联。您可以通过在k8s集群中创建一个secret来实现。在创建secret时,您需要提供华为云容器仓库的访问凭证,包括用户名和密码。 4. 创建secret后,您可以在k8s集群中的Deployment或Pod的配置文件中指定使用该secret来拉取镜像。您可以在配置文件中的imagePullSecrets字段中引用该secret。 通过以上步骤,您就可以成功配置华为云的k8s远程仓库,并在k8s集群中使用该仓库中的镜像了。请注意,具体的配置步骤可能会因为您使用的华为云产品和版本而有所不同,建议您参考华为云的官方文档或者咨询华为云的技术支持获取更详细的配置指导。 #### 引用[.reference_title] - *1* *3* [华为云k8s环境部署应用](https://blog.csdn.net/wdquan19851029/article/details/123445397)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [华为云部署K8s之容器技术--2镜像管理](https://blog.csdn.net/weixin_49994404/article/details/109593515)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值