Swift Failed to create objective-c module 'Alamofire'

Fresh Vanilla submodule for installing Alamofire using XCode6 and the following instructions to T. Something just doesn’t work here. The error I get is "Failed to create module>" alamofire "to import alamofire. Here is a screenshot of the error I get:

enter image description here And my configuration:

enter image description here

+71
swift alamofire
Nov 09 '14 at 22:55
source share
9 answers

When this happens, first create the frames separately. In your case:

  • Change the circuit to Alamofire
  • Assembly ( ⌘B )
  • Return to your schema
  • Run
+50
Jan 05 '15 at 0:34
source share

Go to Developer / Xcode / DerivedData and delete the folder for your structure. (Or just remove DerivedData)

If you have a build of your application in a running simulator, you need to delete the application there.

Then clean and build

+37
Feb 13 '15 at 4:42
source share

Removing the DerivedData folder and cleaning and building the project solved this problem for me.

+19
Feb 05 '15 at 4:33
source share

This always works for me:

  • Quit Xcode
  • Delete ~/Library/Developer/Xcode/DerivedData
  • Go to the framework diagram and build ⌘B
  • Change the application layout and build ⌘B
+17
Jan 19 '15 at 3:08
source share

Build a clean job for me.

  • Build cleanliness for Alamo
  • Build cleanup for HTTPDemo
+9
Dec 11 '14 at 7:52
source share

Comment on the import and all the code using it, create, run, and then uncomment. It worked for me ...

+3
Dec 04 '14 at 21:53
source share

If this error attempts to import a dynamic structure, make sure that the structure is included in the target dependencies.

Project > "Target" > Build Phases > Target Dependencies

+3
Nov 18 '16 at 14:56
source share

Try the following in this order, and one of the steps should work.

  • Cmd + B - Creates a workspace and possibly creates the desired object or module.

  • Cmd + K , and then Cmd + B - clear and then build

  • Cmd + Shift + Option + K and Cmd + B - Clear build folder

  • Close Xcode, delete the received data, run Xcode and Cmd + Shift + Option + K , then Cmd + B

This is the cleanest way to clear received data and other caches from Xcode.

+2
Feb 06 '17 at 23:05
source share

I solved this problem in one of my Objective-C / Swift hybrid projects.

In your Objective-C bridge file, add the following line:

#import <Alamofire/Alamofire.h>

0
Aug 31 '17 at 3:45
source share



All Articles