So I have a Swift
file with some class Whatever
. This class has a number of private properties. Like this:
class Whatever
{
private let privateString = "Blabla"
private let privateInt = 125
// a lot of code here
}
I would like to create an extension for this class in a separate file. Just in order to avoid having a large file with enormous amount of code. But I can't. An extension in a separate file cannot access private properties of the class. So I'm forced to either make private properties internal or maintain a single large file. Is there any technical solution to this problem except creating a module for this functionality?