I have a set of classes in a subfolder (along with a corresponding group in Xcode) that implement the facade pattern: only one class should be used from outside this folder. How do I implement this access control in Swift?
In Java, I'd declare the facade class public, and leave everything else with package access.
In Swift, it seems I should use internal access, defining another module for the folder. And in Xcode, modules correspond to build targets. So, how do I define a build target for a subfolder, in the Xcode GUI? Note that it should all be linked together into one binary.
Will defining another build target add more maintenance overhead in the future? I'm not familiar with the Xcode build system.