Closed rolandjitsu closed 10 years ago
I have concluded that the issue was the way I was encoding the data, I was using a NSSet
and converted it to NSData
, but Ruby cannot read NSSet
so I had to convert to JSON before to NSData
.
I will close this issue as it has been resolved here.
We support UTF8 ( binary ) data for all messages - it may also have been that UTF8 was not your default encoding either. Messages in the MQTT spec are just binary blobs anyways ...
I think it was ASCII by default, but now that I'm encoding to JSON before sending the data it works perfectly.
Just have a short question @methodmissing, can the client be made as readonly (I think the C library has that options from what I've seen in the source code, but I might be mistaken or I misunderstood), just for subscribing and not being able to publish anything, since the publishing is done from the device?
I'm using MQTTKit on a small iOS app to publish some data to the MQTT server and this library to subscribe in a small ruby program, but it seems like the data I receive looks very weird:
I'm not sure if it is this lib or the other pod, but I have posted a comment here just to make sure that both parties are informed.