Cannot add Alamofire to Swift Project

对着背影说爱祢 提交于 2019-11-28 11:50:24

I had the same problem. I was able to fix it by doing the following.

  1. Download the Alamofire "Source" folder. https://github.com/Alamofire/Alamofire/tree/master/Source

  2. Drag it into your xCode Project, and click "Copy Items if Needed". If you view the project in Finder, the Alamofire Source folder should be in the project itself. (Ex: I have 3 items. Example App, Example App.xcodeproj, Example App Tests. The folder should be in Example App.)

  3. Finally, you should be done! However, now, you do not need to import Alamofire, since you are not actually loading a framework. For example, instead of doing Alamofire.upload, you will now only do upload.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!