15

In order for my Objective-C framework to link successfully in my Swift cocoa touch framework, I had to use this unpretty workaround, which involves importing all framework headers into the project as public headers.

I totally don't need all of them appearing in my umbrella header, so I want to somehow remove the bunch of warnings generated. ("Umbrella header for module 'Foo' does not include header"). I went through LLVM warning settings in the build settings, but could not found it.

Community
  • 1
  • 1
ambientlight
  • 7,212
  • 3
  • 49
  • 61

3 Answers3

19

If you're getting this warning from a “Compile Swift source files” ▸ “Precompile bridging header” build step (also labeled PrecompileSwiftBridgingHeader), here's how you suppress it:

  1. Find the Build Settings for your project.
  2. Search for “Other Swift Flags”.
  3. Add -Xcc and -Wno-incomplete-umbrella to “Other Swift Flags” (in that order).

Xcode build settings

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
3

The warning flag is -Wincomplete-umbrella, so to suppress, pass -Wno-incomplete-umbrella.

jscs
  • 63,694
  • 13
  • 151
  • 195
1

Try setting the header role from public to project and make sure that you don't reference any third-party headers from your own headers - only from implementations.

Any header that is of role public must be imported into the umbrella header.

Cocoanetics
  • 8,171
  • 2
  • 30
  • 57
  • 1
    the purpose is actually linking against third party framework, the workaround of importing all third-party framework headers as public allows to avoid 'include of non-modular header' linker error, but you don't want to expose these headers, which is why you would just want to ignore the warnings and not include them in umbrella header. – ambientlight Oct 10 '15 at 01:50