xmpp ios : which xmpp delegate to use to get chat notifications (XMPPMessage+XEP_0085) -
I am implementing XMPP in my iOS app, let me know about the XMPPMessage + XEP_0085
category Running in which there are some simple methods like addActiveChatState
, addComposingChatState
and some others. I want to show chat notifications eg When the user is typing or paused the message. I am using the following code to send the message:
NSXMLElement * message = [NSXMlelement elementWithName: @ "message"]; [Message addAttributeWithName: @ "Type" stringValue: @ "Chat"]; [Message addAttributeWithName: @ "stringwolves: user]; [message addAttributeWithName: @" id "stringValue: messageID]; [message addChild: body]; [message addChild: settings]; // Chat Notifications XMPPMessage * xmppMessage = [XMPP message message Related to: message]; [XmppMessage addActiveChatState]; [XmppMessage addComposingChatState]; [XmppMessage addPausedChatState]; [XMPPMessage addInactiveChatState]; [XMPPMessage addGoneChatState]; [_appDelegate.xmppStream sendElement: xmppMessage];
In which xmpp representative should receive these notifications I do not receive chat notifications
- (XMPPMessage *) xmppStream: (XMPPStream *) Sender's Receiving message: (XMPPMessage *) Message
Rep.
You are right, define some simple ways to add bus to XMPPMessage + XEP_0085
category, state state information, but in the message check that chat status exists Also, you need to type the XMPPModule
in the message that the -xmppStream: ... didReceiveMessage:
note (note, you didReceiveMessage
To use ) And "Multicast" event on others if the message is hatchstatect
and / or hacking chestSTATE
, then you see examples of XMPPModule
in the implementation of other XMPP Extensions, such as XMPPPing
Comments
Post a Comment