My Apologies if this question was asked before. I have created group chat i am able to send the messages but I don't receive any notification when other person sends a message to me. To get the message i have leave & rejoin the room to get all messages.
Asked
Active
Viewed 888 times
0
-
Have implemented push notification for group chat? – Sunil Zalavadiya Jan 30 '16 at 04:29
3 Answers
0
Have you set the room's delegate to take care of the receiving room message?
try to set the room delegate :
[#XMPPRoom# addDelegate:]

Weizhi
- 174
- 4
- 22
0
This is how you can create a MUC Room; Click Link Here
And this how you invite participants in MUC and send messages to them: Click Link Here

Community
- 1
- 1

Fatima Arshad
- 350
- 2
- 5
0
If you are in background mode then you will surely get notification. But for this you have to create Local Notification. You have to create Local Notification in below method.
- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message
{
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.alertAction = @"OK";
localNotification.fireDate = [NSDate date];
localNotification.alertBody = xmppmessage;
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];
}
If you are not online while another user send you message, so at this stage you have to use PushNotification.

Parthpatel1105
- 541
- 6
- 17
-
What if the user is offline and the message sent to group. How the offline user gets the notification? – Arbaz Shaikh Oct 19 '15 at 07:39