【发布时间】:2015-12-16 21:25:24
【问题描述】:
我正在运行 XCode 7、Swift 2.0、iOS 9。
我想使用 Cocoapods 在我的项目中安装 Alamofire。我做了以下事情:
gem install cocoapods
pod setup
pod init
将 Podfile 更新为:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
target 'JSONeg' do
pod 'Alamofire', :branch => 'swift-2'
end
然后我安装了 pod:
pod install
我在 ViewController.swift 中添加了以下内容
import Alamofire
这会引发以下错误:
Cannot load underlying module for 'Alamofire'
我用另一个 pod 进行了测试,它引发了同样的错误,所以我猜问题出在 Cocoapods 的安装上。任何帮助将不胜感激。
【问题讨论】:
-
检查您是否已导入所需的框架
标签: ios swift afnetworking cocoapods alamofire