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 automatching.
    • Constructor Detail

      • GKMatchmaker

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static GKMatchmaker allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • 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()
      • 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)
      • 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

        @NotNull
        public static @NotNull 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​(@NotNull
                                                                   @NotNull GKMatch match,
                                                                   @NotNull
                                                                   @NotNull GKMatchRequest matchRequest,
                                                                   @Nullable
                                                                   @Nullable GKMatchmaker.Block_addPlayersToMatchMatchRequestCompletionHandler completionHandler)
        Automatching 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​(@NotNull
                                         @NotNull java.lang.String playerID)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing** API-Since: 6.0 Deprecated-Since: 8.0
      • cancelPendingInviteToPlayer

        public void cancelPendingInviteToPlayer​(@NotNull
                                                @NotNull GKPlayer player)
        Cancel a pending invitation to a player API-Since: 8.0
      • findMatchForRequestWithCompletionHandler

        public void findMatchForRequestWithCompletionHandler​(@NotNull
                                                             @NotNull GKMatchRequest request,
                                                             @Nullable
                                                             @Nullable GKMatchmaker.Block_findMatchForRequestWithCompletionHandler completionHandler)
        Automatching 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.
      • findPlayersForHostedMatchRequestWithCompletionHandler

        @Deprecated
        public void findPlayersForHostedMatchRequestWithCompletionHandler​(@NotNull
                                                                          @NotNull GKMatchRequest request,
                                                                          @Nullable
                                                                          @Nullable GKMatchmaker.Block_findPlayersForHostedMatchRequestWithCompletionHandler completionHandler)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing** API-Since: 4.1 Deprecated-Since: 8.0
      • findPlayersForHostedRequestWithCompletionHandler

        public void findPlayersForHostedRequestWithCompletionHandler​(@NotNull
                                                                     @NotNull GKMatchRequest request,
                                                                     @Nullable
                                                                     @Nullable GKMatchmaker.Block_findPlayersForHostedRequestWithCompletionHandler completionHandler)
        Automatching 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 API-Since: 8.0
      • finishMatchmakingForMatch

        public void finishMatchmakingForMatch​(@NotNull
                                              @NotNull GKMatch match)
        Call this when finished with all programmatic P2P invites/matchmaking, for compatability with connected players using GKMatchmakerViewController. API-Since: 6.0
      • inviteHandler

        @Nullable
        @Deprecated
        public @Nullable GKMatchmaker.Block_inviteHandler_ret inviteHandler()
        Deprecated.
        API-Since: 4.1 Deprecated-Since: 7.0 Deprecated-Message: Use registerListener on GKLocalPlayer to register an object that implements the GKInviteEventListener instead.
      • matchForInviteCompletionHandler

        public void matchForInviteCompletionHandler​(@NotNull
                                                    @NotNull GKInvite invite,
                                                    @Nullable
                                                    @Nullable GKMatchmaker.Block_matchForInviteCompletionHandler completionHandler)
        Get a match for an accepted invite Possible reasons for error: 1. Communications failure 2. Invite cancelled API-Since: 6.0
      • queryActivityWithCompletionHandler

        public void queryActivityWithCompletionHandler​(@Nullable
                                                       @Nullable 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,
                                                                  @Nullable
                                                                  @Nullable 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
      • setInviteHandler

        @Deprecated
        public void setInviteHandler​(@Nullable
                                     @Nullable GKMatchmaker.Block_setInviteHandler value)
        Deprecated.
        API-Since: 4.1 Deprecated-Since: 7.0 Deprecated-Message: Use registerListener on GKLocalPlayer to register an object that implements the GKInviteEventListener instead.
      • startBrowsingForNearbyPlayersWithHandler

        public void startBrowsingForNearbyPlayersWithHandler​(@Nullable
                                                             @Nullable 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. API-Since: 8.0
      • startBrowsingForNearbyPlayersWithReachableHandler

        @Deprecated
        public void startBrowsingForNearbyPlayersWithReachableHandler​(@Nullable
                                                                      @Nullable GKMatchmaker.Block_startBrowsingForNearbyPlayersWithReachableHandler reachableHandler)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing** API-Since: 6.0 Deprecated-Since: 8.0
      • stopBrowsingForNearbyPlayers

        public void stopBrowsingForNearbyPlayers()
        Stop browsing for nearby players. API-Since: 6.0
      • startGroupActivityWithPlayerHandler

        public void startGroupActivityWithPlayerHandler​(@NotNull
                                                        @NotNull GKMatchmaker.Block_startGroupActivityWithPlayerHandler handler)
        Activate a group activity by Game Center for your game, which allows people in the FaceTime call to join the local player's game. The handler will be called for each player who joined from the activity. API-Since: 16.2
      • stopGroupActivity

        public void stopGroupActivity()
        End the group activity created by Game Center for your game, which was activated by the local player. API-Since: 16.2
      • queryQueueActivityWithCompletionHandler

        public void queryQueueActivityWithCompletionHandler​(@NotNull
                                                            @NotNull java.lang.String queueName,
                                                            @Nullable
                                                            @Nullable GKMatchmaker.Block_queryQueueActivityWithCompletionHandler completionHandler)
        Query the server for recent activity for the specified queue. API-Since: 17.2
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.