Classes

class Config {
    //type constant
    static let maxConnections = 3

    //type properties
    //in version 6
    nonisolated(unsafestatic var host = ""
    nonisolated(unsafestatic var port = 0

    //type method
    static func getConnection() -> String {
        return "\(host):\(port)"
    }
}

Config.host = "10.0.0.1"
Config.port = 52
let connection = Config.getConnection()
//connection is "10.0.0.1:52"

print("connection is \(connection)")