Closed jtomaslobo closed 9 years ago
This is a difficult question to answer without knowing the architecture of your app, so we might need to get a bit more info.
The method to add a new message is called: addNewMessage:
. Here's how you would add a new message to your chat:
NSString *message = @"Get your message content here";
LGChatMessage *newMessage = [[LGChatMessage alloc] initWithContent:message sentByString:[LGChatMessage SentByUserString]];
Then, get a reference to your chat controller and call this:
[yourChatController addNewMessage:newMessage];
Does that answer your question?
Thanks a lot for the answer. I think it is going to work.
I will work on it and let you know how it goes.
No problem, let me know if you have issues!
Best,
Logan
Hey, I am kind of confused right now trying to figure out how to add push functionality in this chat.
By that I mean, what action should I trigger whenever I receive a push message in order to print the incoming message in the chatcontroller asynchronally?
Thanks for the help