in IoT-Sample/Swift/IoTSampleSwift/ConnectionViewController+Websocket.swift [52:61]
func handleConnectViaWebsocket() {
self.connectButton.isHidden = true
activityIndicatorView.startAnimating()
DispatchQueue.main.async {
self.logTextView.text = "Connecting (data plane)..."
}
let uuid = UUID().uuidString
// Connect to the AWS IoT data plane service over websocket
iotDataManager.connectUsingWebSocket(withClientId: uuid, cleanSession: true, statusCallback: mqttEventCallbackWebsocket(_:))
}