title: How to implement the way to send a friend request in XMPPFramework in iOS?
body: <p>I have already figured the way to accept a subscription request in XMPPRoster using the following in <strong>MainAppDelegate.m</strong>:</p>
  
  <pre><code>- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence
      {
       NSString *presenceType = [presence type];
       if  ([presenceType isEqualToString:@"subscribe"]) {
         [xmppRoster acceptPresenceSubscriptionRequestFrom:[presence from] andAddToRoster:YES];
     } 
  </code></pre>
  
  <p>However, I am not able to send a friend request on a button click. The main problem I am facing is that my New Friend add form is in a separate <strong>ViewController.m</strong> class than <strong>MainAppDelegate.m</strong>. How do I access the XMPPRoster methods from <strong>ViewController.m</strong>? Do I have to redeclare the object for XMPPRoster or can I somehow reuse the object already instantiated in <strong>MainAppDelegate.m</strong> file? </p>