前因
今天,在給老的項目“瘦身”的時候,發現了一些舊的,不再使用的第三方庫。或者是一些正在使用的,但是目錄結構看起來相當複雜的第三方。在整理的時候,看着可以說是相當的煩心。
然後,就想着給項目添加cocoapods支持
後果
開始整理!!
- 終端cd到當前項目路徑下
pod init
pod初始化- 然後添加需要使用pod管理的第三方庫名,以及相應的版本號(如不知道,可用
pod search xxx
來搜索),整理完成之後,保存退出(shift+zz
) - 更新
pod update
然後,就出現了以下的問題
The xxx target overrides the ‘HEADER_SEARCH_PATHS’ build setting defined in ”pods/Target Support Files/Pods-xxxxx.config. This can lead to problems with the Cocoapods installation
-Use the ‘$(inherited)’ flag, or
-Remove the build settings from the target.
處理
- 選中target
- 在
build Setting
中,分別給Header search paths
和other linker flags
中添加$(inherited)