novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 463 forks source link

Retrun a newMessage with nil data,how to get payload #529

Closed renjingkai closed 5 years ago

renjingkai commented 5 years ago

How to get payload from server I successfully connect to sever、subscribe and publish a topic . Then i receive a new message in newMessage by MQTTSessionDelegate,it has session、topic、qos、retained、mid,but no data.But in window client can receive data. So the question is: how to get payload , since the data is nil

func newMessage(_ session: MQTTSession!, data: Data!, onTopic topic: String!, qos: MQTTQosLevel, retained: Bool, mid: UInt32){
// It has session、topic、qos、retained、mid,but no data.But in window client can receive data.
}