MCNearbyServiceAdvertiserDelegate.DidReceiveInvitationFromPeer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates an invitation has been received to join a session.
[Foundation.Export("advertiser:didReceiveInvitationFromPeer:withContext:invitationHandler:")]
public abstract void DidReceiveInvitationFromPeer (MultipeerConnectivity.MCNearbyServiceAdvertiser advertiser, MultipeerConnectivity.MCPeerID peerID, Foundation.NSData context, MultipeerConnectivity.MCNearbyServiceAdvertiserInvitationHandler invitationHandler);
abstract member DidReceiveInvitationFromPeer : MultipeerConnectivity.MCNearbyServiceAdvertiser * MultipeerConnectivity.MCPeerID * Foundation.NSData * MultipeerConnectivity.MCNearbyServiceAdvertiserInvitationHandler -> unit
Parameters
- advertiser
- MCNearbyServiceAdvertiser
- peerID
- MCPeerID
- invitationHandler
- MCNearbyServiceAdvertiserInvitationHandler
Continuation that the app developer must call.
Implements
- Attributes
Remarks
When overriding this method, application developers must invoke the invitationHandler
, passing in an appropriate MCSession and a boolean indicating whether the invitation should be accepted or not.
public override void DidReceiveInvitationFromPeer(MCNearbyServiceAdvertiser advertiser, MCPeerID peerID, NSData context, MCNearbyServiceAdvertiserInvitationHandler invitationHandler)
{
parent.statusLbl.Text = "Received Invite";
invitationHandler(true, parent.Session);
}