通过 Cocoapods 添加后出现 Alamofire 错误

Alamofire error after adding via Cocoapods

我有一个用 Objective-C 编写的 Xcode 项目。但是我想在 Swift 中编写我的新屏幕并且需要 Alamofire 框架。我的项目中已经有 Swift 个文件,但尝试几次后出现以下错误:

ld: warning: directory not found for option '-L/Users/USERNAME/Developer/APP NAME/build/Debug-iphoneos'
ld: warning: directory not found for option '-F/Users/USERNAME/Developer/APP NAME/build/Release-iphoneos'
ld: framework not found Alamofire
clang: error: linker command failed with exit code 1 (use -v to see invocation)

在终端中我得到以下建议:

[!] The `APP NAME [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-APP-NAME/Pods-APP-NAME.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

[!] The `APP NAME [Release]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-APP-NAME/Pods-APP-NAME.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

我已经尝试将 $(inherited) 添加到 Library Search Paths(构建阶段。

我的 pod 文件:

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
use_frameworks!

target 'APP-NAME' do
pod 'Alamofire', '~> 2.0'
end

您是否手动将 Alamofire.framework 文件拖到您的项目中,然后 link 带有框架的二进制文件(目标构建阶段 -link 带有库的二进制文件 - 添加 Alamofire.framework)

我这样做是为了在 swift 2.0、xcode 7.3

中添加大部分第三方库