I have a TSUI user interface defined as a module. It has both Objective-C and Swift code. If I import it into Objective-C code as follows:
#import <TSUI/TSUI.h>
Everything works fine, but then I only get access to the Objective-C code. However, if I import it as:
@import TSUI;
or
#import <TSUI/TSUI.h> #import <TSUI/TSUI-Swift.h>
Everything compiles fine, but in Xcode I get the following error: 
Both in the structure and in the application code, I set the following assembly parameters:
- Inline content contains code Swift = YES
- Allow non-modular inclusion in structural modules = YES
- Enable Modules = YES
I tried to clear the project by clearing the derived data and the problem keeps coming back. It also appears if the framework does not contain Swift code, but is included in @import instead of #import. At the moment, I think this is a mistake.
source share