The problem im facing is how can i recognize the sender and reciever of the message ? tried so hard but didn't find any delegate method from which i can separate message and show like chat , right now my msgs are showing like this
the second problem is , I want my msgs on the right side but its appearing on the left side of the screen
My Firebase Schema for Chat
will be very really thankful if someone could guide me


You just need to implement
in your
MessagesDataSourceto return a struct or class that conforms toSenderTypewith some ID that identifies the sender in your backend. In yourMessageTypeobject, you also need to store the current sender of that message as yourSenderTypeobject. (I'm guessing thesendervariable on your Firebase message schema would work for that?)MessageKit will take care of laying out your cells on the correct side based on the
senderIdofmessage.sendervscurrentSender(), you don't need to do anything explicit other than ensuring the Sender object has the correct senderId for each message, and return the current sender in your MessagesDataSource.