避免团队多人 cocopods 冲突未验证

│ Ruby 版本 │ rbenv 或 rvm │ rbenv local 3.2.0 │

├────────────────┼──────────────┼─────────────────────────┤

│ CocoaPods 版本 │ Bundler │ bundle exec pod install │

└────────────────┴──────────────┴─────────────────────────┘

推荐你这样搞(一劳永逸)

1. 用 rbenv 管理 Ruby 版本

brew install rbenv

rbenv install 3.2.0

rbenv global 3.2.0

2. 用 Bundler 锁定 CocoaPods 版本

在你的 iOS 项目根目录:

gem install bundler

bundle init

编辑生成的 Gemfile:

source "https://rubygems.org"

gem "cocoapods", "~> 1.15"

然后:

bundle install

以后每次装 Pod 都用:

bundle exec pod install

这样做的好处:Gemfile.lock 会提交到 Git,团队所有人、所有分支用的 CocoaPods 版本完全一致,切分支再也不会因为版本不对要重新 install 了。

相关推荐
Coder_张三6 小时前
iOS 26 适配
前端·ios·swift
用户38034165882977 小时前
崩溃率从 0.3% 到 0.04%:我们做对的不是修 bug,是让每个崩溃只发生一次
ios·swift
2501_9159214310 小时前
详细教程:使用Perfdog工具测量iOS应用的功耗性能与优化方法
android·macos·ios·小程序·uni-app·cocoa·iphone
风雨_11 小时前
RTK (Rust Token Killer) 安装、使用与卸载指南
ios
茶底世界之下11 小时前
夜景暗部要提亮多少?用 Awaking 给雪夜街道留一点层次
ios
黑科技iOS上架12 小时前
cocos游戏ios上架前加固流程(小蟹iOS混淆)
ios·审核·ios混淆·执行程序差异化
QWsin1 天前
「轻漾」App隐私政策
ios·个人开发
season_zhu1 天前
近段时间,AI加持下,我的开发感悟
ios
用户38034165882971 天前
Flutter 迁 SwiftUI:AI 把页面"搬"过来只用了两周,我们补结构花了两个月
ios·swift