Package apple.gamekit
Class GKTurnBasedMatch
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.gamekit.GKTurnBasedMatch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGKTurnBasedMatch(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidacceptInviteWithCompletionHandler(GKTurnBasedMatch.Block_acceptInviteWithCompletionHandler completionHandler)If the local participant has status invited then accept the invite, otherwise returns an errorstatic booleanaccessInstanceVariablesDirectly()NSArray<? extends GKTurnBasedExchange>activeExchanges()returns the exchanges that currently await a reply from the local playerstatic GKTurnBasedMatchalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(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.ClassclassForKeyedUnarchiver()NSArray<? extends GKTurnBasedExchange>completedExchanges()returns the exchanges that have been completed and need to be merged by the local participant.NSDatecreationDate()GKTurnBasedParticipantcurrentParticipant()This indicates the participant who has the current turn.static java.lang.StringdebugDescription_static()voiddeclineInviteWithCompletionHandler(GKTurnBasedMatch.Block_declineInviteWithCompletionHandler completionHandler)If the local participant has status invited then decline the invite, otherwise returns an errorstatic java.lang.Stringdescription_static()voidendMatchInTurnWithMatchDataCompletionHandler(NSData matchData, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataCompletionHandler completionHandler)This will end the match for all participants.voidendMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler(NSData matchData, NSArray<? extends GKLeaderboardScore> scores, NSArray<?> achievements, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler completionHandler)voidendMatchInTurnWithMatchDataScoresAchievementsCompletionHandler(NSData matchData, NSArray<? extends GKScore> scores, NSArray<? extends GKAchievement> achievements, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataScoresAchievementsCompletionHandler completionHandler)This will end the match and submit scores and achievements for all participants.voidendTurnWithNextParticipantMatchDataCompletionHandler(GKTurnBasedParticipant nextParticipant, NSData matchData, GKTurnBasedMatch.Block_endTurnWithNextParticipantMatchDataCompletionHandler completionHandler)Deprecated.voidendTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler(NSArray<? extends GKTurnBasedParticipant> nextParticipants, double timeout, NSData matchData, GKTurnBasedMatch.Block_endTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler completionHandler)Ends the current player's turn.longexchangeDataMaximumSize()maximum data allowed for exchange datalongexchangeMaxInitiatedExchangesPerPlayer()limit of the number of exchanges that this player can have initiated at a given timeNSArray<? extends GKTurnBasedExchange>exchanges()exchanges that are in progress on this match.static voidfindMatchForRequestWithCompletionHandler(GKMatchRequest request, GKTurnBasedMatch.Block_findMatchForRequestWithCompletionHandler completionHandler)Attempt to find a turn-based match for the specified request.static longhash_static()GKTurnBasedMatchinit()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)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)voidloadMatchDataWithCompletionHandler(GKTurnBasedMatch.Block_loadMatchDataWithCompletionHandler completionHandler)This method fetches the match data and exchanges for this match.static voidloadMatchesWithCompletionHandler(GKTurnBasedMatch.Block_loadMatchesWithCompletionHandler completionHandler)This method retrieves the list of GKTurnBasedMatches that the current player is or has participated in.static voidloadMatchWithIDWithCompletionHandler(java.lang.String matchID, GKTurnBasedMatch.Block_loadMatchWithIDWithCompletionHandler completionHandler)load a match based on a previously known match IDNSDatamatchData()Developer-defined data representing the current state of the game.longmatchDataMaximumSize()Returns the maximum size for the match data.java.lang.StringmatchID()java.lang.Stringmessage()returns the localizable message in the current locale.static java.lang.Objectnew_objc()voidparticipantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler(long matchOutcome, GKTurnBasedParticipant nextParticipant, NSData matchData, GKTurnBasedMatch.Block_participantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler completionHandler)Deprecated.voidparticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler(long matchOutcome, NSArray<? extends GKTurnBasedParticipant> nextParticipants, double timeout, NSData matchData, GKTurnBasedMatch.Block_participantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler completionHandler)Ends the current player's turn by quitting the match.voidparticipantQuitOutOfTurnWithOutcomeWithCompletionHandler(long matchOutcome, GKTurnBasedMatch.Block_participantQuitOutOfTurnWithOutcomeWithCompletionHandler completionHandler)Abandon the match when it is not the current participant's turn.NSArray<? extends GKTurnBasedParticipant>participants()array of GKTurnBasedParticipant objectsvoidrematchWithCompletionHandler(GKTurnBasedMatch.Block_rematchWithCompletionHandler completionHandler)Recreate a previously existing turn based match that ended.voidremoveWithCompletionHandler(GKTurnBasedMatch.Block_removeWithCompletionHandler completionHandler)Remove a declined or completed match (one with a matchOutcome set) from the player's list of matches.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsaveCurrentTurnWithMatchDataCompletionHandler(NSData matchData, GKTurnBasedMatch.Block_saveCurrentTurnWithMatchDataCompletionHandler completionHandler)saves the matchData for the current turn without ending the turn.voidsaveMergedMatchDataWithResolvedExchangesCompletionHandler(NSData matchData, NSArray<? extends GKTurnBasedExchange> exchanges, GKTurnBasedMatch.Block_saveMergedMatchDataWithResolvedExchangesCompletionHandler completionHandler)saves the merged matchData for the current turn without ending the turn and mark the supplied exchanges as resolved meaning that the data has been merged into the match data.voidsendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler(NSArray<? extends GKTurnBasedParticipant> participants, NSData data, java.lang.String key, NSArray<java.lang.String> arguments, double timeout, GKTurnBasedMatch.Block_sendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler completionHandler)Send an exchange request to one or more participants.voidsendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler(NSArray<? extends GKTurnBasedParticipant> participants, java.lang.String key, NSArray<java.lang.String> arguments, GKTurnBasedMatch.Block_sendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler completionHandler)Send a reminder to one or more participants.voidsetLocalizableMessageWithKeyArguments(java.lang.String key, NSArray<java.lang.String> arguments)If the developer wishes to display a message in GKTurnBasedMatchmakerViewController at the end of a turn or end of the match.voidsetMessage(java.lang.String value)returns the localizable message in the current locale.static voidsetVersion_static(long aVersion)longstatus()static org.moe.natj.objc.Classsuperclass_static()static 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 GKTurnBasedMatch 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()
-
findMatchForRequestWithCompletionHandler
public static void findMatchForRequestWithCompletionHandler(GKMatchRequest request, GKTurnBasedMatch.Block_findMatchForRequestWithCompletionHandler completionHandler)
Attempt to find a turn-based match for the specified request. Error will be nil on success. Possible reasons for error: 1. Communications failure 2. Unauthenticated player
-
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)
-
loadMatchWithIDWithCompletionHandler
public static void loadMatchWithIDWithCompletionHandler(java.lang.String matchID, GKTurnBasedMatch.Block_loadMatchWithIDWithCompletionHandler completionHandler)load a match based on a previously known match ID
-
loadMatchesWithCompletionHandler
public static void loadMatchesWithCompletionHandler(GKTurnBasedMatch.Block_loadMatchesWithCompletionHandler completionHandler)
This method retrieves the list of GKTurnBasedMatches that the current player is or has participated in. The callback’s array contains GKTurnBasedMatches
-
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()
-
acceptInviteWithCompletionHandler
public void acceptInviteWithCompletionHandler(GKTurnBasedMatch.Block_acceptInviteWithCompletionHandler completionHandler)
If the local participant has status invited then accept the invite, otherwise returns an error
-
activeExchanges
public NSArray<? extends GKTurnBasedExchange> activeExchanges()
returns the exchanges that currently await a reply from the local player
-
completedExchanges
public NSArray<? extends GKTurnBasedExchange> completedExchanges()
returns the exchanges that have been completed and need to be merged by the local participant. This will be nil unless the local participant is the current turn holder for this match
-
creationDate
public NSDate creationDate()
-
currentParticipant
public GKTurnBasedParticipant currentParticipant()
This indicates the participant who has the current turn. This is set by passing the next participant into endTurnWithNextParticipant:matchData:completionHandler:
-
declineInviteWithCompletionHandler
public void declineInviteWithCompletionHandler(GKTurnBasedMatch.Block_declineInviteWithCompletionHandler completionHandler)
If the local participant has status invited then decline the invite, otherwise returns an error
-
endMatchInTurnWithMatchDataCompletionHandler
public void endMatchInTurnWithMatchDataCompletionHandler(NSData matchData, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataCompletionHandler completionHandler)
This will end the match for all participants. You must set each participant’s matchOutcome before calling this method. All completed exchanges must be resolved or canceled before calling this.
-
endMatchInTurnWithMatchDataScoresAchievementsCompletionHandler
public void endMatchInTurnWithMatchDataScoresAchievementsCompletionHandler(NSData matchData, NSArray<? extends GKScore> scores, NSArray<? extends GKAchievement> achievements, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataScoresAchievementsCompletionHandler completionHandler)
This will end the match and submit scores and achievements for all participants. Scores should be submitted for all involved players, and multiple scores may be submitted for each to different leaderboards. Earned achievements may also be submitted for any participants. You must set each participant’s matchOutcome before calling this method. All completed exchanges must be resolved or canceled before calling this.
-
endTurnWithNextParticipantMatchDataCompletionHandler
@Deprecated public void endTurnWithNextParticipantMatchDataCompletionHandler(GKTurnBasedParticipant nextParticipant, NSData matchData, GKTurnBasedMatch.Block_endTurnWithNextParticipantMatchDataCompletionHandler completionHandler)
Deprecated.deprecated methods
-
endTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler
public void endTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler(NSArray<? extends GKTurnBasedParticipant> nextParticipants, double timeout, NSData matchData, GKTurnBasedMatch.Block_endTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler completionHandler)
Ends the current player's turn. You may update the matchOutcome for any GKTurnBasedPlayerInfos that you wish to before ending the turn. This will asynchronously report error in these cases: 1. Communications problem 2. Is not current player's turn 3. Session is closed
-
exchangeDataMaximumSize
public long exchangeDataMaximumSize()
maximum data allowed for exchange data
-
exchangeMaxInitiatedExchangesPerPlayer
public long exchangeMaxInitiatedExchangesPerPlayer()
limit of the number of exchanges that this player can have initiated at a given time
-
exchanges
public NSArray<? extends GKTurnBasedExchange> exchanges()
exchanges that are in progress on this match. Once an exchange has completed and has been resolved by merging it into the match data by the current turn holder then it will be removed from this list
-
init
public GKTurnBasedMatch init()
-
loadMatchDataWithCompletionHandler
public void loadMatchDataWithCompletionHandler(GKTurnBasedMatch.Block_loadMatchDataWithCompletionHandler completionHandler)
This method fetches the match data and exchanges for this match. This data is the state of the game at this point in time. This may update the status and/or participant properties if they have changed.
-
matchData
public NSData matchData()
Developer-defined data representing the current state of the game. This property is nil until loaded by loadMatchDataWithCompletionHandler: The developer can submit updated matchData by passing it into endTurnWithNextParticipant:matchData:completionHandler: or endMatchInTurnWithMatchData:completionHandler:
-
matchDataMaximumSize
public long matchDataMaximumSize()
Returns the maximum size for the match data.
-
matchID
public java.lang.String matchID()
-
message
public java.lang.String message()
returns the localizable message in the current locale. Setting this is equivalent to calling [self setLocalizableMessageWithKey:message arguments:nil]
-
participantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler
@Deprecated public void participantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler(long matchOutcome, GKTurnBasedParticipant nextParticipant, NSData matchData, GKTurnBasedMatch.Block_participantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler completionHandler)Deprecated.
-
participantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler
public void participantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler(long matchOutcome, NSArray<? extends GKTurnBasedParticipant> nextParticipants, double timeout, NSData matchData, GKTurnBasedMatch.Block_participantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler completionHandler)Ends the current player's turn by quitting the match. The caller must indicate the next player and pass in updated matchData (if used). All completed exchanges must be resolved or canceled before calling this.
-
participantQuitOutOfTurnWithOutcomeWithCompletionHandler
public void participantQuitOutOfTurnWithOutcomeWithCompletionHandler(long matchOutcome, GKTurnBasedMatch.Block_participantQuitOutOfTurnWithOutcomeWithCompletionHandler completionHandler)Abandon the match when it is not the current participant's turn. In this there is no update to matchData and no need to set nextParticipant.
-
participants
public NSArray<? extends GKTurnBasedParticipant> participants()
array of GKTurnBasedParticipant objects
-
rematchWithCompletionHandler
public void rematchWithCompletionHandler(GKTurnBasedMatch.Block_rematchWithCompletionHandler completionHandler)
Recreate a previously existing turn based match that ended. A new match with the same set of players will be returned by the completion handler. If multiple players do this then multiple new matches will be created. Error will be nil on success. Possible reasons for error: 1. Communications failure 2. Unauthenticated player
-
removeWithCompletionHandler
public void removeWithCompletionHandler(GKTurnBasedMatch.Block_removeWithCompletionHandler completionHandler)
Remove a declined or completed match (one with a matchOutcome set) from the player's list of matches. If using the GKTurnBasedMatchmakerViewController UI, this will remove it from the finished sessions. The developer should not do this without user input.
-
saveCurrentTurnWithMatchDataCompletionHandler
public void saveCurrentTurnWithMatchDataCompletionHandler(NSData matchData, GKTurnBasedMatch.Block_saveCurrentTurnWithMatchDataCompletionHandler completionHandler)
saves the matchData for the current turn without ending the turn. If other players have the game running they will receive a handleTurnEventForMatch to indicate that the matchData has changed. This is useful to initialize the game state for the first player when they take their turn or for updating the turn data due to the user taking an irreversible action within their turn. All completed exchanges must be resolved or canceled before calling this. If you are using exchanges use saveMergedMatchData instead.
-
saveMergedMatchDataWithResolvedExchangesCompletionHandler
public void saveMergedMatchDataWithResolvedExchangesCompletionHandler(NSData matchData, NSArray<? extends GKTurnBasedExchange> exchanges, GKTurnBasedMatch.Block_saveMergedMatchDataWithResolvedExchangesCompletionHandler completionHandler)
saves the merged matchData for the current turn without ending the turn and mark the supplied exchanges as resolved meaning that the data has been merged into the match data. If other players have the game running they will receive a handleTurnEventForMatch to indicate that the matchData has changed. It is required that all completed exchanges are resolved before ending a turn. Otherwise calling endTurn, participantQuitInTurnWithOutCome or endMatchInTurn will return an error
-
sendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler
public void sendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler(NSArray<? extends GKTurnBasedParticipant> participants, NSData data, java.lang.String key, NSArray<java.lang.String> arguments, double timeout, GKTurnBasedMatch.Block_sendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler completionHandler)
Send an exchange request to one or more participants. Each recipient will receive a push notification using supplied localizable message. If any of the participants have an inactive status (GKTurnBasedParticipantStatusDone) then this will return an error. completionHandler gets passed the updated exchange with identifier, sender and recipients set
-
sendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler
public void sendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler(NSArray<? extends GKTurnBasedParticipant> participants, java.lang.String key, NSArray<java.lang.String> arguments, GKTurnBasedMatch.Block_sendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler completionHandler)
Send a reminder to one or more participants. Each recipient will receive a push notification using supplied localizable message. This allows a game to send reminders that a turn or exchange request needs action. On the receiver side this will generate a turn event for the match.
-
setLocalizableMessageWithKeyArguments
public void setLocalizableMessageWithKeyArguments(java.lang.String key, NSArray<java.lang.String> arguments)If the developer wishes to display a message in GKTurnBasedMatchmakerViewController at the end of a turn or end of the match. Only the current participant can set this. Sets a localizable mesage that will be localized on the receiver side if the game is installed and on the sender side as a fallback. The key and arguments offer a subset of formated strings as follows key is a string in a Localizable.strings file for the current localization (which is set by the user’s language preference). key string can be formatted with %@ and %n$@ specifiers to take the variables specified in loc-args arguments is an array of strings that will be substituted using the format string. Notes: The localized message will be evaluated locally from these keys and sent across as well so that devices that do not have the game installed will see the message in the sender's localization The developer can access resulting string using the message property This is a similar concept to the way we handle localization for Push Notifications. See the "Local and Push Notification Programming Guide" for more details.
-
setMessage
public void setMessage(java.lang.String value)
returns the localizable message in the current locale. Setting this is equivalent to calling [self setLocalizableMessageWithKey:message arguments:nil]
-
status
public long status()
-
endMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler
public void endMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler(NSData matchData, NSArray<? extends GKLeaderboardScore> scores, NSArray<?> achievements, GKTurnBasedMatch.Block_endMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler completionHandler)
-
-