CocoaPods的操作相關問題及解決辦法

2021-07-13 12:10:25 字數 1700 閱讀 4117

podfile公升級之後到最新版本,pod裡的內容必須明確指出所用第三方庫的target,否則會出現the dependency `` is not used in any concrete target這樣的錯誤。

以下從三個步驟陳述:

1. podfile公升級

檢視pod版本:

pod --version

pod 公升級(此時是公升級到1.0.0.beta.2版本):

sudo gem install cocoapods --pre

2. 錯誤內容:

我的podfile的內容是:

platform :ios, 『

7.0『

pod

『reactivecocoa

『, 『

2.1.8

『pod

『objectiveflickr

『, 『

2.0.4

『pod

『linqtoobjectivec

『, 『

2.0.0

『pod

『sdwebimage

『, 『

3.6『

pod install後出現錯誤the dependency `` is not used in any concrete target

pod install

re-creating cocoapods due to major version update.

updating local specs repositories

analyzing dependencies

[!] the dependency `reactivecocoa (= 2.1.8)` is not used in any concrete target.

the dependency `objectiveflickr (= 2.0.4)` is not used in any concrete target.

the dependency `linqtoobjectivec (= 2.0.0)` is not used in any concrete target.

the dependency `sdwebimage (= 3.6)` is not used in any concrete target.

3. 修改方法:

podfile內容更改:

platform :ios, 『

7.0『

target

"rwtflickrsearch"do

pod

『reactivecocoa

『, 『

2.1.8

『pod

『objectiveflickr

『, 『

2.0.4

『pod

『linqtoobjectivec

『, 『

2.0.0

『pod

『sdwebimage

『, 『

3.6『

end

這樣再執行pod install,就會成功了。

error: while executing gem

...(errno::eperm) operation not permitted - /usr/bin/xcodeproj

CocoaPods相關問題總結

關於pod install 和 pod update 第一次為專案新增依賴或者每一次修改podfile後使用pod install。當你執行pod install,它只會解決那些沒有在podfile.lock檔案中列出來的pods的依賴。對於沒有在podfile.lock中列出的pods,會去匹配p...

cocoaPods詳細操作

首次使用 1.檢視cocoapods伺服器 sudo gem source l 如果伺服器不是 的https的,那麼就要更新伺服器位址 2.刪除cocoapods老得伺服器 sudo gem source r 3.新增cocoapods新的伺服器 sudo gem source a 4.安裝coco...

cocoapods的使用及其相關問題

前提條件 必須已經成功安裝好cocoapods 1.建立podfile 配置檔案 首先建立乙個xcode檔案 例如 a 新建乙個專案,名字podtest,b 終端中,cd到專案總目錄 注意 包含podtest資料夾 podtest.xcodeproj podtesttest的那個總目錄 cd use...