When I compile my framework into an iOS application project, I constantly get these linker warnings:
<module-includes>:1:1: warning: umbrella header for module 'MyFramework' does not include header 'MyClass+StateAccess.h'
…/AppProject/AppClass.m:123:456 warning: missing submodule MyFramework.MyClass_BackdoorExtension' [-Wincomplete-umbrella] #import <MyFramework/MyClass+BackdoorExtension.h>
However, unlike these answers SO: 1 , 2 , 3 ; I do not want MyClass+BackdoorExtension.h be focused with all the other headers for the framework. MyClass+BackdoorExtension.h is the hidden back door interface for my framework MyClass - Using the BackdoorExtension member should produce error: property 'backdoorMember' not found on object of type 'MyClass *' , unless this particular application source file contains MyClass+BackdoorExtension.h .
Prior to Swift modules, this would work as expected without providing linker warnings; backdoorMember was unavailable if the app .m file did not have #import <MyFramework/MyClass+BackdoorExtension.h> , after which everything was compiled and started without warnings or runtime problems. Be that as it may, everything compiles and runs as expected, but I would like to suppress the warning (I am the type of developer who likes to handle warnings as bug fixes). And I would like to find a way to make this work using the existing above-mentioned #import files in an Objective-C application and the equivalent import of Swift files in applications too (e.g. import MyFramework.MyClass+BackdoorExtension ).
I experimented with explicit module & explicit header in my module.modulemap structure module.modulemap no avail.
Here is my current module.modulemap structure:
module MyFramework { umbrella header "MyFramework.h" export * }
and the main header of the MyFramework.h umbrella:
#import <Foundation/Foundation.h> #import <MyFramework/BaseClass.h> #import <MyFramework/MyClass.h> #import <MyFramework/AnotherClass.h>
And here is the MyClass+BackdoorExtension.h framework (which has a public target accessory for the framework):
I am using Xcode 8.1 with Apple LLVM version 8.0.0 (clang-800.0.42.1).