Package apple.gamekit

Class GKLocalPlayer

    • Constructor Detail

      • GKLocalPlayer

        protected GKLocalPlayer​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • anonymousGuestPlayerWithIdentifier

        public static java.lang.Object anonymousGuestPlayerWithIdentifier​(java.lang.String guestIdentifier)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • deleteSavedGamesWithNameCompletionHandler

        public void deleteSavedGamesWithNameCompletionHandler​(java.lang.String name,
                                                              GKLocalPlayer.Block_deleteSavedGamesWithNameCompletionHandler handler)
        Asynchronously delete saved games with the given name. The completion handler will indicate whether or not the deletion was successful.
      • fetchSavedGamesWithCompletionHandler

        public void fetchSavedGamesWithCompletionHandler​(GKLocalPlayer.Block_fetchSavedGamesWithCompletionHandler handler)
        Asynchronously fetch saved games. The handler is called with an array of GKSavedGame objects or an error. If there is more than one saved game with the same name then a conflict exists. The application should determine the correct data to use and call resolveConflictingSavedGames:withData:completionHandler:. This may require data merging or asking the user.
      • friends

        @Deprecated
        public NSArray<java.lang.String> friends()
        Deprecated.
        Array of player identifiers of friends for the local player. Not valid until loadFriendsWithCompletionHandler: has completed.
      • generateIdentityVerificationSignatureWithCompletionHandler

        public void generateIdentityVerificationSignatureWithCompletionHandler​(GKLocalPlayer.Block_generateIdentityVerificationSignatureWithCompletionHandler completionHandler)
        Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player
      • isAuthenticated

        public boolean isAuthenticated()
        Authentication state
      • isUnderage

        public boolean isUnderage()
        Indicates if a player is under age
      • loadDefaultLeaderboardIdentifierWithCompletionHandler

        public void loadDefaultLeaderboardIdentifierWithCompletionHandler​(GKLocalPlayer.Block_loadDefaultLeaderboardIdentifierWithCompletionHandler completionHandler)
        Load the default leaderboard identifier for the local player Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
      • loadFriendsWithCompletionHandler

        @Deprecated
        public void loadFriendsWithCompletionHandler​(GKLocalPlayer.Block_loadFriendsWithCompletionHandler completionHandler)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing**
      • loadRecentPlayersWithCompletionHandler

        public void loadRecentPlayersWithCompletionHandler​(GKLocalPlayer.Block_loadRecentPlayersWithCompletionHandler completionHandler)
        Asynchronously load the recent players list as an array of GKPlayer. A recent player is someone that you have played a game with or is a legacy game center friend. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
      • playerHasConflictingSavedGames

        public void playerHasConflictingSavedGames​(GKPlayer player,
                                                   NSArray<? extends GKSavedGame> savedGames)
        Description copied from interface: GKSavedGameListener
        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.
        Specified by:
        playerHasConflictingSavedGames in interface GKSavedGameListener
      • registerListener

        public void registerListener​(GKLocalPlayerListener listener)
        A single listener may be registered once. Registering multiple times results in undefined behavior. The registered listener will receive callbacks for any selector it responds to.
      • resolveConflictingSavedGamesWithDataCompletionHandler

        public void resolveConflictingSavedGamesWithDataCompletionHandler​(NSArray<? extends GKSavedGame> conflictingSavedGames,
                                                                          NSData data,
                                                                          GKLocalPlayer.Block_resolveConflictingSavedGamesWithDataCompletionHandler handler)
        Asynchronously resolve a saved game conflict. This deletes all versions included in conflictingSavedGames and creates a new version with the given data. The completion handler is called with the newly created save and all other remaining versions or an error.
      • saveGameDataWithNameCompletionHandler

        public void saveGameDataWithNameCompletionHandler​(NSData data,
                                                          java.lang.String name,
                                                          GKLocalPlayer.Block_saveGameDataWithNameCompletionHandler handler)
        Asynchronously save game data. If a saved game with that name already exists it is overwritten, otherwise a new one is created. The completion handler is called with the new / modified GKSavedGame or an error. If the saved game was in conflict then the overwritten version will be the one with the same deviceName if present, otherwise the most recent overall.
      • setDefaultLeaderboardIdentifierCompletionHandler

        public void setDefaultLeaderboardIdentifierCompletionHandler​(java.lang.String leaderboardIdentifier,
                                                                     GKLocalPlayer.Block_setDefaultLeaderboardIdentifierCompletionHandler completionHandler)
        Set the default leaderboard for the current game Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
      • unregisterAllListeners

        public void unregisterAllListeners()
      • isMultiplayerGamingRestricted

        public boolean isMultiplayerGamingRestricted()
        A Boolean value that declares whether or not multiplayer gaming is restricted on this device.
      • loadChallengableFriendsWithCompletionHandler

        public void loadChallengableFriendsWithCompletionHandler​(GKLocalPlayer.Block_loadChallengableFriendsWithCompletionHandler completionHandler)
        Asynchronously load the challengable friends list as an array of GKPlayer. A challengable player is a friend player with friend level FL1 and FL2. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
      • local

        public static GKLocalPlayer local()
        Obtain the primary GKLocalPlayer object. The player is only available for offline play until logged in. A temporary player is created if no account is set up.
      • fetchItemsForIdentityVerificationSignature

        public void fetchItemsForIdentityVerificationSignature​(GKLocalPlayer.Block_fetchItemsForIdentityVerificationSignature completionHandler)
        Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player
      • isPersonalizedCommunicationRestricted

        public boolean isPersonalizedCommunicationRestricted()
        A Boolean value that declares whether personalized communication is restricted on this device. If it is restricted, the player will not be able to read or write personalized messages on game invites, challenges, or enable voice communication in multiplayer games. Note: this value will always be true when isUnderage is true.