In a custom framework containing both Objective-C and Swift code, the Swift compiler throws the following error:
[build_pat         
        There's 4 different ways this can happen, ignoring bugs in previous versions of Xcode
DEFINES_MODULE  is not set to YESCLANG_ENABLE_MODULES is not set to YESFor me setting 'Use Header Maps' to 'NO' resolved the issue
I had the same issue and none of the suggested answers helped in my case so I'm leaving this here in case someone has the same problem.
I had added a "Run script" in "Build phases" but ended up removing it and that's when I started getting the error.
My solution ended up having to clean the project, rebuild my framework and then my app project built correctly.
This will happen, when the Always Search User Paths setting is enabled for the Framework target.
Setting it to No will resolve that error.
IMHO this is a bug in the Swift Compiler and I have filed a radar with Apple.
See rdar://21038443
Definitely you must to set your framework to public:
There's some excellent answers here already. @Shadow_x99's was very helpful. However, if I could be allowed to supplement with my own experience.
An umbrella header is identified automatically in the build process. It is not a specified in the target's build settings or inherited from the project settings.
So to avoid this error that - as of XCode 7 - is as follows;
warning: no umbrella header found for target 'MyTarget', module map will not be generated
two important steps must be taken.
Firstly, the umbrella header must have the same name as the target. So if your target is a framework named MyTarget, there must be a header named MyTarget.h.
Secondly, in the build phases for MyTarget - as mentioned in that answer - that header file must be listed in the public section as detailed above.