In a custom framework containing both Objective-C and Swift code, the Swift compiler throws the following error:
[build_pat
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.