【发布时间】:2015-12-16 20:29:33
【问题描述】:
我正在尝试在 Swift 中使用 cocoapod Alamofire。但是,当我 Import Alamofire 使用 Xcode 7.2 Alamofire 3.0 和 Swift 2 时,我收到错误“No Such Module”以下是我采取的步骤
1) 在终端中我跑了
$ sudo gem install cocoapods
当时没有错误
2) 我跑了
cd ~/Path/To/Folder/Containing/Project(曾经在我运行的项目文件夹中)
pod init
3) 然后
open -a Xcode Podfile
4) 然后我添加了
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
到 Podfile
5) 然后我跑了
pod 'Alamofire', '3.0'
紧随其后
pod install
我将$(SRCROOT) 添加到runpath 和buildpath。
我还发现这个答案No such module "Armchair" 说要添加预发布,但我真的不明白如何做到这一点,或者这是我的问题。也许这很明显,但是我是 Swift 的新手并且不理解。 Alamofire 也应该出现在我的框架或 pods 文件夹中吗?它也不在。 files in project
【问题讨论】:
标签: ios swift xcode swift2 cocoapods