Class GKPlayer

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol
Direct Known Subclasses:
GKLocalPlayer

public class GKPlayer
extends NSObject
  • Constructor Details

  • Method Details

    • getGamePlayerID

      public String getGamePlayerID()
      Since:
      Available in iOS 12.4 and later.
    • getTeamPlayerID

      public String getTeamPlayerID()
      Since:
      Available in iOS 12.4 and later.
    • getDisplayName

      public String getDisplayName()
    • getAlias

      public String getAlias()
    • getGuestIdentifier

      public String getGuestIdentifier()
      Since:
      Available in iOS 9.0 and later.
    • isInvitable

      public boolean isInvitable()
      Since:
      Available in iOS 14.0 and later.
    • isFriend

      @Deprecated public boolean isFriend()
      Deprecated.
      Deprecated in iOS 8.0. use -[GKLocalPlayer loadFriendPlayers...]
    • getPlayerID

      @Deprecated public String getPlayerID()
      Deprecated.
      Deprecated in iOS 13.0. use the teamPlayerID property to identify a player
    • IDNoLongerAvailable

      public static NSString IDNoLongerAvailable()
      Since:
      Available in iOS 14.0 and later.
    • DidChangeNotification

      public static NSString DidChangeNotification()
    • scopedIDsArePersistent

      public boolean scopedIDsArePersistent()
      Since:
      Available in iOS 13.0 and later.
    • getAnonymousGuestPlayer

      public static GKPlayer getAnonymousGuestPlayer​(String guestIdentifier)
      Since:
      Available in iOS 9.0 and later.
    • loadPhoto

      public void loadPhoto​(GKPhotoSize size, VoidBlock2<UIImage,​NSError> completionHandler)
    • loadPlayers

      @Deprecated public static void loadPlayers​(List<String> identifiers, VoidBlock2<NSArray<GKPlayer>,​NSError> completionHandler)
      Deprecated.
      Deprecated in iOS 14.5. use GKLocalPlayer.loadFriendsWithIdentifiers to load a friend's GKPlayer object.