CocoaPods如何发布新版本的Pod Library

当我们修改了一个Pod Library中的代码时,如何让依赖该库的项目能更新到最新代码,步骤如下:
假设现在修改了SamplePod(Pod名称)的代码,希望将最新版本更新到1.0.1,目前版本是1.0.0

  1. 修改SamplePod.podspec文件,将version由1.0.0修改为1.0.1
  2. 将源码修改和podspec文件修改一并提交到git仓库中,push到远端仓库
  3. 增加tag,tag名称需要和podspec文件中的version名称一致,push tag到远端仓库
  4. 发布最新版本
    • pod trunk push SamplePod.podspec --allow-warnings

可能碰到的问题:

  1. m1 m2版本mac,在arm版本的Terminal终端碰到如下问题:

    LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

    解决方案:使用rosetta模式来运行Terminal即可。

  2. [!] You need to run pod trunk register to register a session first.

    说明在Pod仓库源,本机未注册,执行pod trunk register按照要求注册即可。

  3. [!] The spec did not pass validation, due to 3 warnings (but you can use –allow-warnings to ignore them).

    表示podspec文件lint检查未通过,直接按照说明添加--allow-warnings即可。

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值