Package apple.gamekit
Class GKLeaderboard
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.gamekit.GKLeaderboard
-
- All Implemented Interfaces:
NSObject
public class GKLeaderboard extends NSObject
GKLeaderboard represents a single instance of a leaderboard for the current game. Leaderboards can be of the following types: 1. Classic - Traditional, non-expiring leaderboards 2. Recurring - Periodic timed leaderboards that follow a recurrence rule defined in App Store Connect.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGKLeaderboard.Block_loadCategoriesWithCompletionHandlerstatic interfaceGKLeaderboard.Block_loadEntriesForPlayerScopeTimeScopeRangeCompletionHandlerstatic interfaceGKLeaderboard.Block_loadEntriesForPlayersTimeScopeCompletionHandlerstatic interfaceGKLeaderboard.Block_loadImageWithCompletionHandlerstatic interfaceGKLeaderboard.Block_loadLeaderboardsWithCompletionHandlerstatic interfaceGKLeaderboard.Block_loadLeaderboardsWithIDsCompletionHandlerstatic interfaceGKLeaderboard.Block_loadPreviousOccurrenceWithCompletionHandlerstatic interfaceGKLeaderboard.Block_loadScoresWithCompletionHandlerstatic interfaceGKLeaderboard.Block_setDefaultLeaderboardWithCompletionHandlerstatic interfaceGKLeaderboard.Block_submitScoreContextPlayerCompletionHandlerstatic interfaceGKLeaderboard.Block_submitScoreContextPlayerLeaderboardIDsCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGKLeaderboard(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 GKLeaderboardalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)java.lang.StringbaseLeaderboardID()Leaderboard ID defined in App Store Connect that this instance is associated withstatic voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)java.lang.Stringcategory()Deprecated.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()doubleduration()Duration from startDate during which this leaderboard instance accepts score submissions (only applicable to recurring leaderboards)java.lang.StringgroupIdentifier()set when leaderboards have been designated a game group; set when loadLeaderboardsWithCompletionHandler has been called for leaderboards that support game groupsstatic longhash_static()java.lang.Stringidentifier()leaderboardID.GKLeaderboardinit()Default is the range 1-10 with Global/AllTime scopes.GKLeaderboardinitWithPlayerIDs(NSArray<java.lang.String> playerIDs)Deprecated.GKLeaderboardinitWithPlayers(NSArray<? extends GKPlayer> players)Specify an array of GKPlayers.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)booleanisLoading()This property is true if the leaderboard is currently loadingstatic booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static voidloadCategoriesWithCompletionHandler(GKLeaderboard.Block_loadCategoriesWithCompletionHandler completionHandler)Deprecated.voidloadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(long playerScope, long timeScope, NSRange range, GKLeaderboard.Block_loadEntriesForPlayerScopeTimeScopeRangeCompletionHandler completionHandler)Loads leaderboard entries based on the supplied parameters.voidloadEntriesForPlayersTimeScopeCompletionHandler(NSArray<? extends GKPlayer> players, long timeScope, GKLeaderboard.Block_loadEntriesForPlayersTimeScopeCompletionHandler completionHandler)Loads leaderboard entries for specific players based on the supplied parameters.voidloadImageWithCompletionHandler(GKLeaderboard.Block_loadImageWithCompletionHandler completionHandler)static voidloadLeaderboardsWithCompletionHandler(GKLeaderboard.Block_loadLeaderboardsWithCompletionHandler completionHandler)Loads the array of GKLeaderboard for your app Possible reasons for error: 1.static voidloadLeaderboardsWithIDsCompletionHandler(NSArray<java.lang.String> leaderboardIDs, GKLeaderboard.Block_loadLeaderboardsWithIDsCompletionHandler completionHandler)Loads classic and recurring leaderboards associated with the supplied App Store Connect leaderboard IDs.voidloadPreviousOccurrenceWithCompletionHandler(GKLeaderboard.Block_loadPreviousOccurrenceWithCompletionHandler completionHandler)Loads the occurrence preceding this occurrence for a recurring leaderboard in which the local player submitted a score.voidloadScoresWithCompletionHandler(GKLeaderboard.Block_loadScoresWithCompletionHandler completionHandler)Load the scores for this leader board asynchronously.GKScorelocalPlayerScore()The local player's scorelongmaxRange()The maxRange which represents the size of the leaderboard is not valid until loadScores: has completed.static java.lang.Objectnew_objc()NSDatenextStartDate()Date and time the next instance will start accepting score submissions (only applicable to recurring leaderboards)longplayerScope()Filter on friends.NSRangerange()Leaderboards start at index 1 and the length should be less than 100.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)NSArray<? extends GKScore>scores()Scores are not valid until loadScores: has completed.voidsetCategory(java.lang.String value)Deprecated.static voidsetDefaultLeaderboardWithCompletionHandler(java.lang.String leaderboardIdentifier, GKLeaderboard.Block_setDefaultLeaderboardWithCompletionHandler completionHandler)Deprecated.voidsetIdentifier(java.lang.String value)leaderboardID.voidsetPlayerScope(long value)Filter on friends.voidsetRange(NSRange value)Leaderboards start at index 1 and the length should be less than 100.voidsetTimeScope(long value)static voidsetVersion_static(long aVersion)NSDatestartDate()Date and time this instance started accepting score submissions (only applicable to recurring leaderboards)voidsubmitScoreContextPlayerCompletionHandler(long score, long context, GKPlayer player, GKLeaderboard.Block_submitScoreContextPlayerCompletionHandler completionHandler)Instance method to submit a single score to the leaderboard associated with this instance score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submittedstatic voidsubmitScoreContextPlayerLeaderboardIDsCompletionHandler(long score, long context, GKPlayer player, NSArray<java.lang.String> leaderboardIDs, GKLeaderboard.Block_submitScoreContextPlayerLeaderboardIDsCompletionHandler completionHandler)Class method to submit a single score to multiple leaderboards score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submitted leaderboardIDs - one or more leaderboard IDs defined in App Store Connectstatic org.moe.natj.objc.Classsuperclass_static()longtimeScope()java.lang.Stringtitle()Localized titlelongtype()Type of leaderboardstatic longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, 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, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static GKLeaderboard alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
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()
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
loadCategoriesWithCompletionHandler
@Deprecated public static void loadCategoriesWithCompletionHandler(GKLeaderboard.Block_loadCategoriesWithCompletionHandler completionHandler)
Deprecated.
-
loadLeaderboardsWithCompletionHandler
public static void loadLeaderboardsWithCompletionHandler(GKLeaderboard.Block_loadLeaderboardsWithCompletionHandler completionHandler)
Loads the array of GKLeaderboard for your app Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
-
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)
-
setDefaultLeaderboardWithCompletionHandler
@Deprecated public static void setDefaultLeaderboardWithCompletionHandler(java.lang.String leaderboardIdentifier, GKLeaderboard.Block_setDefaultLeaderboardWithCompletionHandler completionHandler)Deprecated.
-
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()
-
category
@Deprecated public java.lang.String category()
Deprecated.Deprecated. Use identifier instead.
-
groupIdentifier
public java.lang.String groupIdentifier()
set when leaderboards have been designated a game group; set when loadLeaderboardsWithCompletionHandler has been called for leaderboards that support game groups
-
identifier
public java.lang.String identifier()
leaderboardID. If nil, fetch the aggregate leaderboard.
-
init
public GKLeaderboard init()
Default is the range 1-10 with Global/AllTime scopes. If you want to change the scopes or range, set the properites before loading the scores.
-
initWithPlayerIDs
@Deprecated public GKLeaderboard initWithPlayerIDs(NSArray<java.lang.String> playerIDs)
Deprecated.
-
initWithPlayers
public GKLeaderboard initWithPlayers(NSArray<? extends GKPlayer> players)
Specify an array of GKPlayers. For example, the players who are in a match together Defaults to AllTime score, if you want to change the timeScope, set the property before loading the scores. Range and playerScope are not applicable. players may not be nil.
-
isLoading
public boolean isLoading()
This property is true if the leaderboard is currently loading
-
loadImageWithCompletionHandler
public void loadImageWithCompletionHandler(GKLeaderboard.Block_loadImageWithCompletionHandler completionHandler)
-
loadScoresWithCompletionHandler
public void loadScoresWithCompletionHandler(GKLeaderboard.Block_loadScoresWithCompletionHandler completionHandler)
Load the scores for this leader board asynchronously. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
-
localPlayerScore
public GKScore localPlayerScore()
The local player's score
-
maxRange
public long maxRange()
The maxRange which represents the size of the leaderboard is not valid until loadScores: has completed.
-
playerScope
public long playerScope()
Filter on friends. Does not apply to leaderboard initialized with players.
-
range
public NSRange range()
Leaderboards start at index 1 and the length should be less than 100. Does not apply to leaderboards initialized with players. Exception will be thrown if developer tries to set an invalid range.
-
scores
public NSArray<? extends GKScore> scores()
Scores are not valid until loadScores: has completed.
-
setCategory
@Deprecated public void setCategory(java.lang.String value)
Deprecated.Deprecated. Use identifier instead.
-
setIdentifier
public void setIdentifier(java.lang.String value)
leaderboardID. If nil, fetch the aggregate leaderboard.
-
setPlayerScope
public void setPlayerScope(long value)
Filter on friends. Does not apply to leaderboard initialized with players.
-
setRange
public void setRange(NSRange value)
Leaderboards start at index 1 and the length should be less than 100. Does not apply to leaderboards initialized with players. Exception will be thrown if developer tries to set an invalid range.
-
setTimeScope
public void setTimeScope(long value)
-
timeScope
public long timeScope()
-
title
public java.lang.String title()
Localized title
-
baseLeaderboardID
public java.lang.String baseLeaderboardID()
Leaderboard ID defined in App Store Connect that this instance is associated with
-
duration
public double duration()
Duration from startDate during which this leaderboard instance accepts score submissions (only applicable to recurring leaderboards)
-
loadEntriesForPlayerScopeTimeScopeRangeCompletionHandler
public void loadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(long playerScope, long timeScope, NSRange range, GKLeaderboard.Block_loadEntriesForPlayerScopeTimeScopeRangeCompletionHandler completionHandler)Loads leaderboard entries based on the supplied parameters. playerScope - Friends or Global timeScope - Today, Week, All Time (Only applicable to classic leaderboards) range - Range of ranked entries to return (minimum start index 1, maximum length 100) Upon completion, will return: localPlayerEntry - entry for the local player entries - requested entries matching supplied parameters totalPlayerCount - total player count matching specified scope
-
loadEntriesForPlayersTimeScopeCompletionHandler
public void loadEntriesForPlayersTimeScopeCompletionHandler(NSArray<? extends GKPlayer> players, long timeScope, GKLeaderboard.Block_loadEntriesForPlayersTimeScopeCompletionHandler completionHandler)
Loads leaderboard entries for specific players based on the supplied parameters. players - Array of players to load entries for timeScope - Today, Week, All Time (Only applicable to classic leaderboards) Upon completion, will return: localPlayerEntry - entry for the local player entries - requested entries matching supplied parameters
-
loadLeaderboardsWithIDsCompletionHandler
public static void loadLeaderboardsWithIDsCompletionHandler(NSArray<java.lang.String> leaderboardIDs, GKLeaderboard.Block_loadLeaderboardsWithIDsCompletionHandler completionHandler)
Loads classic and recurring leaderboards associated with the supplied App Store Connect leaderboard IDs. If leaderboardIDs is nil, this loads all classic and recurring leaderboards for this game.
-
loadPreviousOccurrenceWithCompletionHandler
public void loadPreviousOccurrenceWithCompletionHandler(GKLeaderboard.Block_loadPreviousOccurrenceWithCompletionHandler completionHandler)
Loads the occurrence preceding this occurrence for a recurring leaderboard in which the local player submitted a score. If no previous occurrence is found that the player submitted a score to, then the most recent previous occurrence is returned.
-
nextStartDate
public NSDate nextStartDate()
Date and time the next instance will start accepting score submissions (only applicable to recurring leaderboards)
-
startDate
public NSDate startDate()
Date and time this instance started accepting score submissions (only applicable to recurring leaderboards)
-
submitScoreContextPlayerCompletionHandler
public void submitScoreContextPlayerCompletionHandler(long score, long context, GKPlayer player, GKLeaderboard.Block_submitScoreContextPlayerCompletionHandler completionHandler)Instance method to submit a single score to the leaderboard associated with this instance score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submitted
-
submitScoreContextPlayerLeaderboardIDsCompletionHandler
public static void submitScoreContextPlayerLeaderboardIDsCompletionHandler(long score, long context, GKPlayer player, NSArray<java.lang.String> leaderboardIDs, GKLeaderboard.Block_submitScoreContextPlayerLeaderboardIDsCompletionHandler completionHandler)Class method to submit a single score to multiple leaderboards score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submitted leaderboardIDs - one or more leaderboard IDs defined in App Store Connect
-
type
public long type()
Type of leaderboard
-
-