我知道类似的错误在其他问题中也被提出过(例如这里),但它们的解决方案对我不起作用。我的应用程序一直出现构建失败:“找不到模块'Alamofire'”。我遵循了cocoadocs安装说明(这里)来安装Alamofire,但仍然无法工作。我确保所有内容都具有相同的部署目标。
嵌入式二进制文件和框架
此外,我在终端中再次尝试了"$ pod install",并收到了以下消息:
在跟随Sohil的建议后,XCode现在能够识别Alamofire模块,但是出现了22个新问题。
嵌入式二进制文件和框架
这是我的podfile文本。
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘9.2’
use_frameworks!
target 'MyApp' do
pod 'Alamofire', '~> 3.0'
end
target 'MyAppTests' do
end
target 'MyAppUITests' do
end
此外,我在终端中再次尝试了"$ pod install",并收到了以下消息:
[!] The `App [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
在跟随Sohil的建议后,XCode现在能够识别Alamofire模块,但是出现了22个新问题。
更新 #2:我现在使用的是Xcode 7.3和Swift 2.2,但是我遇到了一个新的错误,工作区链接出现问题:"ld: framework not found Alamofire. clang: error: linker command failed with exit code 1 (use -v to see invocation)."