今天在項目中引入AFNetworking。
Podfile的内容
platform :ios, '7.0'
pod "AFNetworking", "~> 2.0"
出現了一個錯誤
[!] The `AllBlue [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the
flag, or$(inherited)
- Remove the build settings from the target.
[!] The `AllBlue [AutoDebug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.autodebug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the
flag, or$(inherited)
- Remove the build settings from the target.
[!] The `AllBlue [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the
flag, or$(inherited)
- Remove the build settings from the target.
[!] The `AllBlue [AutoRelease]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.autorelease.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the
flag, or$(inherited)
-
Remove the build settings from the target.
大衣就是target的設定覆寫了 pod的設定。
這個警告會導緻再代碼編譯的時候出現錯誤
library not found for -lPods
解決方法:
在Build Settings -> Other linker flags 中添加$(inherited)
添加完成之後運作
pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.6.3)
警告消失!!!