1

Trying to add alamofire to swift project using unstruction from here

Did all these steps, clean project a lot of timer and restarted XCode, nothing helps. Error does not dissappear

https://i.stack.imgur.com/kNU3R.png

"Cannot load underlying module for 'Alamofire'" and nothing to do

Changes I did:

1) added project file to my project

i.stack.imgur.com/eUe8E.png

2) added to build phases panel

i.stack.imgur.com/1wanl.png

3) added to general tab

i.stack.imgur.com/L3TTR.png

What`s wrong with that?

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
SwiftStudier
  • 2,272
  • 5
  • 21
  • 43

1 Answers1

5

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.

dannybess
  • 599
  • 4
  • 18