In framework we are using Swift and ObjC, so that Swift instances are instantiated within ObjC methods. To be able to do so, we had to make those swift files public/open, so they appear in SWIFT_INSTALL_OBJC_HEADER (OurModule-Swift.h), which is then imported by ObjC. The problem is that we'd like to hide those Swift classes from public interface of framework. Apple says:
For framework targets, only declarations with the
publicoropenmodifier appear in the generated header. You can still use Swift methods and properties that are marked with theinternalmodifier from within the Objective-C part of your framework, as long they are declared within a class that inherits from an Objective-C class. For more information on access-level modifiers, see Access Control in The Swift Programming Language (Swift 3.1).
so in theory it should be possible to have internal swift classes created from ObjC, but it doesn't seem to work. Any ideas?