GKInviteEventListener

Trait GKInviteEventListener 

Source
pub unsafe trait GKInviteEventListener {
    // Provided methods
    unsafe fn player_didAcceptInvite(
        &self,
        player: &GKPlayer,
        invite: &GKInvite,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_didRequestMatchWithRecipients(
        &self,
        player: &GKPlayer,
        recipient_players: &NSArray<GKPlayer>,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_didRequestMatchWithPlayers(
        &self,
        player: &GKPlayer,
        player_i_ds_to_invite: &NSArray<NSString>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature GKMatchmaker only.
Expand description

GKInviteEventListener uses the GKLocalPlayerListener mechanism on GKLocalPlayer to listen to the two kinds of invite events that a game must respond to

See also Apple’s documentation

Provided Methods§

Source

unsafe fn player_didAcceptInvite(&self, player: &GKPlayer, invite: &GKInvite)
where Self: Sized + Message,

Available on crate features GKBasePlayer and GKPlayer only.

player:didAcceptInvite: gets called when another player accepts the invite from the local player

Source

unsafe fn player_didRequestMatchWithRecipients( &self, player: &GKPlayer, recipient_players: &NSArray<GKPlayer>, )
where Self: Sized + Message,

Available on crate features GKBasePlayer and GKPlayer only.

didRequestMatchWithRecipients: gets called when the player chooses to play with another player from Game Center and it launches the game to start matchmaking

Source

unsafe fn player_didRequestMatchWithPlayers( &self, player: &GKPlayer, player_i_ds_to_invite: &NSArray<NSString>, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKBasePlayer and GKPlayer only.
  • This method is obsolete. It will never be invoked and its implementation does nothing**

Trait Implementations§

Source§

impl ProtocolType for dyn GKInviteEventListener

Source§

const NAME: &'static str = "GKInviteEventListener"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn GKInviteEventListener

Implementations on Foreign Types§

Source§

impl<T> GKInviteEventListener for ProtocolObject<T>

Implementors§