Client.enableNsLogLogging()
DESCRIPTION
Enable logging messages from the underlying SDK using NSLog.
DECLARATION
public func enableNsLogLogging()
PARAMETERS
None.
ERRORS
Throws the following errors:
None.
RETURN VALUES
None.
EXAMPLES
func invoke() throws {
let client = NabtoEdgeClient.Client()
client.enableNsLogLogging()
try client.setLogLevel(level: "trace")
let connection = try client.createConnection()
let privateKey = try client.createPrivateKey()
try connection.setPrivateKey(key: privateKey)
try connection.setProductId(id: "pr-fatqcwj9")
try connection.setDeviceId(id: "de-ijrdq47i")
try connection.setServerKey(key: "sk-9c826d2ebb4343a789b280fe22b98305")
try connection.setServerConnectToken(sct: "WzwjoTabnvux")
try connection.connect()
let details: NabtoEdgeClient.DeviceDetails = try NabtoEdgeClient.IamUtil.getDeviceDetails(connection: connection)
DispatchQueue.main.async {
self.spinner.stopAnimating()
self.label.text = "Device SDK Version: \(details.NabtoVersion)"
}
}