无法在新的Xcode项目中安装Alamofire。 “No Such module Alamofire”

编程入门 行业动态 更新时间:2024-10-10 00:26:41
本文介绍了无法在新的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, httpbin/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 file
  • Alamofire.request(.GET, "httpbin/get") // use Alamofire
  • 更多推荐

    无法在新的Xcode项目中安装Alamofire。 “No Such module Alamofire”

    本文发布于:2023-11-26 05:20:19,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1632791.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:项目   Xcode   module   Alamofire

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!