无法导入Alamofire

Gio*_*oli 7 ios cocoapods swift alamofire

我正在尝试在我的班级中导入Alamofire,但我收到了错误消息Cannot load underlying module for 'Alamofire'.我做了相同的步骤导入另一个库(SwiftyJSON),它运作良好.这是我的podfile:

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

target 'MyApp' do
    pod 'SwiftyJSON', '~> 2.2.0'
    pod 'Alamofire', '~> 1.2'
end

target 'MyAppTests' do
    pod 'SwiftyJSON', '~> 2.2.0'
    pod 'Alamofire', '~> 1.2'
end
Run Code Online (Sandbox Code Playgroud)

然后我使用$ pod install,我可以找到Alamofire作为Pods下的模块.

当我进入我的课程时import Alamofire,找不到它(但是SwiftyJSON是).

我做错了什么?

til*_*ilo 13

这个问题已在Github上报道:https://github.com/Alamofire/Alamofire/issues/441

那里提到的可能修复:

  • 产品 - >清洁
  • 重启Xcode


cru*_*bio 5

有这个问题的任何人都可能忘记了一步.

您可能需要将Alamofire(或SwiftyJSON)链接到您的项目.

项目>目标>常规>链接的框架和库:

在此输入图像描述