cocoapods gemfile bundler

如何让某个工程使用指定版本的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
发布了200 篇原创文章 · 获赞 50 · 访问量 65万+

猜你喜欢

转载自blog.csdn.net/allanGold/article/details/102977556