GKSavedGameListener

Trait GKSavedGameListener 

Source
pub unsafe trait GKSavedGameListener: NSObjectProtocol {
    // Provided methods
    unsafe fn player_didModifySavedGame(
        &self,
        player: &GKPlayer,
        saved_game: &GKSavedGame,
    )
       where Self: Sized + Message { ... }
    unsafe fn player_hasConflictingSavedGames(
        &self,
        player: &GKPlayer,
        saved_games: &NSArray<GKSavedGame>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature GKSavedGameListener only.
Expand description

Provided Methods§

Source

unsafe fn player_didModifySavedGame( &self, player: &GKPlayer, saved_game: &GKSavedGame, )
where Self: Sized + Message,

Available on crate features GKBasePlayer and GKPlayer and GKSavedGame only.

Called when a player’s saved game data has been modified.

Source

unsafe fn player_hasConflictingSavedGames( &self, player: &GKPlayer, saved_games: &NSArray<GKSavedGame>, )
where Self: Sized + Message,

Available on crate features GKBasePlayer and GKPlayer and GKSavedGame only.

Called when a conflict has arisen between different versions of the same saved game. This can happen when multiple devices write to the same saved game while one or more is offline. The application should determine the correct data to use, then call resolveConflictingSavedGames:withData:completionHandler:. This may require data merging or asking the user.

Trait Implementations§

Source§

impl ProtocolType for dyn GKSavedGameListener

Source§

const NAME: &'static str = "GKSavedGameListener"

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 GKSavedGameListener

Implementations on Foreign Types§

Source§

impl<T> GKSavedGameListener for ProtocolObject<T>

Implementors§

Source§

impl GKSavedGameListener for GKLocalPlayer

Available on crate feature GKSavedGame only.