Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding internal headers from framework umbrella header

While trying to begin using Swift in a framework (including turning on module support), I started getting messages like this:

[snip]/<module-includes>:1:1: Umbrella header for module 'PressKit' does not include header 'NPKBaseAppearance.h'

The headers in question (there are about ten of them) are not listed in PressKit.h, but with good reason—they include internal or rarely-used classes and categories that I don't want to expose to most users of my framework. (Some of them I'd like to expose in select places; others should never be exposed.)

Marking the headers as private doesn't seem to help. This is a warning in my framework's project, but an error in each target using the framework, so I can't just ignore the problem.

Obviously I can add these headers to my umbrella header, but I don't want to. Am I violating some rule of framework design when using modules? What's the recommended way to handle this sort of situation?

like image 882
Becca Royal-Gordon Avatar asked Mar 17 '15 04:03

Becca Royal-Gordon


1 Answers

Don't know if you already solved this issue yourself but did you try to exclude the headers you don't want to export in a custom .modulemap file?

Have a look at: Clang 3.7 documentation - Modules

like image 117
SanCode Avatar answered Oct 27 '22 07:10

SanCode