Open ashishgupta301 opened 8 years ago
I have manually crated an IQ and sent to server to change password from client. I am also using Openfire as server.
Here is my code, hope this will help you.
NSXMLElement *query =[NSXMLElement elementWithName:@"query" xmlns:@"jabber:iq:register"];
NSXMLElement *username =[NSXMLElement elementWithName:@"username" stringValue:**userID**];
NSXMLElement *changePassword =[NSXMLElement elementWithName:@"password" stringValue:**newPassword**];
[query addChild:username];
[query addChild:changePassword];
XMPPIQ *iq =[XMPPIQ iqWithType:@"set" elementID:[XMPPStream generateUUID] child:query];
[iq addAttributeWithName:@"to" stringValue:[NSString stringWithFormat:@"%@",**serverIP**]];
[[[XMPPAlertReceiver getXMPPAlertReceiver] xmppStream] sendElement:iq];
We need to implement forget password but using XMPP we are unable to change password in openfire.
Provide any solution or any idea about this.