低於1 0版本 pod使用

2021-08-07 08:31:12 字數 2152 閱讀 1456

comments

cocoapods將rails的gem思想成功的遷移到了osx中,讓ios和macos也能快速的管理第三方依賴。

然而,用久了發現乙個很尷尬的問題——cocoapods還不是很完善,因此更新頻率很大,雖然我經常更新,但是他對舊版本的cocoapods相容性並不好。

例如,我有乙個專案是用0.16版本的cocoapods開發的,過了一段時間,需要對這個專案進行更新,在執行pod install時會出現各種問題,原因是我用新版本的pod來安裝舊版本的podfile.lock,雖然官方也盡量在相容舊版本,但不可避免還是會出現各種問題,例如——用法過期並移除……

這時候想到,進行rails開發中,用bundle進行gem管理,而cocoapods本身就是乙個gem,那能不能用bundle來管理cocoapods呢?

我們先試著在專案根目錄下,建立gemfile檔案:

gemfile

1

gem

'cocoapods',

'~>

0.16.0

'

執行bundle install:

123

4567

891011

1213

1415

1617

1819

2021

2223

$ bundle install

fetching source index from

resolving dependencies...

using rake (10.0.4)

using i18n (0.6.1)

using multi_json (1.7.3)

using activesupport (3.2.13)

using addressable (2.3.4)

using colored (1.2)

using escape (0.0.4)

using multipart-post (1.2.0)

using faraday (0.8.7)

using json (1.7.7)

using faraday_middleware (0.9.0)

using hashie (2.0.5)

using netrc (0.7.7)

using octokit (1.24.0)

using open4 (1.3.0)

using xcodeproj (0.5.5)

installing cocoapods (0.16.4)

using bundler (1.3.5)

your bundle is complete!

use `bundle show [gemname]` to see where a bundled gem is installed.

gem list看看本地有哪幾個版本cocoapods:

123

45

$ gem list cocoapods

*** local gems ***

cocoapods (0.19.1, 0.16.4)

現在試試能否用舊版本的cocoapods:

1

2

$ pod --version

0.16.4

退出專案資料夾,去其他資料夾試試會不會自動切換到新版本:

1

23

$ cd ..

$ pod --version

0.19.1

成功!發現有人直接用pod --version沒效果,可能是他不是使用最新版本的rvm,則需要手動呼叫bundle:

1

2

$ bundle exec pod --version

0.16.1

列轉行1 0版本

1.有score列表如下 列轉行 插入資料 insert into score values 張三 語文 80 insert into score values 張三 數學 90 insert into score values 張三 英語 85 insert into score values 李...

Windows 10 版本資訊

針對 windows 10 的功能更新每年將通過半年頻道 sac 發布兩次,時間約為每年的 3 月和 9 月。自功能更新發布之日起 18 個月或 30 個月內,我們還將隨之推出月度質量更新,具體取決於生命週期策略。我們建議你立即開始將各個半年頻道版本定向部署到已選擇進行早期採用的裝置上,並自行決定公...

Oracle有1 0版本嗎?

答案是 沒有。oracle公司前身,rsi relational software,inc.rsi 在1979年的夏季發布了可用於dec公司的pdp 11計算機上的商用 oracle產品,這個資料庫產品整合了比較完整的sql實現,其中包括子查詢 連線及其他特性。但不得不說,軟體不是很穩定,並缺少事務...