Package apple.gamekit

Class GKMatchmaker

  • All Implemented Interfaces:
    NSObject

    public class GKMatchmaker
    extends NSObject
    GKMatchmaker is a singleton object to manage match creation from invites and auto-matching.
    • Constructor Detail

      • GKMatchmaker

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

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

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

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

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

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

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

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

        public static long hash_static()
      • instanceMethodSignatureForSelector

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

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

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

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

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

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

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

        public static void setVersion_static​(long aVersion)
      • sharedMatchmaker

        public static GKMatchmaker sharedMatchmaker()
        The shared matchmaker
      • superclass_static

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

        public static long version_static()
      • addPlayersToMatchMatchRequestCompletionHandler

        public void addPlayersToMatchMatchRequestCompletionHandler​(GKMatch match,
                                                                   GKMatchRequest matchRequest,
                                                                   GKMatchmaker.Block_addPlayersToMatchMatchRequestCompletionHandler completionHandler)
        Auto-matching or invites to add additional players to a peer-to-peer match for the specified request. Error will be nil on success: Possible reasons for error: 1. Communications failure 2. Timeout
      • cancel

        public void cancel()
        Cancel matchmaking and any pending invites
      • cancelInviteToPlayer

        @Deprecated
        public void cancelInviteToPlayer​(java.lang.String playerID)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing**
      • cancelPendingInviteToPlayer

        public void cancelPendingInviteToPlayer​(GKPlayer player)
        Cancel a pending invitation to a player
      • findMatchForRequestWithCompletionHandler

        public void findMatchForRequestWithCompletionHandler​(GKMatchRequest request,
                                                             GKMatchmaker.Block_findMatchForRequestWithCompletionHandler completionHandler)
        Auto-matching or invites to find a peer-to-peer match for the specified request. Error will be nil on success: Possible reasons for error: 1. Communications failure 2. Unauthenticated player 3. Timeout Note that the players property on the returned GKMatch instance will only contain connected players. It will initially be empty as players are connecting. Implement the GKMatchDelegate method match:player:didChangeConnectionState: to listen for updates to the GKMatch instance's players property.
      • findPlayersForHostedRequestWithCompletionHandler

        public void findPlayersForHostedRequestWithCompletionHandler​(GKMatchRequest request,
                                                                     GKMatchmaker.Block_findPlayersForHostedRequestWithCompletionHandler completionHandler)
        Auto-matching or invites for host-client match request. This returns a list of player identifiers to be included in the match. Determination and communication with the host is not part of this API. When inviting, no player identifiers will be returned. Player responses will be reported via the inviteeResponseHandler. Possible reasons for error: 1. Communications failure 2. Unauthenticated player 3. Timeout
      • finishMatchmakingForMatch

        public void finishMatchmakingForMatch​(GKMatch match)
        Call this when finished with all programmatic P2P invites/matchmaking, for compatability with connected players using GKMatchmakerViewController.
      • queryActivityWithCompletionHandler

        public void queryActivityWithCompletionHandler​(GKMatchmaker.Block_queryActivityWithCompletionHandler completionHandler)
        Query the server for recent activity for all the player groups of that game. Error will be nil on success. Possible reasons for error: 1. Communications failure
      • queryPlayerGroupActivityWithCompletionHandler

        public void queryPlayerGroupActivityWithCompletionHandler​(long playerGroup,
                                                                  GKMatchmaker.Block_queryPlayerGroupActivityWithCompletionHandler completionHandler)
        Query the server for recent activity in the specified player group. A larger value indicates that a given group has seen more recent activity. Error will be nil on success. Possible reasons for error: 1. Communications failure
      • startBrowsingForNearbyPlayersWithHandler

        public void startBrowsingForNearbyPlayersWithHandler​(GKMatchmaker.Block_startBrowsingForNearbyPlayersWithHandler reachableHandler)
        Start browsing for nearby players that can be invited to a match. The reachableHandler will be called for each player found with a compatible game. It may be called more than once for the same player if that player ever becomes unreachable (e.g. moves out of range). You should call stopBrowsingForNearbyPlayers when finished browsing.
      • stopBrowsingForNearbyPlayers

        public void stopBrowsingForNearbyPlayers()
        Stop browsing for nearby players.