I am developing a dynamic framework
in Objective-C
that has public and private headers.
Due to some reasons, I do NOT use modular import directives
(e.g: #import <MyFramework/MyPublicHeader.h>
)
instead, I use non-modular import directives
(e.g: #import "MyPublicHeader.h"
)
and I still can build a module so that I can import them from my framework module
(e.g: #import <MyFramework/MyPublicHeader.h>
)
So far so good. But, when I import a public header from inside of a private header, I get "header not found" compiler errors.
Example
MyPrivateHeader.h: (compiler error!)
#import "MyPublicHeader.h"
MyPrivateHeader.h: (NO compiler error!)
#import <MyFramework/MyPublicHeader.h>
I checked other projects (for example YAPDatabase
) and it imports public headers from its private headers without error. In fact, I already solved the problem for now but I still would like to learn more about the internals of this process. Why do I get "header not found" in this case?
Can anyone illuminate me about the internal mechanism of modules
, public headers
and private headers
?