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.
}
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