Package apple.gamekit

Class GKGameSession

  • All Implemented Interfaces:
    NSObject

    public class GKGameSession
    extends NSObject
    • Constructor Detail

      • GKGameSession

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addEventListener

        public static void addEventListener​(NSObject listener)
      • 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()
      • createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler

        public static void createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler​(java.lang.String containerName,
                                                                                                 java.lang.String title,
                                                                                                 long maxPlayers,
                                                                                                 GKGameSession.Block_createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler completionHandler)
        Create a new session with the given title and maximum number of connected players. (You may pass 0 to use the system limit of 16 players.)
      • 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()
      • removeEventListener

        public static void removeEventListener​(NSObject listener)
      • 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()
      • identifier

        public java.lang.String identifier()
      • lastModifiedDate

        public NSDate lastModifiedDate()
      • maxNumberOfConnectedPlayers

        public long maxNumberOfConnectedPlayers()
      • playersWithConnectionState

        public NSArray<? extends GKCloudPlayer> playersWithConnectionState​(long state)
        Get the players with the given connection state.
      • saveDataCompletionHandler

        public void saveDataCompletionHandler​(NSData data,
                                              GKGameSession.Block_saveDataCompletionHandler completionHandler)
        Save new/updated persistent data. Data size is limited to 512K. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion. If a version conflict is detected the handler will include the version currently on the server and an error. In this case the data has not been saved. To resolve the conflict a client would call this method again, presumably after merging data or giving the user a choice on how to resolve the conflict. (Note that when calling again it is possible to get a new conflict, if another device has since written a new version.)
      • sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler

        public void sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler​(java.lang.String key,
                                                                                                         NSArray<java.lang.String> arguments,
                                                                                                         NSData data,
                                                                                                         NSArray<? extends GKCloudPlayer> players,
                                                                                                         boolean badgePlayers,
                                                                                                         GKGameSession.Block_sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler completionHandler)
        Send a message to any players in the session. This uses an unreliable push mechanism. Message/data delivery is not guaranteed and may take some time to arrive. Receiving players may optionally have their application badged for this session.
      • setConnectionStateCompletionHandler

        public void setConnectionStateCompletionHandler​(long state,
                                                        GKGameSession.Block_setConnectionStateCompletionHandler completionHandler)
        Set your connection state. May fail if you attempt to connect but the connected player limit has already been reached or there are network problems. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion.
      • title

        public java.lang.String title()