我正在运行 XCode 7、Swift 2.0、iOS 9。
我想在我的项目中使用 Cocoapods 安装 Alamofire。我做了以下事情:
gem 安装 cocoapods
pod 设置
pod 初始化
将 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 安装
然后我将以下内容添加到 ViewController.swift
导入 Alamofire
这会引发以下错误:
无法加载“Alamofire”的底层模块
我用另一个 pod 测试,它引发了同样的错误,所以我猜问题出在 Cocoapods 的安装上。任何帮助将不胜感激。
最佳答案
这似乎是 XCode 中的一个错误。我遇到了同样的问题,正如这个问题的另一个答案的评论中所述,构建项目使错误消失了。
关于ios - Cocoapods + 无法为 'x' 加载底层模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32673866/