无法在新的 Xcode 项目中安装 Alamofire.“没有这样的模块 Alamofire" [英] Cannot install Alamofire in new Xcode Project. "No Such module Alamofire"
本文介绍了无法在新的 Xcode 项目中安装 Alamofire.“没有这样的模块 Alamofire"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我按照 T. Fresh install 的说明进行了所有操作,但出现错误:
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
以下是分步说明:
- 下载并取消存档 Alamofire
- 将 Alamofire 的根文件夹复制到项目的任何子文件夹中.例如,Libs.
- 将 Alamofire.xcodeproj 拖放到您的 Xcode 项目中
- 打开项目的项目设置,构建阶段窗格,展开目标依赖项部分,并将 Alamofire 添加为新依赖项
- 打开 General 窗格,展开 Embedded Binaries 部分,然后添加 Alamofire.framework
import Alamofire
//在你的源文件中Alamofire.request(.GET, "http://httpbin.org/get")
//使用 Alamofire
这篇关于无法在新的 Xcode 项目中安装 Alamofire.“没有这样的模块 Alamofire"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文