GKChallengeListener

Trait GKChallengeListener 

Source
pub unsafe trait GKChallengeListener: NSObjectProtocol {
    // Provided methods
    unsafe fn player_wantsToPlayChallenge(
        &self,
        player: &GKPlayer,
        challenge: &GKChallenge,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_didReceiveChallenge(
        &self,
        player: &GKPlayer,
        challenge: &GKChallenge,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_didCompleteChallenge_issuedByFriend(
        &self,
        player: &GKPlayer,
        challenge: &GKChallenge,
        friend_player: &GKPlayer,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_issuedChallengeWasCompleted_byFriend(
        &self,
        player: &GKPlayer,
        challenge: &GKChallenge,
        friend_player: &GKPlayer,
    )
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature GKEventListener only.
Expand description

Provided Methods§

Source

unsafe fn player_wantsToPlayChallenge( &self, player: &GKPlayer, challenge: &GKChallenge, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKBasePlayer and GKChallenge and GKPlayer only.

Called when a player starts the game with the intent of playing a challenge, or intends to play a challenge after selecting it within the in-game Game Center UI. player: The player who selected the challenge challenge: The challenge which was selected

Source

unsafe fn player_didReceiveChallenge( &self, player: &GKPlayer, challenge: &GKChallenge, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKBasePlayer and GKChallenge and GKPlayer only.

Called when a player has received a challenge, triggered by a push notification from the server. Received only while the game is running. player: The player who received the challenge challenge: The challenge which was received

Source

unsafe fn player_didCompleteChallenge_issuedByFriend( &self, player: &GKPlayer, challenge: &GKChallenge, friend_player: &GKPlayer, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKBasePlayer and GKChallenge and GKPlayer only.

Called when a player has completed a challenge, triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who completed the challenge challenge: The challenge which the player completed friendPlayer: The friend who sent the challenge originally

Source

unsafe fn player_issuedChallengeWasCompleted_byFriend( &self, player: &GKPlayer, challenge: &GKChallenge, friend_player: &GKPlayer, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKBasePlayer and GKChallenge and GKPlayer only.

Called when a player’s friend has completed a challenge which the player sent to that friend. Triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who sent the challenge originally challenge: The challenge which the player created and sent friendPlayer: The friend who completed the challenge

Trait Implementations§

Source§

impl ProtocolType for dyn GKChallengeListener

Source§

const NAME: &'static str = "GKChallengeListener"

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 GKChallengeListener

Implementations on Foreign Types§

Source§

impl<T> GKChallengeListener for ProtocolObject<T>

Implementors§