Open Whoweez opened 5 years ago
Hi, @Whoweez Which version to use?
We have fixed a disconnect error caused by sending a subscribe packet at the v1.2.1. See: https://github.com/emqtt/CocoaMQTT/pull/261
So, maybe this error is caused by the same reason.
HI @HJianBo,
Thanks for the reply - really appreciate it :)
I'm using: Using CocoaAsyncSocket (7.6.3) Using CocoaMQTT (1.2.1)
The problem here was that your example worked correctly, but my pod install in my project didn't work. So, I checked all other settings such as pod versions/XCode versions and settings and all was the same...
AND SUDDENLY, on the 24th May when I was about to give up, it started working - I wish I knew what happened so that I can contribute to my own problem - but unfortunately I cannot... I have no idea what sparked the libraries to work... (really sorry...)
At this point, the above versions seem to work as expected.
Thanks again :)
Thanks for your attention to this @Whoweez.
Let me know if have any question there.
I am facing the same issue. Please tell how to fix it, I'm using: CocoaAsyncSocket (7.6.3) and CocoaMQTT (1.2.1). using the port 9001
Hi @AlokGroomefy My issue was I was subscribing to a MQTT port and not a websocket port. Perhaps look at your service port and make sure it can handle the respective service TLS host/port. Rgds, Wzz
@AlokGroomefy Hi, this thread issue has been fixed at v1.2.1. So your edition should work well. Plz paste the key code and runtime parameters to help me digging it
Hi Everyone,
This is my class:
This is the error:
didStateChangeTo accept didPublishMessage didStateChangeTo Optional(Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo={NSLocalizedDescription=Socket closed by remote peer})
When I comment the line "mqttClient!.subscribe" the connection stays open and receive regular pongs...
Can you explain why this client cannot subscribe to any kind of topic?
Thank you :)