pub unsafe trait GKMatchmakerViewControllerDelegate: NSObjectProtocol {
// Provided methods
unsafe fn matchmakerViewControllerWasCancelled(
&self,
view_controller: &GKMatchmakerViewController,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_didFailWithError(
&self,
view_controller: &GKMatchmakerViewController,
error: &NSError,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_didFindMatch(
&self,
view_controller: &GKMatchmakerViewController,
match: &GKMatch,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_didFindHostedPlayers(
&self,
view_controller: &GKMatchmakerViewController,
players: &NSArray<GKPlayer>,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_hostedPlayerDidAccept(
&self,
view_controller: &GKMatchmakerViewController,
player: &GKPlayer,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_getMatchPropertiesForRecipient_withCompletionHandler(
&self,
view_controller: &GKMatchmakerViewController,
recipient: &GKPlayer,
completion_handler: &DynBlock<dyn Fn(NonNull<GKMatchProperties>)>,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_didFindPlayers(
&self,
view_controller: &GKMatchmakerViewController,
player_i_ds: &NSArray<NSString>,
)
where Self: Sized + Message { ... }
unsafe fn matchmakerViewController_didReceiveAcceptFromHostedPlayer(
&self,
view_controller: &GKMatchmakerViewController,
player_id: &NSString,
)
where Self: Sized + Message { ... }
}Available on crate feature
GKMatchmakerViewController only.Expand description
Provided Methods§
Sourceunsafe fn matchmakerViewControllerWasCancelled(
&self,
view_controller: &GKMatchmakerViewController,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewControllerWasCancelled( &self, view_controller: &GKMatchmakerViewController, )
objc2-app-kit and macOS only.The user has cancelled matchmaking
Sourceunsafe fn matchmakerViewController_didFailWithError(
&self,
view_controller: &GKMatchmakerViewController,
error: &NSError,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_didFailWithError( &self, view_controller: &GKMatchmakerViewController, error: &NSError, )
objc2-app-kit and macOS only.Matchmaking has failed with an error
Sourceunsafe fn matchmakerViewController_didFindMatch(
&self,
view_controller: &GKMatchmakerViewController,
match: &GKMatch,
)
Available on crate feature GKMatch and crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_didFindMatch( &self, view_controller: &GKMatchmakerViewController, match: &GKMatch, )
GKMatch and crate feature objc2-app-kit and macOS only.A peer-to-peer match has been found, the game should start
Sourceunsafe fn matchmakerViewController_didFindHostedPlayers(
&self,
view_controller: &GKMatchmakerViewController,
players: &NSArray<GKPlayer>,
)
Available on crate feature GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_didFindHostedPlayers( &self, view_controller: &GKMatchmakerViewController, players: &NSArray<GKPlayer>, )
GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.Players have been found for a server-hosted game, the game should start
Sourceunsafe fn matchmakerViewController_hostedPlayerDidAccept(
&self,
view_controller: &GKMatchmakerViewController,
player: &GKPlayer,
)
Available on crate feature GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_hostedPlayerDidAccept( &self, view_controller: &GKMatchmakerViewController, player: &GKPlayer, )
GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.An invited player has accepted a hosted invite. Apps should connect through the hosting server and then update the player’s connected state (using setConnected:forHostedPlayer:)
Sourceunsafe fn matchmakerViewController_getMatchPropertiesForRecipient_withCompletionHandler(
&self,
view_controller: &GKMatchmakerViewController,
recipient: &GKPlayer,
completion_handler: &DynBlock<dyn Fn(NonNull<GKMatchProperties>)>,
)
Available on crate feature GKBasePlayer and crate feature GKDefines and crate feature GKPlayer and crate feature block2 and crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_getMatchPropertiesForRecipient_withCompletionHandler( &self, view_controller: &GKMatchmakerViewController, recipient: &GKPlayer, completion_handler: &DynBlock<dyn Fn(NonNull<GKMatchProperties>)>, )
GKBasePlayer and crate feature GKDefines and crate feature GKPlayer and crate feature block2 and crate feature objc2-app-kit and macOS only.The game should provide GKMatchProperties for the GKPlayer that has been invited.
If implemented, this function must call completionHandler: failing to do so will hang matchmaking.
Sourceunsafe fn matchmakerViewController_didFindPlayers(
&self,
view_controller: &GKMatchmakerViewController,
player_i_ds: &NSArray<NSString>,
)
👎DeprecatedAvailable on crate feature objc2-app-kit and macOS only.
unsafe fn matchmakerViewController_didFindPlayers( &self, view_controller: &GKMatchmakerViewController, player_i_ds: &NSArray<NSString>, )
objc2-app-kit and macOS only.- These protocol methods are obsoleted. They will never be invoked and their implementation does nothing**
unsafe fn matchmakerViewController_didReceiveAcceptFromHostedPlayer( &self, view_controller: &GKMatchmakerViewController, player_id: &NSString, )
👎Deprecated
Available on crate feature
objc2-app-kit and macOS only.