add user to roster

899 views
Skip to first unread message

ashok

unread,
Dec 26, 2012, 5:48:37 AM12/26/12
to xmppfr...@googlegroups.com
Hi 
How to add the user to our roster in iphone using xmpp framework .

I found the method adduser in xmpproster.m file but i dont know how to call that method in my custom.m file 

plz guide me how to proceed further.

Obaid Shaik

unread,
Jan 5, 2013, 5:41:58 AM1/5/13
to xmppfr...@googlegroups.com
I'd definitely help you in adding the friend to your roster, I'd like to give you clue so that it will be easy for you to implement other things that  you will come across while developing your application.

Go on the xmpp.org website and in that click on extensions you will find list of extensions which performs peculiar functions. In that you will find how to add a friend in your roster.

It is like passing an xml to your openfire server, you don't need to do anything just pass the xml you will get the response in didreceiveiq method in AppDelegate and from that you can perform the function  you want to perform.

Example.
You need to pass the subscribe request to send request to your friend.

<presence to='jul...@example.com' type='subscribe'/>


If you are still confused how to do that, don't worry just call the xmpproster method in this way.
In your .h file declare
#import "XMPPRoster.h"

and use this in XMPPRosterDelegate in

UIViewController<XMPPRosterDelegate>{
    XMPPRoster *xmppRoster;

}

@property (nonatomic, strong, readonly) XMPPRoster *xmppRoster;

In your .m file declare this method
@synthesize xmppRoster;

Now if you have any action method in that method declare in this way

[self.xmpproster adduser:fri...@gmail.com withnickname:anyname];

Hope this helps.


--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To post to this group, send email to xmppfr...@googlegroups.com.
To unsubscribe from this group, send email to xmppframewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/xmppframework/-/EMwB3tnS9oUJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages