cocoapods gemfile bundler

本文介绍如何在项目中使用特定版本的CocoaPods,通过编辑Gemfile并指定cocoapods版本,然后运行bundle install和pod --version来确认安装的CocoaPods版本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

如何让某个工程使用指定版本的cocoapods

即在工程podfile gemfile同目录下 pod --version返回gemfile中指定的cocoapods版本

$ bundle init
Writing new Gemfile to /Users/xxxxx/Desktop/Demo2/Gemfile
$ vim Gemfile



# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"
gem 'cocoapods','1.5.3'


:wq

$ bundle install


Fetching gem metadata from https://gems.ruby-china.com/..........
Resolving dependencies...
Using CFPropertyList 3.0.1
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using minitest 5.13.0
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11.1
Using atomos 0.1.3
Using bundler 1.16.2
Using claide 1.0.3
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using cocoapods-core 1.5.3
Using cocoapods-deintegrate 1.0.4
Using cocoapods-downloader 1.2.2
Using cocoapods-plugins 1.0.0
Using cocoapods-search 1.0.0
Using cocoapods-stats 1.1.0
Using netrc 0.11.0
Using cocoapods-trunk 1.4.1
Using cocoapods-try 1.1.0
Using colored2 3.1.2
Using escape 0.0.4
Using fourflusher 2.0.1
Using gh_inspector 1.1.3
Using molinillo 0.6.6
Using ruby-macho 1.4.0
Using nanaimo 0.2.6
Using xcodeproj 1.13.0
Using cocoapods 1.5.3
Bundle complete! 1 Gemfile dependency, 30 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.


$ pod --version
1.5.3

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值