I'm having an issue connecting an iOS and Android device with their corresponding QBChat libraries, with the message ID's.
Message objects in Quickblox's iOS library are defined as QBChatMessage objects, that doesn't exist in Quickblox's Android library (which delegates them to a Message class in SMACK library).
The problem is that QBChatMessage class manages message id's as integers, while Message class manages them as Strings. Every message sent from my Android device has a 7-character unique string + a number with the message's position in SMACK chat. When my iPhone receives the message, its ID is a number with the ID from SMACK parsed as much as it could, as in this communication sample (taken from the Android device):
SENT <message id="D64u5-4" to="102521-1799@chat.quickblox.com" from="132505-1799@chat.quickblox.com/Smack" type="chat"><body>{"content":{"text":"hello"},"type":1}</body><thread>7J9230</thread></message>
SENT <message id="D64u5-5" to="102521-1799@chat.quickblox.com" from="132505-1799@chat.quickblox.com/Smack" type="chat"><body>{"content":{"text":"yeah"},"type":1}</body><thread>7J9230</thread></message>
SENT <message id="D64u5-6" to="102521-1799@chat.quickblox.com" from="132505-1799@chat.quickblox.com/Smack" type="chat"><body>{"content":{"text":"test"},"type":1}</body><thread>7J9230</thread></message>
RCV <message id="0" from="102521-1799@chat.quickblox.com" type="chat" xmlns="jabber:client" to="132505-1799@chat.quickblox.com"><body>{"content":{"text":"hello"},"type":1}</body></message>
RCV <message id="1" from="102521-1799@chat.quickblox.com" type="chat" xmlns="jabber:client" to="132505-1799@chat.quickblox.com"><body>{"content":{"text":"yeah?"},"type":1}</body></message>
RCV <message id="2" from="102521-1799@chat.quickblox.com" type="chat" xmlns="jabber:client" to="132505-1799@chat.quickblox.com"><body>{"content":{"text":"yeah!"},"type":1}</body></message>
Message's ID is important for me, in order of database storage. How is this possible? What should I do to solve this issue?
Thanks, kind regards! :)
Daniel, sounds good. Is changing type of QBChatMessages.ID to NSString will solve your issue?
Will do that in next release. If you haven't time to wait - just write with your request to assist@quickblox.com, will make special build of SDK for you