【发布时间】:2016-07-24 20:24:38
【问题描述】:
我意识到在其他问题(如here)中提出了同样的错误,但他们的解决方案对我不起作用。
我的应用程序中不断出现构建失败:“没有这样的模块‘Alamofire’”。我按照 cocoadocs 安装说明 (here) 安装 Alamofire,但它仍然无法正常工作。我确保所有东西都有相同的部署目标。
Embedded Binaries and Frameworks
这是我的 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:找不到框架 Alamofire。clang:错误:链接器命令失败,退出代码1(使用 -v 查看调用)。”
【问题讨论】:
-
确保您加载的是 xcworkspace 而不是项目
标签: ios xcode swift cocoapods alamofire