This is not entirely accurate. Swift CLASSES do not have static variables, but structures and enumerations do!
struct Static {
static var stream: XMPPStream?
}
And you can initialize it later in your code if you want.
Static.stream = XMPPStream()
, , , :
class RegularClass {
struct Static {
static var stream: XMPPStream?
}
}
, ...
RegularClass.Static.stream ...
, , Swift. .