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:
And my configuration:
When this happens, first create the frames separately. In your case:
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
Removing the DerivedData folder and cleaning and building the project solved this problem for me.
This always works for me:
~/Library/Developer/Xcode/DerivedData
Build a clean job for me.
Comment on the import and all the code using it, create, run, and then uncomment. It worked for me ...
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
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.
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>