无法在新的Xcode项目中安装Alamofire。 “No Such module Alamofire” [英] Cannot install Alamofire in new Xcode Project. "No Such module Alamofire"
本文介绍了无法在新的Xcode项目中安装Alamofire。 “No Such module Alamofire”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我按照说明进行T.全新安装,但收到错误:
I follow the instructions to the T. Fresh install of all, yet getting the error:
没有这样的模块Alamofire
"No Such module Alamofire"
这里的路线:
在此期间,你可以简单地添加Alamofire作为git子模块,拖动Alamofire。将xcodeproj文件添加到Xcode项目中,并将框架产品添加为应用程序目标的依赖项。
In the meantime, you can simply add Alamofire as a git submodule, drag the Alamofire.xcodeproj file into your Xcode project, and add the framework product as a dependency for your application target.
我的截图
推荐答案
确保您没有将Alamofire中的任何文件添加到您的项目中,除了Alamofire.xcodeproj
Make sure you haven't added any files from Alamofire to your project except for the Alamofire.xcodeproj
这是一步一步步骤说明:
Here is step by step instruction:
- 下载和取消归档Alamofire
- 将Alamofire的根文件夹复制到任何子文件夹你的项目。例如,Libs。
- 将Alamofire.xcodeproj拖放到Xcode项目中
- 打开项目的项目设置,Build Phases窗格,展开Target依赖关系部分,并将Alamofire添加为新依赖关系
- 打开常规窗格,展开嵌入式二进制文件部分,然后添加Alamofire.framework
-
在源文件中导入Alamofire
// -
Alamofire.request(.GET, http://httpbin.org/get)
//使用Alamofire
- Download and unarchive Alamofire
- Copy the root folder of Alamofire to any subfolder of your project. Libs, for example.
- Drag and drop Alamofire.xcodeproj to your Xcode project
- Open project settings of your project, Build Phases pane, expand Target Dependencies section, and add Alamofire as new dependency
- Open General pane, expand Embedded Binaries section, and add Alamofire.framework
import Alamofire
// in your source fileAlamofire.request(.GET, "http://httpbin.org/get")
// use Alamofire
这篇关于无法在新的Xcode项目中安装Alamofire。 “No Such module Alamofire”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文