Package apple.gamekit
Class GKLocalPlayer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.gamekit.GKBasePlayer
-
- apple.gamekit.GKPlayer
-
- apple.gamekit.GKLocalPlayer
-
- All Implemented Interfaces:
GKSavedGameListener,NSObject
public class GKLocalPlayer extends GKPlayer implements GKSavedGameListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.gamekit.GKPlayer
GKPlayer.Block_loadPhotoForSizeWithCompletionHandler, GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandler
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGKLocalPlayer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static GKLocalPlayeralloc()static GKLocalPlayerallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static @NotNull GKLocalPlayeranonymousGuestPlayerWithIdentifier(@NotNull java.lang.String guestIdentifier)@Nullable GKLocalPlayer.Block_authenticateHandler_retauthenticateHandler()API-Since: 6.0voidauthenticateWithCompletionHandler(@Nullable GKLocalPlayer.Block_authenticateWithCompletionHandler completionHandler)Deprecated.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()voiddeleteSavedGamesWithNameCompletionHandler(@NotNull java.lang.String name, @Nullable GKLocalPlayer.Block_deleteSavedGamesWithNameCompletionHandler handler)Asynchronously delete saved games with the given name.static java.lang.Stringdescription_static()voidfetchItemsForIdentityVerificationSignature(@Nullable GKLocalPlayer.Block_fetchItemsForIdentityVerificationSignature completionHandler)Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1.voidfetchSavedGamesWithCompletionHandler(@Nullable GKLocalPlayer.Block_fetchSavedGamesWithCompletionHandler handler)Asynchronously fetch saved games.@Nullable NSArray<java.lang.String>friends()Deprecated.voidgenerateIdentityVerificationSignatureWithCompletionHandler(@Nullable GKLocalPlayer.Block_generateIdentityVerificationSignatureWithCompletionHandler completionHandler)Deprecated.static longhash_static()GKLocalPlayerinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisAuthenticated()Authentication statebooleanisMultiplayerGamingRestricted()A Boolean value that declares whether or not multiplayer gaming is restricted on this device.booleanisPersonalizedCommunicationRestricted()A Boolean value that declares whether personalized communication is restricted on this device.booleanisPresentingFriendRequestViewController()observable property that becomes true when the friend request view controller is displayed.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleanisUnderage()Indicates if a player is under agestatic @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)voidloadChallengableFriendsWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadChallengableFriendsWithCompletionHandler completionHandler)Asynchronously load the challengable friends list as an array of GKPlayer.voidloadDefaultLeaderboardCategoryIDWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadDefaultLeaderboardCategoryIDWithCompletionHandler completionHandler)Deprecated.voidloadDefaultLeaderboardIdentifierWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadDefaultLeaderboardIdentifierWithCompletionHandler completionHandler)Load the default leaderboard identifier for the local player Possible reasons for error: 1.voidloadFriendPlayersWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadFriendPlayersWithCompletionHandler completionHandler)Deprecated.voidloadFriends(@NotNull GKLocalPlayer.Block_loadFriends completionHandler)* loadFriends: * * Discussion: * Calling this method will asynchronously load the player Game Center's * friend list scoped to the calling application.voidloadFriendsAuthorizationStatus(@NotNull GKLocalPlayer.Block_loadFriendsAuthorizationStatus completionHandler)loadFriendsAuthorizationStatus: Discussion: Calling this will asynchronously load the current friend list authorization status of calling application.voidloadFriendsWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadFriendsWithCompletionHandler completionHandler)Deprecated.voidloadFriendsWithIdentifiersCompletionHandler(@NotNull NSArray<java.lang.String> identifiers, @NotNull GKLocalPlayer.Block_loadFriendsWithIdentifiersCompletionHandler completionHandler)loadFriendsWithIdentifiers:completionHandler: Discussion: Calling this method will asynchronously return a list of GKPlayers to the provided scoped identifiers (gamePlayerID or teamPlayerID) that you can use to interact with GameKit framework.static voidloadPlayersForIdentifiersWithCompletionHandler(@NotNull NSArray<java.lang.String> identifiers, GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandler completionHandler)Deprecated.voidloadRecentPlayersWithCompletionHandler(@Nullable GKLocalPlayer.Block_loadRecentPlayersWithCompletionHandler completionHandler)Asynchronously load the recent players list as an array of GKPlayer.static @NotNull GKLocalPlayerlocal()Obtain the primary GKLocalPlayer object.static @NotNull GKLocalPlayerlocalPlayer()static GKLocalPlayernew_objc()voidplayerDidModifySavedGame(@NotNull GKPlayer player, @NotNull GKSavedGame savedGame)Called when a player’s saved game data has been modified.voidplayerHasConflictingSavedGames(@NotNull GKPlayer player, @NotNull NSArray<? extends GKSavedGame> savedGames)Called when a conflict has arisen between different versions of the same saved game.booleanpresentFriendRequestCreatorFromViewControllerError(@NotNull UIViewController viewController, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)presentFriendRequestCreatorFromViewController: Discussion: iOS only.voidregisterListener(@NotNull GKLocalPlayerListener listener)A single listener may be registered once.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)voidresolveConflictingSavedGamesWithDataCompletionHandler(@NotNull NSArray<? extends GKSavedGame> conflictingSavedGames, @NotNull NSData data, @Nullable GKLocalPlayer.Block_resolveConflictingSavedGamesWithDataCompletionHandler handler)Asynchronously resolve a saved game conflict.static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsaveGameDataWithNameCompletionHandler(@NotNull NSData data, @NotNull java.lang.String name, @Nullable GKLocalPlayer.Block_saveGameDataWithNameCompletionHandler handler)Asynchronously save game data.voidsetAuthenticateHandler(@Nullable GKLocalPlayer.Block_setAuthenticateHandler value)API-Since: 6.0voidsetDefaultLeaderboardCategoryIDCompletionHandler(@Nullable java.lang.String categoryID, @Nullable GKLocalPlayer.Block_setDefaultLeaderboardCategoryIDCompletionHandler completionHandler)Deprecated.voidsetDefaultLeaderboardIdentifierCompletionHandler(@NotNull java.lang.String leaderboardIdentifier, @Nullable GKLocalPlayer.Block_setDefaultLeaderboardIdentifierCompletionHandler completionHandler)Set the default leaderboard for the current game Possible reasons for error: 1.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()voidunregisterAllListeners()API-Since: 7.0voidunregisterListener(@NotNull GKLocalPlayerListener listener)API-Since: 7.0static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.gamekit.GKPlayer
alias, displayName, gamePlayerID, guestIdentifier, isFriend, isInvitable, loadPhotoForSizeWithCompletionHandler, playerID, scopedIDsArePersistent, teamPlayerID
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static GKLocalPlayer alloc()
-
allocWithZone
public static GKLocalPlayer allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
anonymousGuestPlayerWithIdentifier
@NotNull public static @NotNull GKLocalPlayer anonymousGuestPlayerWithIdentifier(@NotNull @NotNull java.lang.String guestIdentifier)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull 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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
loadPlayersForIdentifiersWithCompletionHandler
@Deprecated public static void loadPlayersForIdentifiersWithCompletionHandler(@NotNull @NotNull NSArray<java.lang.String> identifiers, @Nullable GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandler completionHandler)Deprecated.
-
localPlayer
@NotNull public static @NotNull GKLocalPlayer localPlayer()
-
new_objc
public static GKLocalPlayer 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()
-
authenticateHandler
@Nullable public @Nullable GKLocalPlayer.Block_authenticateHandler_ret authenticateHandler()
API-Since: 6.0
-
authenticateWithCompletionHandler
@Deprecated public void authenticateWithCompletionHandler(@Nullable @Nullable GKLocalPlayer.Block_authenticateWithCompletionHandler completionHandler)Deprecated.API-Since: 4.1 Deprecated-Since: 6.0
-
deleteSavedGamesWithNameCompletionHandler
public void deleteSavedGamesWithNameCompletionHandler(@NotNull @NotNull java.lang.String name, @Nullable @Nullable GKLocalPlayer.Block_deleteSavedGamesWithNameCompletionHandler handler)Asynchronously delete saved games with the given name. The completion handler will indicate whether or not the deletion was successful. API-Since: 8.0
-
fetchSavedGamesWithCompletionHandler
public void fetchSavedGamesWithCompletionHandler(@Nullable @Nullable 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. API-Since: 8.0
-
friends
@Nullable @Deprecated public @Nullable NSArray<java.lang.String> friends()
Deprecated.Array of player identifiers of friends for the local player. Not valid until loadFriendsWithCompletionHandler: has completed. API-Since: 4.1 Deprecated-Since: 8.0
-
generateIdentityVerificationSignatureWithCompletionHandler
@Deprecated public void generateIdentityVerificationSignatureWithCompletionHandler(@Nullable @Nullable GKLocalPlayer.Block_generateIdentityVerificationSignatureWithCompletionHandler completionHandler)Deprecated.Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player API-Since: 7.0 Deprecated-Since: 13.5
-
init
public GKLocalPlayer init()
-
isAuthenticated
public boolean isAuthenticated()
Authentication state
-
isUnderage
public boolean isUnderage()
Indicates if a player is under age
-
loadDefaultLeaderboardCategoryIDWithCompletionHandler
@Deprecated public void loadDefaultLeaderboardCategoryIDWithCompletionHandler(@Nullable @Nullable GKLocalPlayer.Block_loadDefaultLeaderboardCategoryIDWithCompletionHandler completionHandler)Deprecated.API-Since: 6.0 Deprecated-Since: 7.0
-
loadDefaultLeaderboardIdentifierWithCompletionHandler
public void loadDefaultLeaderboardIdentifierWithCompletionHandler(@Nullable @Nullable 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 API-Since: 7.0
-
loadFriendPlayersWithCompletionHandler
@Deprecated public void loadFriendPlayersWithCompletionHandler(@Nullable @Nullable GKLocalPlayer.Block_loadFriendPlayersWithCompletionHandler completionHandler)Deprecated.API-Since: 8.0 Deprecated-Since: 10.0
-
loadFriendsWithCompletionHandler
@Deprecated public void loadFriendsWithCompletionHandler(@Nullable @Nullable GKLocalPlayer.Block_loadFriendsWithCompletionHandler completionHandler)Deprecated.This method is obsolete. It will never be invoked and its implementation does nothing** API-Since: 4.1 Deprecated-Since: 8.0
-
loadRecentPlayersWithCompletionHandler
public void loadRecentPlayersWithCompletionHandler(@Nullable @Nullable 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 API-Since: 10.0
-
playerDidModifySavedGame
public void playerDidModifySavedGame(@NotNull @NotNull GKPlayer player, @NotNull @NotNull GKSavedGame savedGame)Description copied from interface:GKSavedGameListenerCalled when a player’s saved game data has been modified. API-Since: 8.0- Specified by:
playerDidModifySavedGamein interfaceGKSavedGameListener
-
playerHasConflictingSavedGames
public void playerHasConflictingSavedGames(@NotNull @NotNull GKPlayer player, @NotNull @NotNull NSArray<? extends GKSavedGame> savedGames)Description copied from interface:GKSavedGameListenerCalled 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. API-Since: 8.0- Specified by:
playerHasConflictingSavedGamesin interfaceGKSavedGameListener
-
registerListener
public void registerListener(@NotNull @NotNull 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. API-Since: 7.0
-
resolveConflictingSavedGamesWithDataCompletionHandler
public void resolveConflictingSavedGamesWithDataCompletionHandler(@NotNull @NotNull NSArray<? extends GKSavedGame> conflictingSavedGames, @NotNull @NotNull NSData data, @Nullable @Nullable 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. API-Since: 8.0
-
saveGameDataWithNameCompletionHandler
public void saveGameDataWithNameCompletionHandler(@NotNull @NotNull NSData data, @NotNull @NotNull java.lang.String name, @Nullable @Nullable 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. API-Since: 8.0
-
setAuthenticateHandler
public void setAuthenticateHandler(@Nullable @Nullable GKLocalPlayer.Block_setAuthenticateHandler value)API-Since: 6.0
-
setDefaultLeaderboardCategoryIDCompletionHandler
@Deprecated public void setDefaultLeaderboardCategoryIDCompletionHandler(@Nullable @Nullable java.lang.String categoryID, @Nullable @Nullable GKLocalPlayer.Block_setDefaultLeaderboardCategoryIDCompletionHandler completionHandler)Deprecated.API-Since: 6.0 Deprecated-Since: 7.0
-
setDefaultLeaderboardIdentifierCompletionHandler
public void setDefaultLeaderboardIdentifierCompletionHandler(@NotNull @NotNull java.lang.String leaderboardIdentifier, @Nullable @Nullable 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 API-Since: 7.0
-
unregisterAllListeners
public void unregisterAllListeners()
API-Since: 7.0
-
unregisterListener
public void unregisterListener(@NotNull @NotNull GKLocalPlayerListener listener)API-Since: 7.0
-
isMultiplayerGamingRestricted
public boolean isMultiplayerGamingRestricted()
A Boolean value that declares whether or not multiplayer gaming is restricted on this device. API-Since: 13.0
-
loadChallengableFriendsWithCompletionHandler
public void loadChallengableFriendsWithCompletionHandler(@Nullable @Nullable 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
@NotNull public static @NotNull 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. API-Since: 13.0
-
fetchItemsForIdentityVerificationSignature
public void fetchItemsForIdentityVerificationSignature(@Nullable @Nullable 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 API-Since: 13.5
-
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. API-Since: 14.0
-
isPresentingFriendRequestViewController
public boolean isPresentingFriendRequestViewController()
observable property that becomes true when the friend request view controller is displayed. It becomes false when it is dismissed API-Since: 15.0
-
loadFriends
public void loadFriends(@NotNull @NotNull GKLocalPlayer.Block_loadFriends completionHandler)* loadFriends: * * Discussion: * Calling this method will asynchronously load the player Game Center's * friend list scoped to the calling application. * Calls handler when finished. * * When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusNotDetermined or * GKFriendsAuthorizationStatusRemoved, calling this method will trigger a * prompt to request friend list authorization from the user. * * When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusAuthorized, * This method will return an array of GKPlayers which have agreed to share their * friend list with the calling application based on the same bundleID. * * The NSGKFriendListUsageDescription key must be specified in your * Info.plist; otherwise, GKErrorFriendListUsageDescriptionMissing will be returned, * as your app will be assumed not to support friend list. * Possible reasons for error: * - Communication error with server. * - AuthorizationStatus != GKFriendsAuthorizationStatusAuthorized * - NSGKFriendListUsageDescription missing from your Info.plist * - User is not online * - Unauthenticated player API-Since: 14.5
-
loadFriendsAuthorizationStatus
public void loadFriendsAuthorizationStatus(@NotNull @NotNull GKLocalPlayer.Block_loadFriendsAuthorizationStatus completionHandler)loadFriendsAuthorizationStatus: Discussion: Calling this will asynchronously load the current friend list authorization status of calling application. There may be an server call involve so there could be some slight delay in getting the authorization status via handler block. Calls handler when finished. Error will be nil on success. Possible reasons for error: - Communication error with server. - NSGKFriendListUsageDescription missing from your Info.plist - User is not online - Unauthenticated player API-Since: 14.5
-
loadFriendsWithIdentifiersCompletionHandler
public void loadFriendsWithIdentifiersCompletionHandler(@NotNull @NotNull NSArray<java.lang.String> identifiers, @NotNull @NotNull GKLocalPlayer.Block_loadFriendsWithIdentifiersCompletionHandler completionHandler)loadFriendsWithIdentifiers:completionHandler: Discussion: Calling this method will asynchronously return a list of GKPlayers to the provided scoped identifiers (gamePlayerID or teamPlayerID) that you can use to interact with GameKit framework. Calls handler when finished. When -loadFriendsAuthorizationStatus == GKFriendsAuthorizationStatusNotDetermined or GKFriendsAuthorizationStatusRemoved, calling this method will trigger a prompt to request friend list authorization from the user. This method accepts gamePlayerID or teamPlayerID, and if the identifier is valid, we will return a GKPlayer object correspond to that identifier. No GKPlayer object will be returned for invalid identifiers. If all supplied identifiers are invalid, and empty array will be returned. If a player's friend revoke the friend list authorization for your application, we will no longer return the GKPlayer object and you should delete the data you've collected for the player with gamePlayerID or teamPlayerID on your end. Possible reasons for error: - Communication error with server. - AuthorizationStatus != GKFriendsAuthorizationStatusAuthorized - NSGKFriendListUsageDescription missing from your Info.plist - Unauthenticated player - User is not online API-Since: 14.5
-
presentFriendRequestCreatorFromViewControllerError
public boolean presentFriendRequestCreatorFromViewControllerError(@NotNull @NotNull UIViewController viewController, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)presentFriendRequestCreatorFromViewController: Discussion: iOS only. When invoked, a Messages sheet will be presented on the viewController passed in, using the existing flow of presentation on behalf of an application. If an error is returned, control are returned directly to the application, without presentation. Possible reasons for error: - The local player user account is not allowed to add friends - The device is not allowing outgoing traffic at the time of the operation API-Since: 15.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-