title: how to disable connection alert (ios multipeer connectivity framework)
body: <p><strong>I found this:</strong> [<a href="https://stackoverflow.com/questions/22919905/disable-connection-alert-multipeer-connectivity?rq=1][1]">Disable connection alert (Multipeer connectivity)</a></p>
  
  <p>And the code from that is:</p>
  
  <pre><code> - (void)advertiser:(MCNearbyServiceAdvertiser *)theAdvertiser didReceiveInvitationFromPeer:(MCPeerID *)directorPeerId withContext:(NSData *)invitationData invitationHandler:(void (^)(BOOL, MCSession *))invitationHandler
  {
      // accept the invitation and stop advertising
      invitationHandler(YES, self.session);
      [self.advertiser stopAdvertisingPeer];
      self.advertiser = nil;
  }
  </code></pre>
  
  <p>But I don't know how to make this code to work, where should it be implemented and how to trigger it ?</p>