CocoaPods 缺少框架导致 "linker command failed" 错误

CocoaPods missing framework causing a "linker command failed" error

我正在使用 XCODE 7.1。尝试将 this library 添加到我的 现有 Swift 项目中,我制作了以下 pod 文件:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'PusherSwift'

安装后,我的项目在尝试构建时抛出以下错误:

ld: framework not found CryptoSwift clang: error: linker command failed with exit code 1 (use -v to see invocation)

我无法导入所需的库。我还有一个名为 Pods_myProject.framework

的红色(缺失)框架

我该如何解决?

安装 pods 后,您需要确保在构建项目时打开 Xcode 工作区 (yourProject.xcworkspace) 而不是项目 (yourProject.xcodeproj)。

有关详细信息,请参阅 CocaPods 页面。