public class GKLocalPlayer extends GKPlayer implements GKSavedGameListener
GKPlayer.Block_loadPhotoForSizeWithCompletionHandler, GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandlerNSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
GKLocalPlayer(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static GKLocalPlayer |
alloc() |
static GKLocalPlayer |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static GKLocalPlayer |
anonymousGuestPlayerWithIdentifier(java.lang.String guestIdentifier) |
GKLocalPlayer.Block_authenticateHandler_ret |
authenticateHandler() |
void |
authenticateWithCompletionHandler(GKLocalPlayer.Block_authenticateWithCompletionHandler completionHandler)
Deprecated.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
void |
deleteSavedGamesWithNameCompletionHandler(java.lang.String name,
GKLocalPlayer.Block_deleteSavedGamesWithNameCompletionHandler handler)
Asynchronously delete saved games with the given name.
|
static java.lang.String |
description_static() |
void |
fetchItemsForIdentityVerificationSignature(GKLocalPlayer.Block_fetchItemsForIdentityVerificationSignature completionHandler)
Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer
Possible reasons for error:
1.
|
void |
fetchSavedGamesWithCompletionHandler(GKLocalPlayer.Block_fetchSavedGamesWithCompletionHandler handler)
Asynchronously fetch saved games.
|
NSArray<java.lang.String> |
friends()
Deprecated.
|
void |
generateIdentityVerificationSignatureWithCompletionHandler(GKLocalPlayer.Block_generateIdentityVerificationSignatureWithCompletionHandler completionHandler)
Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer
Possible reasons for error:
1.
|
static long |
hash_static() |
GKLocalPlayer |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isAuthenticated()
Authentication state
|
boolean |
isMultiplayerGamingRestricted()
A Boolean value that declares whether or not multiplayer gaming is restricted on this device.
|
boolean |
isPersonalizedCommunicationRestricted()
A Boolean value that declares whether personalized communication is restricted on this device.
|
boolean |
isPresentingFriendRequestViewController()
observable property that becomes true when the friend request view controller is displayed.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
boolean |
isUnderage()
Indicates if a player is under age
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
void |
loadChallengableFriendsWithCompletionHandler(GKLocalPlayer.Block_loadChallengableFriendsWithCompletionHandler completionHandler)
Asynchronously load the challengable friends list as an array of GKPlayer.
|
void |
loadDefaultLeaderboardCategoryIDWithCompletionHandler(GKLocalPlayer.Block_loadDefaultLeaderboardCategoryIDWithCompletionHandler completionHandler)
Deprecated.
|
void |
loadDefaultLeaderboardIdentifierWithCompletionHandler(GKLocalPlayer.Block_loadDefaultLeaderboardIdentifierWithCompletionHandler completionHandler)
Load the default leaderboard identifier for the local player
Possible reasons for error:
1.
|
void |
loadFriendPlayersWithCompletionHandler(GKLocalPlayer.Block_loadFriendPlayersWithCompletionHandler completionHandler) |
void |
loadFriends(GKLocalPlayer.Block_loadFriends completionHandler)
* loadFriends:
*
* Discussion:
* Calling this method will asynchronously load the player Game Center's
* friend list scoped to the calling application.
|
void |
loadFriendsAuthorizationStatus(GKLocalPlayer.Block_loadFriendsAuthorizationStatus completionHandler)
loadFriendsAuthorizationStatus:
|
void |
loadFriendsWithCompletionHandler(GKLocalPlayer.Block_loadFriendsWithCompletionHandler completionHandler)
Deprecated.
|
void |
loadFriendsWithIdentifiersCompletionHandler(NSArray<java.lang.String> identifiers,
GKLocalPlayer.Block_loadFriendsWithIdentifiersCompletionHandler completionHandler)
loadFriendsWithIdentifiers:completionHandler:
|
static void |
loadPlayersForIdentifiersWithCompletionHandler(NSArray<java.lang.String> identifiers,
GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandler completionHandler) |
void |
loadRecentPlayersWithCompletionHandler(GKLocalPlayer.Block_loadRecentPlayersWithCompletionHandler completionHandler)
Asynchronously load the recent players list as an array of GKPlayer.
|
static GKLocalPlayer |
local()
Obtain the primary GKLocalPlayer object.
|
static GKLocalPlayer |
localPlayer() |
static GKLocalPlayer |
new_objc() |
void |
playerDidModifySavedGame(GKPlayer player,
GKSavedGame savedGame)
Called when a player’s saved game data has been modified.
|
void |
playerHasConflictingSavedGames(GKPlayer player,
NSArray<? extends GKSavedGame> savedGames)
Called when a conflict has arisen between different versions of the same saved game.
|
boolean |
presentFriendRequestCreatorFromViewControllerError(UIViewController viewController,
org.moe.natj.general.ptr.Ptr<NSError> error)
presentFriendRequestCreatorFromViewController:
|
void |
registerListener(GKLocalPlayerListener listener)
A single listener may be registered once.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
void |
resolveConflictingSavedGamesWithDataCompletionHandler(NSArray<? extends GKSavedGame> conflictingSavedGames,
NSData data,
GKLocalPlayer.Block_resolveConflictingSavedGamesWithDataCompletionHandler handler)
Asynchronously resolve a saved game conflict.
|
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
saveGameDataWithNameCompletionHandler(NSData data,
java.lang.String name,
GKLocalPlayer.Block_saveGameDataWithNameCompletionHandler handler)
Asynchronously save game data.
|
void |
setAuthenticateHandler(GKLocalPlayer.Block_setAuthenticateHandler value) |
void |
setDefaultLeaderboardCategoryIDCompletionHandler(java.lang.String categoryID,
GKLocalPlayer.Block_setDefaultLeaderboardCategoryIDCompletionHandler completionHandler)
Deprecated.
|
void |
setDefaultLeaderboardIdentifierCompletionHandler(java.lang.String leaderboardIdentifier,
GKLocalPlayer.Block_setDefaultLeaderboardIdentifierCompletionHandler completionHandler)
Set the default leaderboard for the current game
Possible reasons for error:
1.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
void |
unregisterAllListeners() |
void |
unregisterListener(GKLocalPlayerListener listener) |
static long |
version_static() |
alias, displayName, gamePlayerID, guestIdentifier, isFriend, isInvitable, loadPhotoForSizeWithCompletionHandler, playerID, scopedIDsArePersistent, teamPlayerIDaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static GKLocalPlayer alloc()
public static GKLocalPlayer allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static GKLocalPlayer anonymousGuestPlayerWithIdentifier(java.lang.String guestIdentifier)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static void loadPlayersForIdentifiersWithCompletionHandler(NSArray<java.lang.String> identifiers, GKPlayer.Block_loadPlayersForIdentifiersWithCompletionHandler completionHandler)
public static GKLocalPlayer localPlayer()
public static GKLocalPlayer new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public GKLocalPlayer.Block_authenticateHandler_ret authenticateHandler()
@Deprecated public void authenticateWithCompletionHandler(GKLocalPlayer.Block_authenticateWithCompletionHandler completionHandler)
public void deleteSavedGamesWithNameCompletionHandler(java.lang.String name,
GKLocalPlayer.Block_deleteSavedGamesWithNameCompletionHandler handler)
public void fetchSavedGamesWithCompletionHandler(GKLocalPlayer.Block_fetchSavedGamesWithCompletionHandler handler)
@Deprecated public NSArray<java.lang.String> friends()
public void generateIdentityVerificationSignatureWithCompletionHandler(GKLocalPlayer.Block_generateIdentityVerificationSignatureWithCompletionHandler completionHandler)
public GKLocalPlayer init()
public boolean isAuthenticated()
public boolean isUnderage()
@Deprecated public void loadDefaultLeaderboardCategoryIDWithCompletionHandler(GKLocalPlayer.Block_loadDefaultLeaderboardCategoryIDWithCompletionHandler completionHandler)
public void loadDefaultLeaderboardIdentifierWithCompletionHandler(GKLocalPlayer.Block_loadDefaultLeaderboardIdentifierWithCompletionHandler completionHandler)
public void loadFriendPlayersWithCompletionHandler(GKLocalPlayer.Block_loadFriendPlayersWithCompletionHandler completionHandler)
@Deprecated public void loadFriendsWithCompletionHandler(GKLocalPlayer.Block_loadFriendsWithCompletionHandler completionHandler)
public void loadRecentPlayersWithCompletionHandler(GKLocalPlayer.Block_loadRecentPlayersWithCompletionHandler completionHandler)
public void playerDidModifySavedGame(GKPlayer player, GKSavedGame savedGame)
GKSavedGameListenerplayerDidModifySavedGame in interface GKSavedGameListenerpublic void playerHasConflictingSavedGames(GKPlayer player, NSArray<? extends GKSavedGame> savedGames)
GKSavedGameListenerplayerHasConflictingSavedGames in interface GKSavedGameListenerpublic void registerListener(GKLocalPlayerListener listener)
public void resolveConflictingSavedGamesWithDataCompletionHandler(NSArray<? extends GKSavedGame> conflictingSavedGames, NSData data, GKLocalPlayer.Block_resolveConflictingSavedGamesWithDataCompletionHandler handler)
public void saveGameDataWithNameCompletionHandler(NSData data, java.lang.String name, GKLocalPlayer.Block_saveGameDataWithNameCompletionHandler handler)
public void setAuthenticateHandler(GKLocalPlayer.Block_setAuthenticateHandler value)
@Deprecated
public void setDefaultLeaderboardCategoryIDCompletionHandler(java.lang.String categoryID,
GKLocalPlayer.Block_setDefaultLeaderboardCategoryIDCompletionHandler completionHandler)
public void setDefaultLeaderboardIdentifierCompletionHandler(java.lang.String leaderboardIdentifier,
GKLocalPlayer.Block_setDefaultLeaderboardIdentifierCompletionHandler completionHandler)
public void unregisterAllListeners()
public void unregisterListener(GKLocalPlayerListener listener)
public boolean isMultiplayerGamingRestricted()
public void loadChallengableFriendsWithCompletionHandler(GKLocalPlayer.Block_loadChallengableFriendsWithCompletionHandler completionHandler)
public static GKLocalPlayer local()
public void fetchItemsForIdentityVerificationSignature(GKLocalPlayer.Block_fetchItemsForIdentityVerificationSignature completionHandler)
public boolean isPersonalizedCommunicationRestricted()
public boolean isPresentingFriendRequestViewController()
public void loadFriends(GKLocalPlayer.Block_loadFriends completionHandler)
* Possible reasons for error: * - Communication error with server. * - AuthorizationStatus != GKFriendsAuthorizationStatusAuthorized * - NSGKFriendListUsageDescription missing from your Info.plist * - User is not online * - Unauthenticated player
public void loadFriendsAuthorizationStatus(GKLocalPlayer.Block_loadFriendsAuthorizationStatus completionHandler)
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
public void loadFriendsWithIdentifiersCompletionHandler(NSArray<java.lang.String> identifiers, GKLocalPlayer.Block_loadFriendsWithIdentifiersCompletionHandler 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
public boolean presentFriendRequestCreatorFromViewControllerError(UIViewController viewController, org.moe.natj.general.ptr.Ptr<NSError> error)
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