CocoaMQTT
CocoaMQTT copied to clipboard
CocoaMQTT state is always contecting
let clientID = "CocoaMQTT-" + String(ProcessInfo().processIdentifier) let mqtt = CocoaMQTT(clientID: clientID, host: "192.168.1.10", port: 1883) mqtt.logLevel = .debug mqtt.username = "test" mqtt.password = "public" mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout") mqtt.keepAlive = 60 mqtt.delegate = self mqtt.connect()
func mqtt(_ mqtt: CocoaMQTT, didStateChangeTo state: CocoaMQTTConnState) { print("current state is: (state)") }
state is always contecting Use golang client to connect normally xcode 12.3, swift5.3
I have the same problem.
Version 12.4 ,swift5.3.2
I have the same problem.
Same problem here
Please check the broker configuration again. Maybe the problem can be solved. Or you can use free broker(broker-cn.emqx.io port:1883) to test.