Thursday, 15 March 2012

swift - playerID was deprecated in IOS 8: use player -


I have this game center function that was used to watch the players. Recently I have downloaded the Xcode 6.3 - Beta 3.

This function is:

  Funk Lookup Player () {player id = match.player.map {($ 0 as! GKPlayer) .playerID} GKPlayer.loadPlayersForIdentifiers (player ID) {(player, error) - & gt; Error if error! = Zero {println ("Error in retrieving player information: \ (error.localizedDescription)") self.matchStarted = false self.delegate ?. Match match ()} {player for player in {println ("Player found: \ (Player.alias)"). Self player Player [player.playerid] = Player // use player} self.matchStarted = true GKMatchmaker.sharedMatchmaker (). FinishMatchmakingForMatch (self.match) self.delegate? .matchStarted ()}}}  

Xcode now flags a warning that says "The player was used in IIS 8: Use the player"

< P> Does anyone help me modify the code to remove the warning? I do not understand what should be changed.

Try to do this, it seems that the GCplayer is not being registered correctly

  players as player! [GKplayer] {println ("Miley Player: \ (player. Lions)") Self. Player [player.playerid] = player // user player}  

No comments:

Post a Comment