Instance Method

issueChallenge(toPlayers:message:)

Issues a score challenge to a set of players.

Declaration

func issueChallenge(toPlayers playerIDs: [String]?, message: String?)

Parameters

playerIDs

An array of NSString objects that contains the player identifiers for the players to challenge.

message

A text message to display to the players.

Discussion

Your game should only issue a challenge request in direct response to a player action. That is, your game should provide a user interface that allows the player to choose to issue a challenge and choose which friends will receive the challenge, and only issue a challenge when the player wishes to do so.

See Also

Deprecated Methods and Properties

var category: String?

The leaderboard that this score belongs to.

Deprecated
func challengeComposeController(withPlayers: [String]?, message: String?, completionHandler: GKChallengeComposeCompletionBlock?) -> UIViewController?

Provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message.

Deprecated
init(category: String?)

Returns an initialized score object.

Deprecated
init(leaderboardIdentifier: String, forPlayer: String)

Returns an initialized score object for the specified leaderboard and player.

Deprecated
var playerID: String

The player identifier for the player that earned the score.

Deprecated
func report(completionHandler: ((Error?) -> Void)?)

Reports a score to Game Center.

Deprecated