gamekit

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package gamekit provides purego-based Go bindings for the macOS GameKit framework.

Apple documentation: https://developer.apple.com/documentation/gamekit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GKAchievementDescriptionIncompleteAchievementImage

func GKAchievementDescriptionIncompleteAchievementImage() *appkit.NSImage

A common image that you can display when the player hasn’t completed the achievement.

func GKAchievementDescriptionLoadAchievementDescriptionsWithCompletionHandler

func GKAchievementDescriptionLoadAchievementDescriptionsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKAchievementDescription], unsafe.Pointer))

Downloads the localized descriptions of achievements from Game Center.

func GKAchievementDescriptionPlaceholderCompletedAchievementImage

func GKAchievementDescriptionPlaceholderCompletedAchievementImage() *appkit.NSImage

A placeholder image that you can display when the player completes the achievement.

func GKAchievementLoadAchievementsWithCompletionHandler

func GKAchievementLoadAchievementsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKAchievement], unsafe.Pointer))

Loads the achievements that you previously reported the player making progress toward.

func GKAchievementReportAchievementsWithCompletionHandler

func GKAchievementReportAchievementsWithCompletionHandler(achievements *foundation.NSArray[*GKAchievement], completionHandler func(unsafe.Pointer))

Reports the player’s progress of players toward one or more achievements.

func GKAchievementReportAchievementsWithEligibleChallengesWithCompletionHandler

func GKAchievementReportAchievementsWithEligibleChallengesWithCompletionHandler(achievements *foundation.NSArray[*GKAchievement], challenges *foundation.NSArray[*GKChallenge], completionHandler func(unsafe.Pointer))

Reports the player’s progress on achievements and limits the challenges, associated with those achievements, that the player may complete. Deprecated: since macOS 26.0.

func GKAchievementResetAchievementsWithCompletionHandler

func GKAchievementResetAchievementsWithCompletionHandler(completionHandler func(unsafe.Pointer))

Resets the percentage completed for all of the player’s achievements.

func GKChallengeDefinitionLoadChallengeDefinitionsWithCompletionHandler

func GKChallengeDefinitionLoadChallengeDefinitionsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKChallengeDefinition], unsafe.Pointer))

Loads all the challenge definitions for the current game, returns an empty array if none exist.

func GKChallengeLoadReceivedChallengesWithCompletionHandler

func GKChallengeLoadReceivedChallengesWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKChallenge], unsafe.Pointer))

Loads the list of outstanding challenges. Deprecated: since macOS 26.0.

func GKCloudPlayerGetCurrentSignedInPlayerForContainerCompletionHandler

func GKCloudPlayerGetCurrentSignedInPlayerForContainerCompletionHandler(containerName *foundation.NSString, handler func(*GKCloudPlayer, unsafe.Pointer))

Returns player information for the currently signed-in player.

func GKErrorDomain

func GKErrorDomain() *foundation.NSString

func GKExchangeTimeoutDefault

func GKExchangeTimeoutDefault() float64

func GKExchangeTimeoutNone

func GKExchangeTimeoutNone() float64

func GKFriendRequestComposeViewControllerMaxNumberOfRecipients

func GKFriendRequestComposeViewControllerMaxNumberOfRecipients() uint

Returns the maximum number of recipients permitted in a single request. Deprecated: No longer supported.

func GKGameActivityCheckPendingGameActivityExistenceWithCompletionHandler

func GKGameActivityCheckPendingGameActivityExistenceWithCompletionHandler(completionHandler func(bool))

Checks whether there is a pending activity to handle for the current game.

func GKGameActivityDefinitionLoadGameActivityDefinitionsWithCompletionHandler

func GKGameActivityDefinitionLoadGameActivityDefinitionsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKGameActivityDefinition], unsafe.Pointer))

Loads all the game activity definitions for the current game.

func GKGameActivityDefinitionLoadGameActivityDefinitionsWithIDsCompletionHandler

func GKGameActivityDefinitionLoadGameActivityDefinitionsWithIDsCompletionHandler(activityDefinitionIDs *foundation.NSArray[*foundation.NSString], completionHandler func(*foundation.NSArray[*GKGameActivityDefinition], unsafe.Pointer))

Loads game activity definitions with the supplied App Store Connect identifiers.

func GKGameActivityIsValidPartyCode

func GKGameActivityIsValidPartyCode(partyCode *foundation.NSString) bool

Checks whether a party code is in valid format.

func GKGameActivityValidPartyCodeAlphabet

func GKGameActivityValidPartyCodeAlphabet() *foundation.NSArray[*foundation.NSString]

Allowed characters for the party code to be used to share this activity.

func GKGameSessionAddEventListener

func GKGameSessionAddEventListener(listener *foundation.NSObject)

Adds a new event listener object. Deprecated: since macOS 10.14.

func GKGameSessionCreateSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler

func GKGameSessionCreateSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler(containerName *foundation.NSString, title *foundation.NSString, maxPlayers int, completionHandler func(*GKGameSession, unsafe.Pointer))

Creates a new game session inside of an iCloud container.

func GKGameSessionErrorDomain deprecated

func GKGameSessionErrorDomain() uintptr

Deprecated: GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead.

func GKGameSessionLoadSessionWithIdentifierCompletionHandler

func GKGameSessionLoadSessionWithIdentifierCompletionHandler(identifier *foundation.NSString, completionHandler func(*GKGameSession, unsafe.Pointer))

Loads a specific game session.

func GKGameSessionLoadSessionsInContainerCompletionHandler

func GKGameSessionLoadSessionsInContainerCompletionHandler(containerName *foundation.NSString, completionHandler func(*foundation.NSArray[*GKGameSession], unsafe.Pointer))

Retrieves all of the game sessions associated with a container.

func GKGameSessionRemoveEventListener

func GKGameSessionRemoveEventListener(listener *foundation.NSObject)

Stops listening to the event listener object. Deprecated: since macOS 10.14.

func GKGameSessionRemoveSessionWithIdentifierCompletionHandler

func GKGameSessionRemoveSessionWithIdentifierCompletionHandler(identifier *foundation.NSString, completionHandler func(unsafe.Pointer))

Removes the specified game session.

func GKLeaderboardLoadCategoriesWithCompletionHandler deprecated

func GKLeaderboardLoadCategoriesWithCompletionHandler(completionHandler func(*foundation.NSArray[*foundation.NSString], *foundation.NSArray[*foundation.NSString], unsafe.Pointer))

Deprecated: since macOS 10.9.

func GKLeaderboardLoadLeaderboardsWithCompletionHandler

func GKLeaderboardLoadLeaderboardsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKLeaderboard], unsafe.Pointer))

Loads the array of GKLeaderboard for your app Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present Deprecated: since macOS 11.0.

func GKLeaderboardLoadLeaderboardsWithIDsCompletionHandler

func GKLeaderboardLoadLeaderboardsWithIDsCompletionHandler(leaderboardIDs *foundation.NSArray[*foundation.NSString], completionHandler func(*foundation.NSArray[*GKLeaderboard], unsafe.Pointer))

Loads leaderboards for the specified leaderboard IDs that Game Center uses.

func GKLeaderboardSetDefaultLeaderboardWithCompletionHandler deprecated

func GKLeaderboardSetDefaultLeaderboardWithCompletionHandler(leaderboardIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))

Deprecated: since macOS 10.10.

func GKLeaderboardSetLoadLeaderboardSetsWithCompletionHandler

func GKLeaderboardSetLoadLeaderboardSetsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKLeaderboardSet], unsafe.Pointer))

Loads all of the leaderboard sets you configure for your game.

func GKLeaderboardSubmitScoreContextPlayerLeaderboardIDsCompletionHandler

func GKLeaderboardSubmitScoreContextPlayerLeaderboardIDsCompletionHandler(score int, context_ uint, player *GKPlayer, leaderboardIDs *foundation.NSArray[*foundation.NSString], completionHandler func(unsafe.Pointer))

Submits a score to multiple leaderboards.

func GKMatchRequestMaxPlayersAllowedForMatchOfType

func GKMatchRequestMaxPlayersAllowedForMatchOfType(matchType GKMatchType) uint

Returns the maximum number of players allowed in the match request for a given match type.

func GKNotificationBannerShowBannerWithTitleMessageCompletionHandler

func GKNotificationBannerShowBannerWithTitleMessageCompletionHandler(title *foundation.NSString, message *foundation.NSString, completionHandler func())

Displays a banner with a title and message to the player. Deprecated: Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.

func GKNotificationBannerShowBannerWithTitleMessageDurationCompletionHandler

func GKNotificationBannerShowBannerWithTitleMessageDurationCompletionHandler(title *foundation.NSString, message *foundation.NSString, duration float64, completionHandler func())

Displays a banner to the player for a specified period of time. Deprecated: Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.

func GKPlayerAuthenticationDidChangeNotificationName

func GKPlayerAuthenticationDidChangeNotificationName() *foundation.NSString

Notification will be posted whenever authentication status changes.

func GKPlayerDidChangeNotificationName

func GKPlayerDidChangeNotificationName() *foundation.NSString

Notification will be posted whenever the player details changes. The object of the notification will be the player.

func GKPlayerIDNoLongerAvailable

func GKPlayerIDNoLongerAvailable() uintptr

Deprecated methods that previously returned player IDs will return GKPlayerIDNoLongerAvailable instead.

func GKPlayerLoadPlayersForIdentifiersWithCompletionHandler

func GKPlayerLoadPlayersForIdentifiersWithCompletionHandler(identifiers *foundation.NSArray[*foundation.NSString], completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Loads information about a list of players from Game Center. Deprecated: since macOS 11.3.

func GKScoreReportLeaderboardScoresWithEligibleChallengesWithCompletionHandler

func GKScoreReportLeaderboardScoresWithEligibleChallengesWithCompletionHandler(scores *foundation.NSArray[*GKLeaderboardScore], challenges *foundation.NSArray[*GKChallenge], completionHandler func(unsafe.Pointer))

Submits a list of scores and all eligible challenges. Deprecated: since macOS 26.0.

func GKScoreReportScoresWithCompletionHandler

func GKScoreReportScoresWithCompletionHandler(scores *foundation.NSArray[*GKScore], completionHandler func(unsafe.Pointer))

Reports a list of scores to Game Center Deprecated: since macOS 11.0.

func GKScoreReportScoresWithEligibleChallengesWithCompletionHandler

func GKScoreReportScoresWithEligibleChallengesWithCompletionHandler(scores *foundation.NSArray[*GKScore], challenges *foundation.NSArray[*GKChallenge], completionHandler func(unsafe.Pointer))

Submits a list of scores and all eligible challenges. Deprecated: since macOS 11.0.

func GKSessionErrorDomain deprecated

func GKSessionErrorDomain() uintptr

Deprecated: No longer supported

func GKTurnBasedMatchFindMatchForRequestWithCompletionHandler

func GKTurnBasedMatchFindMatchForRequestWithCompletionHandler(request *GKMatchRequest, completionHandler func(*GKTurnBasedMatch, unsafe.Pointer))

Creates a new match or finds an existing match that needs a player.

func GKTurnBasedMatchLoadMatchWithIDWithCompletionHandler

func GKTurnBasedMatchLoadMatchWithIDWithCompletionHandler(matchID *foundation.NSString, completionHandler func(*GKTurnBasedMatch, unsafe.Pointer))

Loads a specific match with the specified identifier.

func GKTurnBasedMatchLoadMatchesWithCompletionHandler

func GKTurnBasedMatchLoadMatchesWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKTurnBasedMatch], unsafe.Pointer))

Fetches the turn-based matches from Game Center that the local player participates in.

func GKTurnTimeoutDefault

func GKTurnTimeoutDefault() float64

func GKTurnTimeoutNone

func GKTurnTimeoutNone() float64

func GKVoiceChatIsVoIPAllowed

func GKVoiceChatIsVoIPAllowed() bool

Returns whether voice chat is available on the device. Deprecated: No longer supported

func GKVoiceChatServiceErrorDomain deprecated

func GKVoiceChatServiceErrorDomain() uintptr

Deprecated: No longer supported

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int64
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type EvCmd

type EvCmd int64
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

type EvsioEVSIOCCSIndices

type EvsioEVSIOCCSIndices int64
const (
	EVSIOCCS_X EvsioEVSIOCCSIndices = 0
	EVSIOCCS_Y EvsioEVSIOCCSIndices = 1
)

func (EvsioEVSIOCCSIndices) String

func (e EvsioEVSIOCCSIndices) String() string

type EvsioEVSIOSCSIndices

type EvsioEVSIOSCSIndices int64
const (
	EVSIOSCS_X EvsioEVSIOSCSIndices = 0
	EVSIOSCS_Y EvsioEVSIOSCSIndices = 1
)

func (EvsioEVSIOSCSIndices) String

func (e EvsioEVSIOSCSIndices) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type GKAccessPoint

type GKAccessPoint struct {
	foundation.NSObject
}

An object that allows players to view and manage their Game Center information from within your game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkaccesspoint

func GKAccessPointFromID

func GKAccessPointFromID(id objc.ID) *GKAccessPoint

func GKAccessPointShared

func GKAccessPointShared() *GKAccessPoint

func (*GKAccessPoint) FrameInScreenCoordinates

func (o *GKAccessPoint) FrameInScreenCoordinates() corefoundation.CGRect

observable property that contains the current frame needed to display the widget

func (*GKAccessPoint) IsActive

func (o *GKAccessPoint) IsActive() bool

set this true to enable access point in your app. Setting this will cause the access point to appear after the notification banner is presented. If it already was presented it will appear immediately

func (*GKAccessPoint) Location

func (o *GKAccessPoint) Location() GKAccessPointLocation

These properties control the placement of the widget Deprecated: No longer supported

func (*GKAccessPoint) ParentWindow

func (o *GKAccessPoint) ParentWindow() *appkit.NSWindow

the following is a platform specific window that you wish to have the access point in. If not set then a best attempt will be made to choose the main window of the app.

func (*GKAccessPoint) SetActive

func (o *GKAccessPoint) SetActive(active bool)

func (*GKAccessPoint) SetLocation

func (o *GKAccessPoint) SetLocation(location GKAccessPointLocation)

func (*GKAccessPoint) SetParentWindow

func (o *GKAccessPoint) SetParentWindow(parentWindow *appkit.NSWindow)

func (*GKAccessPoint) SetShowHighlights deprecated

func (o *GKAccessPoint) SetShowHighlights(showHighlights bool)

Deprecated: No longer supported

func (*GKAccessPoint) ShowHighlights

func (o *GKAccessPoint) ShowHighlights() bool

Set this property to true if you wish to show the highlights for most recent achievement, current rank on default leaderboard, etc Deprecated: No longer supported

func (*GKAccessPoint) TriggerAccessPointForArcadeWithHandler

func (o *GKAccessPoint) TriggerAccessPointForArcadeWithHandler(handler func())

Brings up the Arcade dashboard.

func (*GKAccessPoint) TriggerAccessPointForChallengesWithHandler

func (o *GKAccessPoint) TriggerAccessPointForChallengesWithHandler(handler func())

Displays the view that allows players to engage each other with challenges.

func (*GKAccessPoint) TriggerAccessPointForFriendingWithHandler

func (o *GKAccessPoint) TriggerAccessPointForFriendingWithHandler(handler func())

Brings up the invite friends view.

func (*GKAccessPoint) TriggerAccessPointForPlayTogetherWithHandler

func (o *GKAccessPoint) TriggerAccessPointForPlayTogetherWithHandler(handler func())

Displays the view that allows players to engage each other with activities and challenges.

func (*GKAccessPoint) TriggerAccessPointWithAchievementIDHandler

func (o *GKAccessPoint) TriggerAccessPointWithAchievementIDHandler(achievementID *foundation.NSString, handler func())

Displays the Game Center dashboard in a state that shows a specific achievement.

func (*GKAccessPoint) TriggerAccessPointWithChallengeDefinitionIDHandler

func (o *GKAccessPoint) TriggerAccessPointWithChallengeDefinitionIDHandler(challengeDefinitionID *foundation.NSString, handler func())

Displays the challenge creation view for the provided challenge definition ID.

func (*GKAccessPoint) TriggerAccessPointWithGameActivityDefinitionIDHandler

func (o *GKAccessPoint) TriggerAccessPointWithGameActivityDefinitionIDHandler(gameActivityDefinitionID *foundation.NSString, handler func())

Displays the game activity creation view for the provided activity definition ID.

func (*GKAccessPoint) TriggerAccessPointWithGameActivityHandler

func (o *GKAccessPoint) TriggerAccessPointWithGameActivityHandler(gameActivity *GKGameActivity, handler func())

Displays the game activity view for the provided activity instance.

func (*GKAccessPoint) TriggerAccessPointWithHandler

func (o *GKAccessPoint) TriggerAccessPointWithHandler(handler func())

Displays the Game Center dashboard as if the player taps or presses the access point.

func (*GKAccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler

func (o *GKAccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler(leaderboardID *foundation.NSString, playerScope GKLeaderboardPlayerScope, timeScope GKLeaderboardTimeScope, handler func())

Displays the Game Center dashboard in a state that shows a specific leaderboard.

func (*GKAccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler

func (o *GKAccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler(leaderboardSetID *foundation.NSString, handler func())

Displays the Game Center dashboard in a state that shows a specific leaderboard set.

func (*GKAccessPoint) TriggerAccessPointWithPlayerHandler

func (o *GKAccessPoint) TriggerAccessPointWithPlayerHandler(player *GKPlayer, handler func())

Displays the Game Center dashboard in a state that shows a player profile.

func (*GKAccessPoint) TriggerAccessPointWithStateHandler

func (o *GKAccessPoint) TriggerAccessPointWithStateHandler(state GKGameCenterViewControllerState, handler func())

Displays the Game Center dashboard in the specified state as if the player taps or presses the access point.

type GKAccessPointLocation

type GKAccessPointLocation int64

Specifies the corner of the screen to display the access point.

const (
	GKAccessPointLocationTopLeading     GKAccessPointLocation = 0
	GKAccessPointLocationTopTrailing    GKAccessPointLocation = 1
	GKAccessPointLocationBottomLeading  GKAccessPointLocation = 2
	GKAccessPointLocationBottomTrailing GKAccessPointLocation = 3
)

func (GKAccessPointLocation) String

func (e GKAccessPointLocation) String() string

type GKAchievement

type GKAchievement struct {
	foundation.NSObject
}

An achievement you can award a player as they make progress toward and reach a goal in your game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkachievement

func GKAchievementFromID

func GKAchievementFromID(id objc.ID) *GKAchievement

func (*GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletion

func (o *GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletion(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*GKPlayer])) *appkit.NSViewController

Provides a view controller that you present to the player to issue an achievement challenge. Deprecated: since macOS 26.0.

func (*GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler

func (o *GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*foundation.NSString])) *appkit.NSViewController

Provides a view controller that you present to the player to issue an achievement challenge. Deprecated: since macOS 14.0.

func (*GKAchievement) Identifier

func (o *GKAchievement) Identifier() *foundation.NSString

Achievement identifier

func (*GKAchievement) InitWithIdentifier

func (o *GKAchievement) InitWithIdentifier(identifier *foundation.NSString) *GKAchievement

Initializes an achievement for the local player.

func (*GKAchievement) InitWithIdentifierForPlayer

func (o *GKAchievement) InitWithIdentifierForPlayer(identifier *foundation.NSString, playerID *foundation.NSString) *GKAchievement

* This method is obsolete. Calling this initializer does nothing and will return nil ** Deprecated: since macOS 10.10.

func (*GKAchievement) InitWithIdentifierPlayer

func (o *GKAchievement) InitWithIdentifierPlayer(identifier *foundation.NSString, player *GKPlayer) *GKAchievement

Initializes an achievement for a player.

func (*GKAchievement) IsCompleted

func (o *GKAchievement) IsCompleted() bool

Set to NO until percentComplete = 100.

func (*GKAchievement) IsHidden deprecated

func (o *GKAchievement) IsHidden() bool

Deprecated: since macOS 10.10.

func (*GKAchievement) IssueChallengeToPlayersMessage

func (o *GKAchievement) IssueChallengeToPlayersMessage(playerIDs *foundation.NSArray[*foundation.NSString], message *foundation.NSString)

* This method is obsolete. It will never be invoked and its implementation does nothing** Deprecated: since macOS 10.10.

func (*GKAchievement) LastReportedDate

func (o *GKAchievement) LastReportedDate() *foundation.NSDate

Date the achievement was last reported. Read-only. Created at initialization

func (*GKAchievement) PercentComplete

func (o *GKAchievement) PercentComplete() float64

Required, Percentage of achievement complete.

func (*GKAchievement) Player

func (o *GKAchievement) Player() *GKPlayer

The identifier of the player that earned the achievement.

func (*GKAchievement) PlayerID deprecated

func (o *GKAchievement) PlayerID() *foundation.NSString

Deprecated: since macOS 10.10.

func (*GKAchievement) ReportAchievementWithCompletionHandler deprecated

func (o *GKAchievement) ReportAchievementWithCompletionHandler(completionHandler func(unsafe.Pointer))

Deprecated: since macOS 10.10.

func (*GKAchievement) SelectChallengeablePlayerIDsWithCompletionHandler

func (o *GKAchievement) SelectChallengeablePlayerIDsWithCompletionHandler(playerIDs *foundation.NSArray[*foundation.NSString], completionHandler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))

* This method is obsolete. It will never be invoked and its implementation does nothing** Deprecated: This method is obsolete.

func (*GKAchievement) SelectChallengeablePlayersWithCompletionHandler

func (o *GKAchievement) SelectChallengeablePlayersWithCompletionHandler(players *foundation.NSArray[*GKPlayer], completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Finds the subset of players who can earn an achievement. Deprecated: since macOS 26.0.

func (*GKAchievement) SetIdentifier

func (o *GKAchievement) SetIdentifier(identifier *foundation.NSString)

func (*GKAchievement) SetPercentComplete

func (o *GKAchievement) SetPercentComplete(percentComplete float64)

func (*GKAchievement) SetShowsCompletionBanner

func (o *GKAchievement) SetShowsCompletionBanner(showsCompletionBanner bool)

func (*GKAchievement) ShowsCompletionBanner

func (o *GKAchievement) ShowsCompletionBanner() bool

A banner will be momentarily displayed after reporting a completed achievement

type GKAchievementChallenge

type GKAchievementChallenge struct {
	GKChallenge
}

A type of challenge where a player must earn another player’s achievement.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkachievementchallenge Deprecated: since macOS 26.0.

func GKAchievementChallengeFromID

func GKAchievementChallengeFromID(id objc.ID) *GKAchievementChallenge

func (*GKAchievementChallenge) Achievement

func (o *GKAchievementChallenge) Achievement() *GKAchievement

type GKAchievementDescription

type GKAchievementDescription struct {
	foundation.NSObject
}

An object containing the text and artwork used to present an achievement to a player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkachievementdescription

func GKAchievementDescriptionFromID

func GKAchievementDescriptionFromID(id objc.ID) *GKAchievementDescription

func (*GKAchievementDescription) AchievedDescription

func (o *GKAchievementDescription) AchievedDescription() *foundation.NSString

The description for an unachieved achievement.

func (*GKAchievementDescription) ActivityIdentifier

func (o *GKAchievementDescription) ActivityIdentifier() *foundation.NSString

The identifier of the game activity associated with this achievement, as configured by the developer in App Store Connect.

func (*GKAchievementDescription) ActivityProperties

The properties when associating this achievement with a game activity, as configured by the developer in App Store Connect.

func (*GKAchievementDescription) GroupIdentifier

func (o *GKAchievementDescription) GroupIdentifier() *foundation.NSString

The group identifier for the achievement, if one exists.

func (*GKAchievementDescription) Identifier

func (o *GKAchievementDescription) Identifier() *foundation.NSString

func (*GKAchievementDescription) Image deprecated

Deprecated: since macOS 14.2.

func (*GKAchievementDescription) IsHidden

func (o *GKAchievementDescription) IsHidden() bool

Whether or not the achievement should be listed or displayed if not yet unhidden by the game.

func (*GKAchievementDescription) IsReplayable

func (o *GKAchievementDescription) IsReplayable() bool

Whether or not the achievement will be reported by the game when the user earns it again. This allows the achievement to be used for challenges when the recipient has previously earned it.

func (*GKAchievementDescription) LoadImageWithCompletionHandler

func (o *GKAchievementDescription) LoadImageWithCompletionHandler(completionHandler func(*appkit.NSImage, unsafe.Pointer))

Loads the image to display when the player completes the achievement. Deprecated: since macOS 14.2.

func (*GKAchievementDescription) MaximumPoints

func (o *GKAchievementDescription) MaximumPoints() int

Maximum points available for completing this achievement.

func (*GKAchievementDescription) RarityPercent

func (o *GKAchievementDescription) RarityPercent() *foundation.NSNumber

If present, the rarity of the achievement expressed as a percentage of players that earned it. Null if not enough data is available to compute it.

func (*GKAchievementDescription) ReleaseState

func (o *GKAchievementDescription) ReleaseState() GKReleaseState

The release state of the achievement in App Store Connect.

func (*GKAchievementDescription) Title

The title of the achievement.

func (*GKAchievementDescription) UnachievedDescription

func (o *GKAchievementDescription) UnachievedDescription() *foundation.NSString

The description for an achieved achievement.

type GKAchievementViewController

type GKAchievementViewController struct {
	GKGameCenterViewController
}

An GKAchievementViewController object provides a standard user interface to display achievement progress for the local player. If the GKGameCenterViewController class is available, you should use it instead.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkachievementviewcontroller Deprecated: since macOS 10.10.

func GKAchievementViewControllerFromID

func GKAchievementViewControllerFromID(id objc.ID) *GKAchievementViewController

func (*GKAchievementViewController) AchievementDelegate

func (*GKAchievementViewController) SetAchievementDelegate

func (o *GKAchievementViewController) SetAchievementDelegate(achievementDelegate GKAchievementViewControllerDelegate)

type GKAchievementViewControllerDelegate

type GKAchievementViewControllerDelegate interface {
	AchievementViewControllerDidFinish(viewController *GKAchievementViewController)
}

GKAchievementViewControllerDelegate wraps the ObjC protocol GKAchievementViewControllerDelegate.

type GKBasePlayer

type GKBasePlayer struct {
	foundation.NSObject
}

A class that provides common data and methods for the different player objects.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkbaseplayer

func GKBasePlayerFromID

func GKBasePlayerFromID(id objc.ID) *GKBasePlayer

func (*GKBasePlayer) DisplayName

func (o *GKBasePlayer) DisplayName() *foundation.NSString

This player's name representation as displayed in the Game Center in-game UI. Use this when you need to display the player's name. The display name may be very long, so be sure to use appropriate string truncation API when drawing. Deprecated: since macOS 10.15.

func (*GKBasePlayer) PlayerID deprecated

func (o *GKBasePlayer) PlayerID() *foundation.NSString

Deprecated: since macOS 10.15.

type GKChallenge

type GKChallenge struct {
	foundation.NSObject
}

A challenge issued by the local player to another player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkchallenge Deprecated: since macOS 26.0.

func GKChallengeFromID

func GKChallengeFromID(id objc.ID) *GKChallenge

func (*GKChallenge) CompletionDate

func (o *GKChallenge) CompletionDate() *foundation.NSDate

Date the challenge was completed or aborted

func (*GKChallenge) Decline

func (o *GKChallenge) Decline()

Declines a challenge that another player issues to the local player.

func (*GKChallenge) IssueDate

func (o *GKChallenge) IssueDate() *foundation.NSDate

Date the challenge was issued

func (*GKChallenge) IssuingPlayer

func (o *GKChallenge) IssuingPlayer() *GKPlayer

The GKPlayer who issued the challenge

func (*GKChallenge) IssuingPlayerID

func (o *GKChallenge) IssuingPlayerID() *foundation.NSString

* This property is obsolete. ** Deprecated: since macOS 10.10.

func (*GKChallenge) Message

func (o *GKChallenge) Message() *foundation.NSString

The message sent to receivers of this challenge

func (*GKChallenge) ReceivingPlayer

func (o *GKChallenge) ReceivingPlayer() *GKPlayer

The GKPlayer who has received the challenge

func (*GKChallenge) ReceivingPlayerID

func (o *GKChallenge) ReceivingPlayerID() *foundation.NSString

* This property is obsolete. ** Deprecated: since macOS 10.10.

func (*GKChallenge) State

func (o *GKChallenge) State() GKChallengeState

Current state of the challenge

type GKChallengeDefinition

type GKChallengeDefinition struct {
	foundation.NSObject
}

An object that represents the static metadata you define for the challenge.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkchallengedefinition

func GKChallengeDefinitionFromID

func GKChallengeDefinitionFromID(id objc.ID) *GKChallengeDefinition

func (*GKChallengeDefinition) Details

A more detailed description of the challenge definition.

func (*GKChallengeDefinition) DurationOptions

The duration options for the challenge, like `1 day` or `1 week`. - Note: If set, the amount of weeks is stored in the `weekOfYear` field. - Important: The actual duration of the challenge may be dynamically adjusted in order to accommodate different factors like players' timezones.

func (*GKChallengeDefinition) GroupIdentifier

func (o *GKChallengeDefinition) GroupIdentifier() *foundation.NSString

The group identifier for the challenge definition, if one exists.

func (*GKChallengeDefinition) HasActiveChallengesWithCompletionHandler

func (o *GKChallengeDefinition) HasActiveChallengesWithCompletionHandler(completionHandler func(bool, unsafe.Pointer))

Indicates if this definition has active challenges associated with it.

func (*GKChallengeDefinition) Identifier

func (o *GKChallengeDefinition) Identifier() *foundation.NSString

The developer defined identifier for a given challenge definition.

func (*GKChallengeDefinition) IsRepeatable

func (o *GKChallengeDefinition) IsRepeatable() bool

Indicates if a challenge can be attempted more than once.

func (*GKChallengeDefinition) Leaderboard

func (o *GKChallengeDefinition) Leaderboard() *GKLeaderboard

Scores submitted to this leaderboard will also be submitted as scores in this challenge.

func (*GKChallengeDefinition) LoadImageWithCompletionHandler

func (o *GKChallengeDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))

Loads the image set on the challenge definition, which may be nil if none was set.

func (*GKChallengeDefinition) ReleaseState

func (o *GKChallengeDefinition) ReleaseState() GKReleaseState

The release state of the challenge definition in App Store Connect.

func (*GKChallengeDefinition) Title

A short title for the challenge definition.

type GKChallengeEventHandler

type GKChallengeEventHandler struct {
	foundation.NSObject
}

The GKChallengeEventHandler class is used to respond to events related to challenges sent or received by the local player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkchallengeeventhandler Deprecated: You should instead implement the GKChallengeListener protocol and register a listener with GKLocalPlayer.

func GKChallengeEventHandlerChallengeEventHandler

func GKChallengeEventHandlerChallengeEventHandler() *GKChallengeEventHandler

Returns the shared instance of the event handler Deprecated: No longer supported.

func GKChallengeEventHandlerFromID

func GKChallengeEventHandlerFromID(id objc.ID) *GKChallengeEventHandler

func (*GKChallengeEventHandler) Delegate deprecated

Deprecated: No longer supported.

func (*GKChallengeEventHandler) SetDelegate deprecated

Deprecated: No longer supported.

type GKChallengeEventHandlerDelegate

type GKChallengeEventHandlerDelegate interface {
}

GKChallengeEventHandlerDelegate wraps the ObjC protocol GKChallengeEventHandlerDelegate.

type GKChallengeListener

type GKChallengeListener interface {
}

GKChallengeListener wraps the ObjC protocol GKChallengeListener.

type GKChallengeState

type GKChallengeState int64

The state of a challenge. Deprecated: since macOS 26.0.

const (
	// The challenge isn’t valid because an error occurred.
	GKChallengeStateInvalid GKChallengeState = 0
	// The player issued a challenge, but the other player hasn’t accepted or refused it.
	GKChallengeStatePending GKChallengeState = 1
	// The player successfully completed the challenge.
	GKChallengeStateCompleted GKChallengeState = 2
	// The player declined the challenge.
	GKChallengeStateDeclined GKChallengeState = 3
)

func (GKChallengeState) String

func (e GKChallengeState) String() string

type GKChallengesViewController

type GKChallengesViewController struct {
	appkit.NSViewController
}

Apple documentation: https://developer.apple.com/documentation/gamekit/gkchallengesviewcontroller Deprecated: No longer supported

func GKChallengesViewControllerFromID

func GKChallengesViewControllerFromID(id objc.ID) *GKChallengesViewController

func (*GKChallengesViewController) ChallengeDelegate

func (*GKChallengesViewController) SetChallengeDelegate

func (o *GKChallengesViewController) SetChallengeDelegate(challengeDelegate GKChallengesViewControllerDelegate)

type GKChallengesViewControllerDelegate

type GKChallengesViewControllerDelegate interface {
	ChallengesViewControllerDidFinish(viewController *GKChallengesViewController)
}

GKChallengesViewControllerDelegate wraps the ObjC protocol GKChallengesViewControllerDelegate.

type GKCloudPlayer

type GKCloudPlayer struct {
	GKBasePlayer
}

The object representing the currently signed-in iCloud user.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkcloudplayer Deprecated: since macOS 10.14.

func GKCloudPlayerFromID

func GKCloudPlayerFromID(id objc.ID) *GKCloudPlayer

type GKConnectionState

type GKConnectionState int64

Possible connection states for a player

const (
	// The player is not connected to the game session.
	GKConnectionStateNotConnected GKConnectionState = 0
	// The player is connected to the game session.
	GKConnectionStateConnected GKConnectionState = 1
)

func (GKConnectionState) String

func (e GKConnectionState) String() string

type GKDialogController

type GKDialogController struct {
	appkit.NSResponder
}

An object that provides the ability to present the dashboard in macOS games.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkdialogcontroller

func GKDialogControllerFromID

func GKDialogControllerFromID(id objc.ID) *GKDialogController

func GKDialogControllerSharedDialogController

func GKDialogControllerSharedDialogController() *GKDialogController

Retrieves the shared instance of the dialog controller.

func (*GKDialogController) Dismiss

func (o *GKDialogController) Dismiss(sender objc.ID)

Dismisses the dashboard.

func (*GKDialogController) ParentWindow

func (o *GKDialogController) ParentWindow() *appkit.NSWindow

func (*GKDialogController) PresentViewController

func (o *GKDialogController) PresentViewController(viewController *appkit.NSViewController) bool

Presents the dashboard in the window.

func (*GKDialogController) SetParentWindow

func (o *GKDialogController) SetParentWindow(parentWindow *appkit.NSWindow)

type GKErrorCode

type GKErrorCode int64

Error codes for the GameKit error domain.

const (
	GKErrorUnknown                          GKErrorCode = 1
	GKErrorCancelled                        GKErrorCode = 2
	GKErrorCommunicationsFailure            GKErrorCode = 3
	GKErrorUserDenied                       GKErrorCode = 4
	GKErrorInvalidCredentials               GKErrorCode = 5
	GKErrorNotAuthenticated                 GKErrorCode = 6
	GKErrorAuthenticationInProgress         GKErrorCode = 7
	GKErrorInvalidPlayer                    GKErrorCode = 8
	GKErrorScoreNotSet                      GKErrorCode = 9
	GKErrorParentalControlsBlocked          GKErrorCode = 10
	GKErrorPlayerStatusExceedsMaximumLength GKErrorCode = 11
	GKErrorPlayerStatusInvalid              GKErrorCode = 12
	GKErrorMatchRequestInvalid              GKErrorCode = 13
	GKErrorUnderage                         GKErrorCode = 14
	GKErrorGameUnrecognized                 GKErrorCode = 15
	GKErrorNotSupported                     GKErrorCode = 16
	GKErrorInvalidParameter                 GKErrorCode = 17
	GKErrorUnexpectedConnection             GKErrorCode = 18
	GKErrorChallengeInvalid                 GKErrorCode = 19
	GKErrorTurnBasedMatchDataTooLarge       GKErrorCode = 20
	GKErrorTurnBasedTooManySessions         GKErrorCode = 21
	GKErrorTurnBasedInvalidParticipant      GKErrorCode = 22
	GKErrorTurnBasedInvalidTurn             GKErrorCode = 23
	GKErrorTurnBasedInvalidState            GKErrorCode = 24
	GKErrorInvitationsDisabled              GKErrorCode = 25
	GKErrorPlayerPhotoFailure               GKErrorCode = 26
	GKErrorUbiquityContainerUnavailable     GKErrorCode = 27
	GKErrorMatchNotConnected                GKErrorCode = 28
	GKErrorGameSessionRequestInvalid        GKErrorCode = 29
	GKErrorRestrictedToAutomatch            GKErrorCode = 30
	GKErrorAPINotAvailable                  GKErrorCode = 31
	GKErrorNotAuthorized                    GKErrorCode = 32
	GKErrorConnectionTimeout                GKErrorCode = 33
	GKErrorAPIObsolete                      GKErrorCode = 34
	GKErrorICloudUnavailable                GKErrorCode = 35
	GKErrorLockdownMode                     GKErrorCode = 36
	GKErrorAppUnlisted                      GKErrorCode = 37
	GKErrorDebugMode                        GKErrorCode = 38
	GKErrorFriendListDescriptionMissing     GKErrorCode = 100
	GKErrorFriendListRestricted             GKErrorCode = 101
	GKErrorFriendListDenied                 GKErrorCode = 102
	GKErrorFriendRequestNotAvailable        GKErrorCode = 103
)

func (GKErrorCode) String

func (e GKErrorCode) String() string

type GKFriendRequestComposeViewController

type GKFriendRequestComposeViewController struct {
	appkit.NSViewController
}

Your game uses the GKFriendRequestComposeViewController class to present a screen that allows the local player to send friend requests to other players.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkfriendrequestcomposeviewcontroller Deprecated: No longer supported.

func GKFriendRequestComposeViewControllerFromID

func GKFriendRequestComposeViewControllerFromID(id objc.ID) *GKFriendRequestComposeViewController

func (*GKFriendRequestComposeViewController) AddRecipientPlayers

func (o *GKFriendRequestComposeViewController) AddRecipientPlayers(players *foundation.NSArray[*GKPlayer])

Adds recipients based on their Game Center player identifiers.

func (*GKFriendRequestComposeViewController) AddRecipientsWithEmailAddresses

func (o *GKFriendRequestComposeViewController) AddRecipientsWithEmailAddresses(emailAddresses *foundation.NSArray[*foundation.NSString])

Adds recipients based on their email addresses. Deprecated: since macOS 10.10.

func (*GKFriendRequestComposeViewController) AddRecipientsWithPlayerIDs

func (o *GKFriendRequestComposeViewController) AddRecipientsWithPlayerIDs(playerIDs *foundation.NSArray[*foundation.NSString])

Adds recipients based on their Game Center player identifiers. Deprecated: since macOS 10.10.

func (*GKFriendRequestComposeViewController) ComposeViewDelegate deprecated

Deprecated: No longer supported.

func (*GKFriendRequestComposeViewController) SetComposeViewDelegate deprecated

func (o *GKFriendRequestComposeViewController) SetComposeViewDelegate(composeViewDelegate GKFriendRequestComposeViewControllerDelegate)

Deprecated: No longer supported.

func (*GKFriendRequestComposeViewController) SetMessage

Sets the text message included in the friend invitation.

type GKFriendRequestComposeViewControllerDelegate

type GKFriendRequestComposeViewControllerDelegate interface {
	FriendRequestComposeViewControllerDidFinish(viewController *GKFriendRequestComposeViewController)
}

GKFriendRequestComposeViewControllerDelegate wraps the ObjC protocol GKFriendRequestComposeViewControllerDelegate.

type GKFriendsAuthorizationStatus

type GKFriendsAuthorizationStatus int64

Constants that indicate if the local player grants access to their friends list.

const (
	// The player hasn’t choosen whether your game may access their friends list.
	GKFriendsAuthorizationStatusNotDetermined GKFriendsAuthorizationStatus = 0
	// Access to the player’s list of friends restricted.
	GKFriendsAuthorizationStatusRestricted GKFriendsAuthorizationStatus = 1
	// Access to the player’s friends’ data denied.
	GKFriendsAuthorizationStatusDenied GKFriendsAuthorizationStatus = 2
	// The player authorized your game to access their list of friends.
	GKFriendsAuthorizationStatusAuthorized GKFriendsAuthorizationStatus = 3
)

func (GKFriendsAuthorizationStatus) String

type GKGameActivity

type GKGameActivity struct {
	foundation.NSObject
}

An object that represents a single instance of a game activity for the current game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkgameactivity

func GKGameActivityFromID

func GKGameActivityFromID(id objc.ID) *GKGameActivity

func GKGameActivityStartWithDefinitionError

func GKGameActivityStartWithDefinitionError(activityDefinition *GKGameActivityDefinition) (*GKGameActivity, error)

Creates and starts a game activity with a definition.

func GKGameActivityStartWithDefinitionPartyCodeError

func GKGameActivityStartWithDefinitionPartyCodeError(activityDefinition *GKGameActivityDefinition, partyCode *foundation.NSString) (*GKGameActivity, error)

Creates and starts a new game activity with a custom party code.

func (*GKGameActivity) Achievements

func (o *GKGameActivity) Achievements() *foundation.NSSet[*GKAchievement]

All achievements that have been associated with this activity. Progress of each achievement will be reported when the activity ends.

func (*GKGameActivity) ActivityDefinition

func (o *GKGameActivity) ActivityDefinition() *GKGameActivityDefinition

The activity definition that this activity instance is based on.

func (*GKGameActivity) CreationDate

func (o *GKGameActivity) CreationDate() *foundation.NSDate

The date when the activity was created.

func (*GKGameActivity) Duration

func (o *GKGameActivity) Duration() float64

The total time elapsed while in active state.

func (*GKGameActivity) End

func (o *GKGameActivity) End()

Ends the game activity if it’s not already ended.

func (*GKGameActivity) EndDate

func (o *GKGameActivity) EndDate() *foundation.NSDate

The date when the activity was officially ended.

func (*GKGameActivity) FindMatchWithCompletionHandler

func (o *GKGameActivity) FindMatchWithCompletionHandler(completionHandler func(*GKMatch, unsafe.Pointer))

Use information from the activity to find matches for the local player.

func (*GKGameActivity) FindPlayersForHostedMatchWithCompletionHandler

func (o *GKGameActivity) FindPlayersForHostedMatchWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Use information from the activity to find server hosted players for the local player.

func (*GKGameActivity) GetProgressOnAchievement

func (o *GKGameActivity) GetProgressOnAchievement(achievement *GKAchievement) float64

Get the achievement progress from a specific achievement of the local player if previously set.

func (*GKGameActivity) GetScoreOnLeaderboard

func (o *GKGameActivity) GetScoreOnLeaderboard(leaderboard *GKLeaderboard) *GKLeaderboardScore

Get the leaderboard score from a specific leaderboard of the local player if previously set.

func (*GKGameActivity) Identifier

func (o *GKGameActivity) Identifier() *foundation.NSString

The identifier of this activity instance.

func (*GKGameActivity) InitWithDefinition

func (o *GKGameActivity) InitWithDefinition(activityDefinition *GKGameActivityDefinition) *GKGameActivity

Creates a game activity with definition.

func (*GKGameActivity) LastResumeDate

func (o *GKGameActivity) LastResumeDate() *foundation.NSDate

The date when the activity was last resumed. - If the activity was first started, this will be the same as the start date. - If the activity was paused and resumed, this will be the date when the activity was resumed.

func (*GKGameActivity) LeaderboardScores

func (o *GKGameActivity) LeaderboardScores() *foundation.NSSet[*GKLeaderboardScore]

All leaderboard scores that have been associated with this activity. Scores will be submitted to the leaderboards when the activity ends.

func (*GKGameActivity) MakeMatchRequest

func (o *GKGameActivity) MakeMatchRequest() *GKMatchRequest

Makes a match request object with information from the activity, which you can use to find matches for the local player.

func (*GKGameActivity) PartyCode

func (o *GKGameActivity) PartyCode() *foundation.NSString

If the game supports party code, this is the party code that can be shared among players to join the party. If the game doesn't support party code, this value will be `nil`. Use “GKGameActivity/start(definition:partyCode:)“ to create a game activity with a custom party code.

func (*GKGameActivity) PartyURL

func (o *GKGameActivity) PartyURL() *foundation.NSURL

If the game supports party code, this is the URL that can be shared among players to join the party.

func (*GKGameActivity) Pause

func (o *GKGameActivity) Pause()

Pauses the game activity if it’s not already paused.

func (*GKGameActivity) Properties

Properties that contain additional information about the activity. This takes precedence over “GKGameActivityDefinition/defaultProperties“ on the activity definition. 1. The framework initializes this dictionary with the default properties from the activity definition and deep linked properties, if any. 2. If deep linking contains the same key as the default properties, the deep linked value overrides the default value. 3. You can update the properties at runtime.

func (*GKGameActivity) RemoveAchievements

func (o *GKGameActivity) RemoveAchievements(achievements *foundation.NSArray[*GKAchievement])

Removes all achievements if they exist.

func (*GKGameActivity) RemoveScoresFromLeaderboards

func (o *GKGameActivity) RemoveScoresFromLeaderboards(leaderboards *foundation.NSArray[*GKLeaderboard])

Removes all scores from leaderboards for a player if exist.

func (*GKGameActivity) Resume

func (o *GKGameActivity) Resume()

Resumes the game activity if it was paused.

func (*GKGameActivity) SetAchievementCompleted

func (o *GKGameActivity) SetAchievementCompleted(achievement *GKAchievement)

Set progress to 100% for an achievement for a player.

func (*GKGameActivity) SetProgressOnAchievementToPercentComplete

func (o *GKGameActivity) SetProgressOnAchievementToPercentComplete(achievement *GKAchievement, percentComplete float64)

Set a progress for an achievement for a player.

func (*GKGameActivity) SetProperties

func (o *GKGameActivity) SetProperties(properties *foundation.NSDictionary[*foundation.NSString, *foundation.NSString])

func (*GKGameActivity) SetScoreOnLeaderboardToScore

func (o *GKGameActivity) SetScoreOnLeaderboardToScore(leaderboard *GKLeaderboard, score int)

Set a score of a leaderboard for a player.

func (*GKGameActivity) SetScoreOnLeaderboardToScoreContext

func (o *GKGameActivity) SetScoreOnLeaderboardToScoreContext(leaderboard *GKLeaderboard, score int, context_ uint)

Set a score of a leaderboard with a context for a player.

func (*GKGameActivity) Start

func (o *GKGameActivity) Start()

Starts the game activity if it’s not already started.

func (*GKGameActivity) StartDate

func (o *GKGameActivity) StartDate() *foundation.NSDate

The date when the activity was initially started.

func (*GKGameActivity) State

The state of the game activity.

type GKGameActivityDefinition

type GKGameActivityDefinition struct {
	foundation.NSObject
}

An object that represents the static metadata you define for the activity.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkgameactivitydefinition

func GKGameActivityDefinitionFromID

func GKGameActivityDefinitionFromID(id objc.ID) *GKGameActivityDefinition

func (*GKGameActivityDefinition) DefaultProperties

Default properties defined by the developer for this type of game activity.

func (*GKGameActivityDefinition) Details

A more detailed description of the game activity.

func (*GKGameActivityDefinition) FallbackURL

func (o *GKGameActivityDefinition) FallbackURL() *foundation.NSURL

A fallback URL that can be used to construct a game-specific URL for players to share or join, if the joining device does not support the default URL.

func (*GKGameActivityDefinition) GroupIdentifier

func (o *GKGameActivityDefinition) GroupIdentifier() *foundation.NSString

The group identifier for the activity, if one exists.

func (*GKGameActivityDefinition) Identifier

func (o *GKGameActivityDefinition) Identifier() *foundation.NSString

The developer defined identifier for a given game activity.

func (*GKGameActivityDefinition) LoadAchievementDescriptionsWithCompletionHandler

func (o *GKGameActivityDefinition) LoadAchievementDescriptionsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKAchievementDescription], unsafe.Pointer))

Loads all associated achievements that have defined deep links to this game activity definition.

func (*GKGameActivityDefinition) LoadImageWithCompletionHandler

func (o *GKGameActivityDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))

Asynchronously load the image. Error will be nil on success.

func (*GKGameActivityDefinition) LoadLeaderboardsWithCompletionHandler

func (o *GKGameActivityDefinition) LoadLeaderboardsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKLeaderboard], unsafe.Pointer))

Loads all associated leaderboards that have defined deep links to this game activity definition.

func (*GKGameActivityDefinition) MaxPlayers

func (o *GKGameActivityDefinition) MaxPlayers() *foundation.NSNumber

The maximum number of participants that can join the activity. Returns nil when no maximum is set (unlimited players) or when player range is undefined. When not nil, the value is always greater than or equal to `minPlayers`.

func (*GKGameActivityDefinition) MinPlayers

func (o *GKGameActivityDefinition) MinPlayers() *foundation.NSNumber

The minimum number of participants that can join the activity.

func (*GKGameActivityDefinition) PlayStyle

The play style of the game activity.

func (*GKGameActivityDefinition) ReleaseState

func (o *GKGameActivityDefinition) ReleaseState() GKReleaseState

The release state of the game activity definition in App Store Connect.

func (*GKGameActivityDefinition) SupportsPartyCode

func (o *GKGameActivityDefinition) SupportsPartyCode() bool

Whether the activity can be joined by others via a party code. - SeeAlso: “-[GKGameActivityListener player:wantsToPlayGameActivity:completionHandler:]“ where you can receive and handle game activities that players want to play in a party with friends.

func (*GKGameActivityDefinition) SupportsUnlimitedPlayers

func (o *GKGameActivityDefinition) SupportsUnlimitedPlayers() bool

True if the activity supports an unlimited number of players. False if maxPlayers is set to a defined limit or if no player range is provided.

func (*GKGameActivityDefinition) Title

A short title for the game activity.

type GKGameActivityListener

type GKGameActivityListener interface {
}

GKGameActivityListener wraps the ObjC protocol GKGameActivityListener.

type GKGameActivityPlayStyle

type GKGameActivityPlayStyle int64

Play Style of the game activity. It can be either Asynchronous or Synchronous.

const (
	GKGameActivityPlayStyleUnspecified  GKGameActivityPlayStyle = 0
	GKGameActivityPlayStyleSynchronous  GKGameActivityPlayStyle = 1
	GKGameActivityPlayStyleAsynchronous GKGameActivityPlayStyle = 2
)

func (GKGameActivityPlayStyle) String

func (e GKGameActivityPlayStyle) String() string

type GKGameActivityState

type GKGameActivityState uint64
const (
	// The game activity is initialized but has not started.
	GKGameActivityStateInitialized GKGameActivityState = 0
	// The game activity is active.
	GKGameActivityStateActive GKGameActivityState = 1
	// The game activity is paused.
	GKGameActivityStatePaused GKGameActivityState = 2
	// The game activity has ended. This is a terminal state.
	GKGameActivityStateEnded GKGameActivityState = 4
)

func (GKGameActivityState) String

func (e GKGameActivityState) String() string

type GKGameCenterControllerDelegate

type GKGameCenterControllerDelegate interface {
	GameCenterViewControllerDidFinish(gameCenterViewController *GKGameCenterViewController)
}

GKGameCenterControllerDelegate wraps the ObjC protocol GKGameCenterControllerDelegate.

type GKGameCenterViewController

type GKGameCenterViewController struct {
	appkit.NSViewController
}

The dashboard that allows players to access their Game Center data in your game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkgamecenterviewcontroller Deprecated: since macOS 26.0.

func GKGameCenterViewControllerFromID

func GKGameCenterViewControllerFromID(id objc.ID) *GKGameCenterViewController

func (*GKGameCenterViewController) GameCenterDelegate

func (*GKGameCenterViewController) InitWithAchievementID

func (o *GKGameCenterViewController) InitWithAchievementID(achievementID *foundation.NSString) *GKGameCenterViewController

Creates a view controller that presents an achievement.

func (*GKGameCenterViewController) InitWithLeaderboardIDPlayerScopeTimeScope

func (o *GKGameCenterViewController) InitWithLeaderboardIDPlayerScopeTimeScope(leaderboardID *foundation.NSString, playerScope GKLeaderboardPlayerScope, timeScope GKLeaderboardTimeScope) *GKGameCenterViewController

Creates a view controller that presents a leaderboard with data from the specified players and time period.

func (*GKGameCenterViewController) InitWithLeaderboardPlayerScope

func (o *GKGameCenterViewController) InitWithLeaderboardPlayerScope(leaderboard *GKLeaderboard, playerScope GKLeaderboardPlayerScope) *GKGameCenterViewController

Creates a view controller that presents a leaderboard with data for the specified players.

func (*GKGameCenterViewController) InitWithLeaderboardSetID

func (o *GKGameCenterViewController) InitWithLeaderboardSetID(leaderboardSetID *foundation.NSString) *GKGameCenterViewController

Creates a view controller that presents a leaderboard set.

func (*GKGameCenterViewController) InitWithPlayer

Creates a view controller that presents a player’s Game Center profile.

func (*GKGameCenterViewController) InitWithState

Creates a view controller that presents the specified Game Center content.

func (*GKGameCenterViewController) LeaderboardCategory deprecated

func (o *GKGameCenterViewController) LeaderboardCategory() *foundation.NSString

Deprecated: since macOS 10.10.

func (*GKGameCenterViewController) LeaderboardIdentifier deprecated

func (o *GKGameCenterViewController) LeaderboardIdentifier() *foundation.NSString

Deprecated: since macOS 11.0.

func (*GKGameCenterViewController) LeaderboardTimeScope deprecated

func (o *GKGameCenterViewController) LeaderboardTimeScope() GKLeaderboardTimeScope

Deprecated: since macOS 11.0.

func (*GKGameCenterViewController) SetGameCenterDelegate

func (o *GKGameCenterViewController) SetGameCenterDelegate(gameCenterDelegate GKGameCenterControllerDelegate)

func (*GKGameCenterViewController) SetLeaderboardCategory deprecated

func (o *GKGameCenterViewController) SetLeaderboardCategory(leaderboardCategory *foundation.NSString)

Deprecated: since macOS 10.10.

func (*GKGameCenterViewController) SetLeaderboardIdentifier deprecated

func (o *GKGameCenterViewController) SetLeaderboardIdentifier(leaderboardIdentifier *foundation.NSString)

Deprecated: since macOS 11.0.

func (*GKGameCenterViewController) SetLeaderboardTimeScope deprecated

func (o *GKGameCenterViewController) SetLeaderboardTimeScope(leaderboardTimeScope GKLeaderboardTimeScope)

Deprecated: since macOS 11.0.

func (*GKGameCenterViewController) SetViewState deprecated

Deprecated: since macOS 11.0.

func (*GKGameCenterViewController) ViewState deprecated

Deprecated: since macOS 11.0.

type GKGameCenterViewControllerState

type GKGameCenterViewControllerState int64

The type of content for the view controller to present.

const (
	// The view controller should present the default screen.
	GKGameCenterViewControllerStateDefault GKGameCenterViewControllerState = -1
	// The view controller should present leaderboard sets or leaderboards if there are no sets.
	GKGameCenterViewControllerStateLeaderboards GKGameCenterViewControllerState = 0
	// The view controller should present a list of achievements.
	GKGameCenterViewControllerStateAchievements GKGameCenterViewControllerState = 1
	// The view controller should present a list of challenges.
	GKGameCenterViewControllerStateChallenges GKGameCenterViewControllerState = 2
	// The view controller should present the local player’s profile.
	GKGameCenterViewControllerStateLocalPlayerProfile GKGameCenterViewControllerState = 3
	// The view controller should present the dashboard.
	GKGameCenterViewControllerStateDashboard GKGameCenterViewControllerState = 4
	// The view controller should present the friends list.
	GKGameCenterViewControllerStateLocalPlayerFriendsList GKGameCenterViewControllerState = 5
)

func (GKGameCenterViewControllerState) String

type GKGameSession

type GKGameSession struct {
	foundation.NSObject
}

A game session you can use to save game data, invite other players, and create turn-based and real-time game apps.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkgamesession Deprecated: For real-time matches, use GKMatchmakerViewController. For turn-based matches, use GKTurnBasedMatchmakerViewController.

func GKGameSessionFromID

func GKGameSessionFromID(id objc.ID) *GKGameSession

func (*GKGameSession) BadgedPlayers

func (o *GKGameSession) BadgedPlayers() *foundation.NSArray[*GKCloudPlayer]

func (*GKGameSession) ClearBadgeForPlayersCompletionHandler

func (o *GKGameSession) ClearBadgeForPlayersCompletionHandler(players *foundation.NSArray[*GKCloudPlayer], completionHandler func(unsafe.Pointer))

Clears the badge from the designated players.

func (*GKGameSession) GetShareURLWithCompletionHandler

func (o *GKGameSession) GetShareURLWithCompletionHandler(completionHandler func(*foundation.NSURL, unsafe.Pointer))

Retrieves the URL used to share a game session.

func (*GKGameSession) Identifier

func (o *GKGameSession) Identifier() *foundation.NSString

func (*GKGameSession) LastModifiedDate

func (o *GKGameSession) LastModifiedDate() *foundation.NSDate

func (*GKGameSession) LastModifiedPlayer

func (o *GKGameSession) LastModifiedPlayer() *GKCloudPlayer

func (*GKGameSession) LoadDataWithCompletionHandler

func (o *GKGameSession) LoadDataWithCompletionHandler(completionHandler func(*foundation.NSData, unsafe.Pointer))

Retrieves the game data from the current game session.

func (*GKGameSession) MaxNumberOfConnectedPlayers

func (o *GKGameSession) MaxNumberOfConnectedPlayers() int

func (*GKGameSession) Owner

func (o *GKGameSession) Owner() *GKCloudPlayer

func (*GKGameSession) Players

func (*GKGameSession) PlayersWithConnectionState

func (o *GKGameSession) PlayersWithConnectionState(state GKConnectionState) *foundation.NSArray[*GKCloudPlayer]

Retrieves a list of players with the specified connection state.

func (*GKGameSession) SaveDataCompletionHandler

func (o *GKGameSession) SaveDataCompletionHandler(data *foundation.NSData, completionHandler func(*foundation.NSData, unsafe.Pointer))

Saves the current game session data.

func (*GKGameSession) SendDataWithTransportTypeCompletionHandler

func (o *GKGameSession) SendDataWithTransportTypeCompletionHandler(data *foundation.NSData, transport GKTransportType, completionHandler func(unsafe.Pointer))

Sends the indicated data to all connected players.

func (*GKGameSession) SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler

func (o *GKGameSession) SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler(key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString], data *foundation.NSData, players *foundation.NSArray[*GKCloudPlayer], badgePlayers bool, completionHandler func(unsafe.Pointer))

Sends a message to players in a game session.

func (*GKGameSession) SetConnectionStateCompletionHandler

func (o *GKGameSession) SetConnectionStateCompletionHandler(state GKConnectionState, completionHandler func(unsafe.Pointer))

Sets the connection state for the player.

func (*GKGameSession) Title

func (o *GKGameSession) Title() *foundation.NSString

type GKGameSessionErrorCode

type GKGameSessionErrorCode int64

Error codes for the game session domain. Deprecated: GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead.

const (
	GKGameSessionErrorUnknown                       GKGameSessionErrorCode = 1
	GKGameSessionErrorNotAuthenticated              GKGameSessionErrorCode = 2
	GKGameSessionErrorSessionConflict               GKGameSessionErrorCode = 3
	GKGameSessionErrorSessionNotShared              GKGameSessionErrorCode = 4
	GKGameSessionErrorConnectionCancelledByUser     GKGameSessionErrorCode = 5
	GKGameSessionErrorConnectionFailed              GKGameSessionErrorCode = 6
	GKGameSessionErrorSessionHasMaxConnectedPlayers GKGameSessionErrorCode = 7
	GKGameSessionErrorSendDataNotConnected          GKGameSessionErrorCode = 8
	GKGameSessionErrorSendDataNoRecipients          GKGameSessionErrorCode = 9
	GKGameSessionErrorSendDataNotReachable          GKGameSessionErrorCode = 10
	GKGameSessionErrorSendRateLimitReached          GKGameSessionErrorCode = 11
	GKGameSessionErrorBadContainer                  GKGameSessionErrorCode = 12
	GKGameSessionErrorCloudQuotaExceeded            GKGameSessionErrorCode = 13
	GKGameSessionErrorNetworkFailure                GKGameSessionErrorCode = 14
	GKGameSessionErrorCloudDriveDisabled            GKGameSessionErrorCode = 15
	GKGameSessionErrorInvalidSession                GKGameSessionErrorCode = 16
)

func (GKGameSessionErrorCode) String

func (e GKGameSessionErrorCode) String() string

type GKGameSessionEventListener

type GKGameSessionEventListener interface {
}

GKGameSessionEventListener wraps the ObjC protocol GKGameSessionEventListener.

type GKInvite

type GKInvite struct {
	foundation.NSObject
}

An invitation to join a match sent to the local player from another player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkinvite

func GKInviteFromID

func GKInviteFromID(id objc.ID) *GKInvite

func (*GKInvite) Inviter

func (o *GKInvite) Inviter() *foundation.NSString

* This property is obsolete. ** Deprecated: since macOS 10.10.

func (*GKInvite) IsHosted

func (o *GKInvite) IsHosted() bool

func (*GKInvite) PlayerAttributes

func (o *GKInvite) PlayerAttributes() uint32

player attributes from inviter's match request

func (*GKInvite) PlayerGroup

func (o *GKInvite) PlayerGroup() uint

player group from inviter's match request

func (*GKInvite) Sender

func (o *GKInvite) Sender() *GKPlayer

type GKInviteEventListener

type GKInviteEventListener interface {
}

GKInviteEventListener wraps the ObjC protocol GKInviteEventListener.

type GKInviteRecipientResponse

type GKInviteRecipientResponse int64

A player’s response to an invitation to join a match.

const (
	// A response when the player accepts the invitation.
	GKInviteRecipientResponseAccepted GKInviteRecipientResponse = 0
	// A response when the player rejects the invitation.
	GKInviteRecipientResponseDeclined GKInviteRecipientResponse = 1
	// A response when the system fails to deliver the invitation to the player.
	GKInviteRecipientResponseFailed GKInviteRecipientResponse = 2
	// A response when the player isn’t running a compatible version of the game.
	GKInviteRecipientResponseIncompatible GKInviteRecipientResponse = 3
	// A response when the system can’t contact the player.
	GKInviteRecipientResponseUnableToConnect GKInviteRecipientResponse = 4
	// A response when the invitation times out because the player doesn’t answer it.
	GKInviteRecipientResponseNoAnswer GKInviteRecipientResponse = 5
	// The player accepted the invitation.
	GKInviteeResponseAccepted GKInviteRecipientResponse = 0
	// The player rejected the invitation.
	GKInviteeResponseDeclined GKInviteRecipientResponse = 1
	// The invitation was unable to be delivered.
	GKInviteeResponseFailed GKInviteRecipientResponse = 2
	// The invitee isn’t running a compatible version of your game.
	GKInviteeResponseIncompatible GKInviteRecipientResponse = 3
	// The invitee couldn’t be contacted.
	GKInviteeResponseUnableToConnect GKInviteRecipientResponse = 4
	// The invitation timed out without an answer.
	GKInviteeResponseNoAnswer GKInviteRecipientResponse = 5
)

func (GKInviteRecipientResponse) String

func (e GKInviteRecipientResponse) String() string

type GKLeaderboard

type GKLeaderboard struct {
	foundation.NSObject
}

A leaderboard for a game that Game Center stores.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkleaderboard

func GKLeaderboardFromID

func GKLeaderboardFromID(id objc.ID) *GKLeaderboard

func (*GKLeaderboard) ActivityIdentifier

func (o *GKLeaderboard) ActivityIdentifier() *foundation.NSString

The identifier of the game activity associated with this leaderboard, as configured by the developer in App Store Connect.

func (*GKLeaderboard) ActivityProperties

The properties when associating this leaderboard with a game activity, as configured by the developer in App Store Connect.

func (*GKLeaderboard) BaseLeaderboardID

func (o *GKLeaderboard) BaseLeaderboardID() *foundation.NSString

Leaderboard ID defined in App Store Connect that this instance is associated with

func (*GKLeaderboard) Category deprecated

func (o *GKLeaderboard) Category() *foundation.NSString

Deprecated: since macOS 10.10.

func (*GKLeaderboard) Duration

func (o *GKLeaderboard) Duration() float64

Duration from startDate during which this leaderboard instance accepts score submissions (only applicable to recurring leaderboards)

func (*GKLeaderboard) GroupIdentifier

func (o *GKLeaderboard) GroupIdentifier() *foundation.NSString

set when leaderboards have been designated a game group; set when loadLeaderboardsWithCompletionHandler has been called for leaderboards that support game groups

func (*GKLeaderboard) Identifier

func (o *GKLeaderboard) Identifier() *foundation.NSString

leaderboardID. If nil, fetch the aggregate leaderboard. Deprecated: since macOS 11.0.

func (*GKLeaderboard) Init

func (o *GKLeaderboard) Init() *GKLeaderboard

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. Deprecated: since macOS 11.0.

func (*GKLeaderboard) InitWithPlayerIDs deprecated

func (o *GKLeaderboard) InitWithPlayerIDs(playerIDs *foundation.NSArray[*foundation.NSString]) *GKLeaderboard

Deprecated: since macOS 10.10.

func (*GKLeaderboard) InitWithPlayers

func (o *GKLeaderboard) InitWithPlayers(players *foundation.NSArray[*GKPlayer]) *GKLeaderboard

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. Deprecated: since macOS 11.0.

func (*GKLeaderboard) IsHidden

func (o *GKLeaderboard) IsHidden() bool

A Boolean value that indicates whether the current leaderboard isn't visible in Game Center views. You can still submit scores to a hidden leaderboard.

func (*GKLeaderboard) IsLoading

func (o *GKLeaderboard) IsLoading() bool

This property is true if the leaderboard is currently loading Deprecated: since macOS 11.0.

func (*GKLeaderboard) LeaderboardDescription

func (o *GKLeaderboard) LeaderboardDescription() *foundation.NSString

The description of this Leaderboard as configured by the developer in App Store Connect.

func (*GKLeaderboard) LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler

func (o *GKLeaderboard) LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(playerScope GKLeaderboardPlayerScope, timeScope GKLeaderboardTimeScope, range_ foundation.NSRange, completionHandler func(unsafe.Pointer, *foundation.NSArray[*GKLeaderboardEntry], int, unsafe.Pointer))

Returns the scores for the local player and other players for the specified type of player, time period, and ranks.

func (*GKLeaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler

func (o *GKLeaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler(players *foundation.NSArray[*GKPlayer], timeScope GKLeaderboardTimeScope, completionHandler func(unsafe.Pointer, *foundation.NSArray[*GKLeaderboardEntry], unsafe.Pointer))

Returns the scores for the local player and other players for the specified time period.

func (*GKLeaderboard) LoadImageWithCompletionHandler

func (o *GKLeaderboard) LoadImageWithCompletionHandler(completionHandler func(*appkit.NSImage, unsafe.Pointer))

Loads the image for the leaderboard.

func (*GKLeaderboard) LoadPreviousOccurrenceWithCompletionHandler

func (o *GKLeaderboard) LoadPreviousOccurrenceWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))

Loads the previous recurring leaderboard occurrence that the player submits a score to.

func (*GKLeaderboard) LoadScoresWithCompletionHandler

func (o *GKLeaderboard) LoadScoresWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKScore], unsafe.Pointer))

Load the scores for this leader board asynchronously. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player Deprecated: since macOS 11.0.

func (*GKLeaderboard) LocalPlayerScore

func (o *GKLeaderboard) LocalPlayerScore() *GKScore

The local player's score Deprecated: since macOS 11.0.

func (*GKLeaderboard) MaxRange

func (o *GKLeaderboard) MaxRange() uint

The maxRange which represents the size of the leaderboard is not valid until loadScores: has completed. Deprecated: since macOS 11.0.

func (*GKLeaderboard) NextStartDate

func (o *GKLeaderboard) NextStartDate() *foundation.NSDate

Date and time the next instance will start accepting score submissions (only applicable to recurring leaderboards)

func (*GKLeaderboard) PlayerScope

func (o *GKLeaderboard) PlayerScope() GKLeaderboardPlayerScope

Filter on friends. Does not apply to leaderboard initialized with players. Deprecated: since macOS 11.0.

func (*GKLeaderboard) Range

func (o *GKLeaderboard) Range() foundation.NSRange

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. Deprecated: since macOS 11.0.

func (*GKLeaderboard) ReleaseState

func (o *GKLeaderboard) ReleaseState() GKReleaseState

The release state of the leaderboard in App Store Connect.

func (*GKLeaderboard) Scores

func (o *GKLeaderboard) Scores() *foundation.NSArray[*GKScore]

Scores are not valid until loadScores: has completed. Deprecated: since macOS 11.0.

func (*GKLeaderboard) SetCategory deprecated

func (o *GKLeaderboard) SetCategory(category *foundation.NSString)

Deprecated: since macOS 10.10.

func (*GKLeaderboard) SetIdentifier deprecated

func (o *GKLeaderboard) SetIdentifier(identifier *foundation.NSString)

Deprecated: since macOS 11.0.

func (*GKLeaderboard) SetPlayerScope deprecated

func (o *GKLeaderboard) SetPlayerScope(playerScope GKLeaderboardPlayerScope)

Deprecated: since macOS 11.0.

func (*GKLeaderboard) SetRange deprecated

func (o *GKLeaderboard) SetRange(range_ foundation.NSRange)

Deprecated: since macOS 11.0.

func (*GKLeaderboard) SetTimeScope deprecated

func (o *GKLeaderboard) SetTimeScope(timeScope GKLeaderboardTimeScope)

Deprecated: since macOS 11.0.

func (*GKLeaderboard) StartDate

func (o *GKLeaderboard) StartDate() *foundation.NSDate

Date and time this instance started accepting score submissions (only applicable to recurring leaderboards)

func (*GKLeaderboard) SubmitScoreContextPlayerCompletionHandler

func (o *GKLeaderboard) SubmitScoreContextPlayerCompletionHandler(score int, context_ uint, player *GKPlayer, completionHandler func(unsafe.Pointer))

Submits a score to the leaderboard.

func (*GKLeaderboard) TimeScope deprecated

func (o *GKLeaderboard) TimeScope() GKLeaderboardTimeScope

Deprecated: since macOS 11.0.

func (*GKLeaderboard) Title

func (o *GKLeaderboard) Title() *foundation.NSString

Localized title

func (*GKLeaderboard) Type

func (o *GKLeaderboard) Type() GKLeaderboardType

Type of leaderboard

type GKLeaderboardEntry

type GKLeaderboardEntry struct {
	foundation.NSObject
}

Information about a single score by a player on a leaderboard.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkleaderboardentry

func GKLeaderboardEntryFromID

func GKLeaderboardEntryFromID(id objc.ID) *GKLeaderboardEntry

func (*GKLeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletion deprecated

func (o *GKLeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletion(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*GKPlayer])) *appkit.NSViewController

Deprecated: since macOS 26.0.

func (*GKLeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletionHandler deprecated

func (o *GKLeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*foundation.NSString])) *appkit.NSViewController

Deprecated: since macOS 14.0.

func (*GKLeaderboardEntry) Context

func (o *GKLeaderboardEntry) Context() uint

func (*GKLeaderboardEntry) Date

func (*GKLeaderboardEntry) FormattedScore

func (o *GKLeaderboardEntry) FormattedScore() *foundation.NSString

func (*GKLeaderboardEntry) Player

func (o *GKLeaderboardEntry) Player() *GKPlayer

func (*GKLeaderboardEntry) Rank

func (o *GKLeaderboardEntry) Rank() int

func (*GKLeaderboardEntry) Score

func (o *GKLeaderboardEntry) Score() int

type GKLeaderboardPlayerScope

type GKLeaderboardPlayerScope int64

Specifies the type of players for filtering data.

const (
	GKLeaderboardPlayerScopeGlobal      GKLeaderboardPlayerScope = 0
	GKLeaderboardPlayerScopeFriendsOnly GKLeaderboardPlayerScope = 1
)

func (GKLeaderboardPlayerScope) String

func (e GKLeaderboardPlayerScope) String() string

type GKLeaderboardScore

type GKLeaderboardScore struct {
	foundation.NSObject
}

Information about a player’s score on a leaderboard.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkleaderboardscore

func GKLeaderboardScoreFromID

func GKLeaderboardScoreFromID(id objc.ID) *GKLeaderboardScore

func (*GKLeaderboardScore) Context

func (o *GKLeaderboardScore) Context() uint

An integer value that your game uses.

func (*GKLeaderboardScore) LeaderboardID

func (o *GKLeaderboardScore) LeaderboardID() *foundation.NSString

The ID that Game Center uses for the leaderboard.

func (*GKLeaderboardScore) Player

func (o *GKLeaderboardScore) Player() *GKPlayer

The player who earns the score.

func (*GKLeaderboardScore) SetContext

func (o *GKLeaderboardScore) SetContext(context_ uint)

func (*GKLeaderboardScore) SetLeaderboardID

func (o *GKLeaderboardScore) SetLeaderboardID(leaderboardID *foundation.NSString)

func (*GKLeaderboardScore) SetPlayer

func (o *GKLeaderboardScore) SetPlayer(player *GKPlayer)

func (*GKLeaderboardScore) SetValue

func (o *GKLeaderboardScore) SetValue(value int)

func (*GKLeaderboardScore) Value

func (o *GKLeaderboardScore) Value() int

The score that the player earns.

type GKLeaderboardSet

type GKLeaderboardSet struct {
	foundation.NSObject
}

Organizes leaderboards into logical and coherent groups.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkleaderboardset

func GKLeaderboardSetFromID

func GKLeaderboardSetFromID(id objc.ID) *GKLeaderboardSet

func (*GKLeaderboardSet) GroupIdentifier

func (o *GKLeaderboardSet) GroupIdentifier() *foundation.NSString

set when leaderboardSets have been designated a game group; set when loadLeaderboardSetsWithCompletionHandler has been called for leaderboards that support game groups

func (*GKLeaderboardSet) Identifier

func (o *GKLeaderboardSet) Identifier() *foundation.NSString

leaderboard set.

func (*GKLeaderboardSet) LoadImageWithCompletionHandler

func (o *GKLeaderboardSet) LoadImageWithCompletionHandler(completionHandler func(*appkit.NSImage, unsafe.Pointer))

Loads the localized image that you associate with the leaderboard set.

func (*GKLeaderboardSet) LoadLeaderboardsWithCompletionHandler

func (o *GKLeaderboardSet) LoadLeaderboardsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKLeaderboard], unsafe.Pointer))

Loads all of the leaderboards for the current leaderboard set. Deprecated: since macOS 11.0.

func (*GKLeaderboardSet) LoadLeaderboardsWithHandler

func (o *GKLeaderboardSet) LoadLeaderboardsWithHandler(handler func(*foundation.NSArray[*GKLeaderboard], unsafe.Pointer))

Loads the leaderboards in the leaderboard set.

func (*GKLeaderboardSet) SetIdentifier

func (o *GKLeaderboardSet) SetIdentifier(identifier *foundation.NSString)

func (*GKLeaderboardSet) Title

func (o *GKLeaderboardSet) Title() *foundation.NSString

Localized set title.

type GKLeaderboardTimeScope

type GKLeaderboardTimeScope int64

Specifies the time period for filtering data.

const (
	GKLeaderboardTimeScopeToday   GKLeaderboardTimeScope = 0
	GKLeaderboardTimeScopeWeek    GKLeaderboardTimeScope = 1
	GKLeaderboardTimeScopeAllTime GKLeaderboardTimeScope = 2
)

func (GKLeaderboardTimeScope) String

func (e GKLeaderboardTimeScope) String() string

type GKLeaderboardType

type GKLeaderboardType int64

Specifies whether a leaderboard is recurring.

const (
	GKLeaderboardTypeClassic   GKLeaderboardType = 0
	GKLeaderboardTypeRecurring GKLeaderboardType = 1
)

func (GKLeaderboardType) String

func (e GKLeaderboardType) String() string

type GKLeaderboardViewController

type GKLeaderboardViewController struct {
	GKGameCenterViewController
}

The GKLeaderboardViewController class provides a standard user interface that displays leaderboard scores to the player. If the GKGameCenterViewController class is available, you should use it instead.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkleaderboardviewcontroller Deprecated: since macOS 10.10.

func GKLeaderboardViewControllerFromID

func GKLeaderboardViewControllerFromID(id objc.ID) *GKLeaderboardViewController

func (*GKLeaderboardViewController) Category

func (*GKLeaderboardViewController) LeaderboardDelegate

func (*GKLeaderboardViewController) SetCategory

func (o *GKLeaderboardViewController) SetCategory(category *foundation.NSString)

func (*GKLeaderboardViewController) SetLeaderboardDelegate

func (o *GKLeaderboardViewController) SetLeaderboardDelegate(leaderboardDelegate GKLeaderboardViewControllerDelegate)

func (*GKLeaderboardViewController) SetTimeScope

func (o *GKLeaderboardViewController) SetTimeScope(timeScope GKLeaderboardTimeScope)

func (*GKLeaderboardViewController) TimeScope

type GKLeaderboardViewControllerDelegate

type GKLeaderboardViewControllerDelegate interface {
	LeaderboardViewControllerDidFinish(viewController *GKLeaderboardViewController)
}

GKLeaderboardViewControllerDelegate wraps the ObjC protocol GKLeaderboardViewControllerDelegate.

type GKLocalPlayer

type GKLocalPlayer struct {
	GKPlayer
}

The local player who signs in to Game Center on the device running the game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gklocalplayer

func GKLocalPlayerFromID

func GKLocalPlayerFromID(id objc.ID) *GKLocalPlayer

func GKLocalPlayerLocal

func GKLocalPlayerLocal() *GKLocalPlayer

Obtain the primary GKLocalPlayer object. The player is only available for offline play until logged in. A temporary player is created if no account is set up.

func GKLocalPlayerLocalPlayer

func GKLocalPlayerLocalPlayer() *GKLocalPlayer

func (*GKLocalPlayer) AuthenticateHandler

func (o *GKLocalPlayer) AuthenticateHandler() objc.Block

func (*GKLocalPlayer) AuthenticateWithCompletionHandler deprecated

func (o *GKLocalPlayer) AuthenticateWithCompletionHandler(completionHandler func(unsafe.Pointer))

Deprecated: since macOS 10.8.

func (*GKLocalPlayer) DeleteSavedGamesWithNameCompletionHandler

func (o *GKLocalPlayer) DeleteSavedGamesWithNameCompletionHandler(name *foundation.NSString, handler func(unsafe.Pointer))

Deletes saved games with the specified filename.

func (*GKLocalPlayer) FetchItemsForIdentityVerificationSignature

func (o *GKLocalPlayer) FetchItemsForIdentityVerificationSignature(completionHandler func(*foundation.NSURL, *foundation.NSData, *foundation.NSData, uint64, unsafe.Pointer))

Generates a signature that you can use to authenticate the local player on your own server.

func (*GKLocalPlayer) FetchSavedGamesWithCompletionHandler

func (o *GKLocalPlayer) FetchSavedGamesWithCompletionHandler(handler func(*foundation.NSArray[*GKSavedGame], unsafe.Pointer))

Retrieves all available saved games.

func (*GKLocalPlayer) Friends deprecated

Deprecated: since macOS 10.10.

func (*GKLocalPlayer) GenerateIdentityVerificationSignatureWithCompletionHandler

func (o *GKLocalPlayer) GenerateIdentityVerificationSignatureWithCompletionHandler(completionHandler func(*foundation.NSURL, *foundation.NSData, *foundation.NSData, uint64, unsafe.Pointer))

Generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player Deprecated: since macOS 10.15.5.

func (*GKLocalPlayer) IsAuthenticated

func (o *GKLocalPlayer) IsAuthenticated() bool

Authentication state

func (*GKLocalPlayer) IsMultiplayerGamingRestricted

func (o *GKLocalPlayer) IsMultiplayerGamingRestricted() bool

A Boolean value that declares whether or not multiplayer gaming is restricted on this device.

func (*GKLocalPlayer) IsPersonalizedCommunicationRestricted

func (o *GKLocalPlayer) IsPersonalizedCommunicationRestricted() bool

A Boolean value that declares whether personalized communication is restricted on this device. If it is restricted, the player will not be able to read or write personalized messages on game invites, challenges, or enable voice communication in multiplayer games. Note: this value will always be true when isUnderage is true.

func (*GKLocalPlayer) IsPresentingFriendRequestViewController

func (o *GKLocalPlayer) IsPresentingFriendRequestViewController() bool

observable property that becomes true when the friend request view controller is displayed. It becomes false when it is dismissed

func (*GKLocalPlayer) IsUnderage

func (o *GKLocalPlayer) IsUnderage() bool

Indicates if a player is under age

func (*GKLocalPlayer) LoadChallengableFriendsWithCompletionHandler

func (o *GKLocalPlayer) LoadChallengableFriendsWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Loads players to whom the local player can issue a challenge.

func (*GKLocalPlayer) LoadDefaultLeaderboardCategoryIDWithCompletionHandler deprecated

func (o *GKLocalPlayer) LoadDefaultLeaderboardCategoryIDWithCompletionHandler(completionHandler func(*foundation.NSString, unsafe.Pointer))

Deprecated: since macOS 10.10.

func (*GKLocalPlayer) LoadDefaultLeaderboardIdentifierWithCompletionHandler

func (o *GKLocalPlayer) LoadDefaultLeaderboardIdentifierWithCompletionHandler(completionHandler func(*foundation.NSString, unsafe.Pointer))

Loads the identifier for the local player’s default leaderboard. Deprecated: No longer supported

func (*GKLocalPlayer) LoadFriendPlayersWithCompletionHandler deprecated

func (o *GKLocalPlayer) LoadFriendPlayersWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Deprecated: since macOS 10.11.

func (*GKLocalPlayer) LoadFriends

func (o *GKLocalPlayer) LoadFriends(completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Loads the local player’s friends list if the local player and their friends grant access.

func (*GKLocalPlayer) LoadFriendsAuthorizationStatus

func (o *GKLocalPlayer) LoadFriendsAuthorizationStatus(completionHandler func(GKFriendsAuthorizationStatus, unsafe.Pointer))

Returns whether the player authorizes your game to access their friends list.

func (*GKLocalPlayer) LoadFriendsWithCompletionHandler

func (o *GKLocalPlayer) LoadFriendsWithCompletionHandler(completionHandler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))

This method is obsolete. It will never be invoked and its implementation does nothing** Deprecated: since macOS 10.10.

func (*GKLocalPlayer) LoadFriendsWithIdentifiersCompletionHandler

func (o *GKLocalPlayer) LoadFriendsWithIdentifiersCompletionHandler(identifiers *foundation.NSArray[*foundation.NSString], completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Loads the player’s friends list, scoped by the identifiers, if the player and their friends grant access.

func (*GKLocalPlayer) LoadRecentPlayersWithCompletionHandler

func (o *GKLocalPlayer) LoadRecentPlayersWithCompletionHandler(completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Loads players from the friends list or players that recently participated in a game with the local player.

func (*GKLocalPlayer) PresentFriendRequestCreatorFromWindowError

func (o *GKLocalPlayer) PresentFriendRequestCreatorFromWindowError(window *appkit.NSWindow) (bool, error)

Opens the Messages app with a sheet for the player to request friends.

func (*GKLocalPlayer) RegisterListener

func (o *GKLocalPlayer) RegisterListener(listener GKLocalPlayerListener)

Registers a listener for a particular event.

func (*GKLocalPlayer) ResolveConflictingSavedGamesWithDataCompletionHandler

func (o *GKLocalPlayer) ResolveConflictingSavedGamesWithDataCompletionHandler(conflictingSavedGames *foundation.NSArray[*GKSavedGame], data *foundation.NSData, handler func(*foundation.NSArray[*GKSavedGame], unsafe.Pointer))

Replaces duplicate saved games that use the same filename with one file containing the specified game data.

func (*GKLocalPlayer) SaveGameDataWithNameCompletionHandler

func (o *GKLocalPlayer) SaveGameDataWithNameCompletionHandler(data *foundation.NSData, name *foundation.NSString, handler func(*GKSavedGame, unsafe.Pointer))

Saves game data with the specified name.

func (*GKLocalPlayer) SetAuthenticateHandler

func (o *GKLocalPlayer) SetAuthenticateHandler(authenticateHandler func(*appkit.NSViewController, unsafe.Pointer))

func (*GKLocalPlayer) SetDefaultLeaderboardCategoryIDCompletionHandler deprecated

func (o *GKLocalPlayer) SetDefaultLeaderboardCategoryIDCompletionHandler(categoryID *foundation.NSString, completionHandler func(unsafe.Pointer))

Deprecated: since macOS 10.10.

func (*GKLocalPlayer) SetDefaultLeaderboardIdentifierCompletionHandler

func (o *GKLocalPlayer) SetDefaultLeaderboardIdentifierCompletionHandler(leaderboardIdentifier *foundation.NSString, completionHandler func(unsafe.Pointer))

Sets the local player’s default leaderboard. Deprecated: No longer supported

func (*GKLocalPlayer) UnregisterAllListeners

func (o *GKLocalPlayer) UnregisterAllListeners()

Unregisters all listeners in your game.

func (*GKLocalPlayer) UnregisterListener

func (o *GKLocalPlayer) UnregisterListener(listener GKLocalPlayerListener)

Unregisters a listener object.

type GKLocalPlayerListener

GKLocalPlayerListener wraps the ObjC protocol GKLocalPlayerListener.

type GKMatch

type GKMatch struct {
	foundation.NSObject
}

A peer-to-peer network between a group of players that sign into Game Center.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkmatch

func GKMatchFromID

func GKMatchFromID(id objc.ID) *GKMatch

func (*GKMatch) ChooseBestHostPlayerWithCompletionHandler

func (o *GKMatch) ChooseBestHostPlayerWithCompletionHandler(completionHandler func(*foundation.NSString))

Determines the best player in the game to act as the server for a client-server match. Deprecated: since macOS 10.10.

func (*GKMatch) ChooseBestHostingPlayerWithCompletionHandler

func (o *GKMatch) ChooseBestHostingPlayerWithCompletionHandler(completionHandler func(*GKPlayer))

Determines the best player in the game to act as the server for a client-server topology.

func (*GKMatch) Delegate

func (o *GKMatch) Delegate() GKMatchDelegate

func (*GKMatch) Disconnect

func (o *GKMatch) Disconnect()

Disconnects the local player from the match.

func (*GKMatch) ExpectedPlayerCount

func (o *GKMatch) ExpectedPlayerCount() uint

func (*GKMatch) PlayerIDs deprecated

func (o *GKMatch) PlayerIDs() *foundation.NSArray[*foundation.NSString]

Deprecated: since macOS 10.10.

func (*GKMatch) PlayerProperties

func (o *GKMatch) PlayerProperties() *foundation.NSDictionary[*GKPlayer, objc.ID]

func (*GKMatch) Players

func (o *GKMatch) Players() *foundation.NSArray[*GKPlayer]

func (*GKMatch) Properties

func (o *GKMatch) Properties() unsafe.Pointer

func (*GKMatch) RematchWithCompletionHandler

func (o *GKMatch) RematchWithCompletionHandler(completionHandler func(*GKMatch, unsafe.Pointer))

Creates a new match with the players from an existing match.

func (*GKMatch) SendDataToAllPlayersWithDataModeError

func (o *GKMatch) SendDataToAllPlayersWithDataModeError(data *foundation.NSData, mode GKMatchSendDataMode) (bool, error)

Transmits data to all players connected to the match.

func (*GKMatch) SendDataToPlayersDataModeError

func (o *GKMatch) SendDataToPlayersDataModeError(data *foundation.NSData, players *foundation.NSArray[*GKPlayer], mode GKMatchSendDataMode) (bool, error)

Transmits data to one or more players connected to the match.

func (*GKMatch) SendDataToPlayersWithDataModeError

func (o *GKMatch) SendDataToPlayersWithDataModeError(data *foundation.NSData, playerIDs *foundation.NSArray[*foundation.NSString], mode GKMatchSendDataMode) (bool, error)

Transmits data to a list of connected players. Deprecated: since macOS 10.10.

func (*GKMatch) SetDelegate

func (o *GKMatch) SetDelegate(delegate GKMatchDelegate)

func (*GKMatch) VoiceChatWithName

func (o *GKMatch) VoiceChatWithName(name *foundation.NSString) *GKVoiceChat

Joins the local player to a voice channel. Deprecated: No longer supported

type GKMatchDelegate

type GKMatchDelegate interface {
}

GKMatchDelegate wraps the ObjC protocol GKMatchDelegate.

type GKMatchRequest

type GKMatchRequest struct {
	foundation.NSObject
}

An object that encapsulates the parameters to create a real-time or turn-based match.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkmatchrequest

func GKMatchRequestFromID

func GKMatchRequestFromID(id objc.ID) *GKMatchRequest

func (*GKMatchRequest) DefaultNumberOfPlayers

func (o *GKMatchRequest) DefaultNumberOfPlayers() uint

Default number of players to use during matchmaking. If not set we will default to the number that the player previously set for this game, or maxPlayers.

func (*GKMatchRequest) InviteMessage

func (o *GKMatchRequest) InviteMessage() *foundation.NSString

Message sent to invited players, may be modified if using GKMatchmakerViewController Will return nil if the player is underage or restricted.

func (*GKMatchRequest) InviteeResponseHandler deprecated

func (o *GKMatchRequest) InviteeResponseHandler() objc.Block

Deprecated: since macOS 10.10.

func (*GKMatchRequest) MaxPlayers

func (o *GKMatchRequest) MaxPlayers() uint

Maximum number of players for the match

func (*GKMatchRequest) MinPlayers

func (o *GKMatchRequest) MinPlayers() uint

Minimum number of players for the match

func (*GKMatchRequest) PlayerAttributes

func (o *GKMatchRequest) PlayerAttributes() uint32

optional mask that specifies the role that the local player would like to play in the game. If this value is 0, it will be set to 0xFFFFFFFF (the default), and this property will be ignored. If the value is nonzero, then automatching uses the value as a mask that restricts the role the player can play in the group. Automatching with player attributes matches new players into the game so that the bitwise OR of the masks of all the players in the resulting match equals 0xFFFFFFFF.

func (*GKMatchRequest) PlayerGroup

func (o *GKMatchRequest) PlayerGroup() uint

The player group identifier. Matchmaking will only take place between players in the same group.

func (*GKMatchRequest) PlayersToInvite deprecated

func (o *GKMatchRequest) PlayersToInvite() *foundation.NSArray[*foundation.NSString]

Deprecated: since macOS 10.10.

func (*GKMatchRequest) Properties

func (o *GKMatchRequest) Properties() unsafe.Pointer

The match properties, if rule-based matchmaking is used.

func (*GKMatchRequest) QueueName

func (o *GKMatchRequest) QueueName() *foundation.NSString

The name of the queue, if rule-based matchmaking is used.

func (*GKMatchRequest) RecipientProperties

func (o *GKMatchRequest) RecipientProperties() *foundation.NSDictionary[*GKPlayer, objc.ID]

The recipient specific match properties, if rule-based matchmaking is used when inviting players.

func (*GKMatchRequest) RecipientResponseHandler

func (o *GKMatchRequest) RecipientResponseHandler() objc.Block

An recipientResponseHandler can be set in order to receive responses from programmatically invited players.

func (*GKMatchRequest) Recipients

func (o *GKMatchRequest) Recipients() *foundation.NSArray[*GKPlayer]

Array of GKPlayers to invite, or nil if none. This array can also include local guest players.

func (*GKMatchRequest) RestrictToAutomatch

func (o *GKMatchRequest) RestrictToAutomatch() bool

Whether or not a match will be created only using automatch. If YES, then a player will not be able to invite anyone (including contacts, friends, and nearby players) to the match, but rely on automatching to find players for the match. Default is NO. Deprecated: since macOS 11.0.

func (*GKMatchRequest) SetDefaultNumberOfPlayers

func (o *GKMatchRequest) SetDefaultNumberOfPlayers(defaultNumberOfPlayers uint)

func (*GKMatchRequest) SetInviteMessage

func (o *GKMatchRequest) SetInviteMessage(inviteMessage *foundation.NSString)

func (*GKMatchRequest) SetInviteeResponseHandler deprecated

func (o *GKMatchRequest) SetInviteeResponseHandler(inviteeResponseHandler func(*foundation.NSString, GKInviteRecipientResponse))

Deprecated: since macOS 10.10.

func (*GKMatchRequest) SetMaxPlayers

func (o *GKMatchRequest) SetMaxPlayers(maxPlayers uint)

func (*GKMatchRequest) SetMinPlayers

func (o *GKMatchRequest) SetMinPlayers(minPlayers uint)

func (*GKMatchRequest) SetPlayerAttributes

func (o *GKMatchRequest) SetPlayerAttributes(playerAttributes uint32)

func (*GKMatchRequest) SetPlayerGroup

func (o *GKMatchRequest) SetPlayerGroup(playerGroup uint)

func (*GKMatchRequest) SetPlayersToInvite deprecated

func (o *GKMatchRequest) SetPlayersToInvite(playersToInvite *foundation.NSArray[*foundation.NSString])

Deprecated: since macOS 10.10.

func (*GKMatchRequest) SetProperties

func (o *GKMatchRequest) SetProperties(properties unsafe.Pointer)

func (*GKMatchRequest) SetQueueName

func (o *GKMatchRequest) SetQueueName(queueName *foundation.NSString)

func (*GKMatchRequest) SetRecipientProperties

func (o *GKMatchRequest) SetRecipientProperties(recipientProperties *foundation.NSDictionary[*GKPlayer, objc.ID])

func (*GKMatchRequest) SetRecipientResponseHandler

func (o *GKMatchRequest) SetRecipientResponseHandler(recipientResponseHandler func(*GKPlayer, GKInviteRecipientResponse))

func (*GKMatchRequest) SetRecipients

func (o *GKMatchRequest) SetRecipients(recipients *foundation.NSArray[*GKPlayer])

func (*GKMatchRequest) SetRestrictToAutomatch deprecated

func (o *GKMatchRequest) SetRestrictToAutomatch(restrictToAutomatch bool)

Deprecated: since macOS 11.0.

type GKMatchSendDataMode

type GKMatchSendDataMode int64

The mechanism used to transmit data to other players.

const (
	GKMatchSendDataReliable   GKMatchSendDataMode = 0
	GKMatchSendDataUnreliable GKMatchSendDataMode = 1
)

func (GKMatchSendDataMode) String

func (e GKMatchSendDataMode) String() string

type GKMatchType

type GKMatchType uint64

The kind of match managed by Game Center.

const (
	// A peer-to-peer match hosted by Game Center.
	GKMatchTypePeerToPeer GKMatchType = 0
	// A match hosted on your private server.
	GKMatchTypeHosted GKMatchType = 1
	// A turn-based match hosted by Game Center.
	GKMatchTypeTurnBased GKMatchType = 2
)

func (GKMatchType) String

func (e GKMatchType) String() string

type GKMatchedPlayers

type GKMatchedPlayers struct {
	foundation.NSObject
}

An object that represents matchmaking results, including the players that join the match and their properties that matchmaking rules uses.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkmatchedplayers

func GKMatchedPlayersFromID

func GKMatchedPlayersFromID(id objc.ID) *GKMatchedPlayers

func (*GKMatchedPlayers) PlayerProperties

func (o *GKMatchedPlayers) PlayerProperties() *foundation.NSDictionary[*GKPlayer, objc.ID]

func (*GKMatchedPlayers) Players

func (o *GKMatchedPlayers) Players() *foundation.NSArray[*GKPlayer]

func (*GKMatchedPlayers) Properties

func (o *GKMatchedPlayers) Properties() unsafe.Pointer

type GKMatchmaker

type GKMatchmaker struct {
	foundation.NSObject
}

An object that creates matches with other players without presenting an interface to the players.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkmatchmaker

func GKMatchmakerFromID

func GKMatchmakerFromID(id objc.ID) *GKMatchmaker

func GKMatchmakerSharedMatchmaker

func GKMatchmakerSharedMatchmaker() *GKMatchmaker

Returns the singleton matchmaker instance.

func (*GKMatchmaker) AddPlayersToMatchMatchRequestCompletionHandler

func (o *GKMatchmaker) AddPlayersToMatchMatchRequestCompletionHandler(match *GKMatch, matchRequest *GKMatchRequest, completionHandler func(unsafe.Pointer))

Invites additional players to an existing match.

func (*GKMatchmaker) Cancel

func (o *GKMatchmaker) Cancel()

Cancels a matchmaking request.

func (*GKMatchmaker) CancelInviteToPlayer

func (o *GKMatchmaker) CancelInviteToPlayer(playerID *foundation.NSString)

* This method is obsolete. It will never be invoked and its implementation does nothing** Deprecated: since macOS 10.10.

func (*GKMatchmaker) CancelPendingInviteToPlayer

func (o *GKMatchmaker) CancelPendingInviteToPlayer(player *GKPlayer)

Cancels a pending invitation to another player.

func (*GKMatchmaker) FindMatchForRequestWithCompletionHandler

func (o *GKMatchmaker) FindMatchForRequestWithCompletionHandler(request *GKMatchRequest, completionHandler func(*GKMatch, unsafe.Pointer))

Initiates a request to find players for a peer-to-peer match.

func (*GKMatchmaker) FindMatchedPlayersWithCompletionHandler

func (o *GKMatchmaker) FindMatchedPlayersWithCompletionHandler(request *GKMatchRequest, completionHandler func(*GKMatchedPlayers, unsafe.Pointer))

Initiates a request to find players for a hosted match that uses matchmaking rules.

func (*GKMatchmaker) FindPlayersForHostedMatchRequestWithCompletionHandler

func (o *GKMatchmaker) FindPlayersForHostedMatchRequestWithCompletionHandler(request *GKMatchRequest, completionHandler func(*foundation.NSArray[*foundation.NSString], unsafe.Pointer))

Initiates a request to find players for a hosted match. Deprecated: since macOS 10.10.

func (*GKMatchmaker) FindPlayersForHostedRequestWithCompletionHandler

func (o *GKMatchmaker) FindPlayersForHostedRequestWithCompletionHandler(request *GKMatchRequest, completionHandler func(*foundation.NSArray[*GKPlayer], unsafe.Pointer))

Initiates a request to find players for a hosted match.

func (*GKMatchmaker) FinishMatchmakingForMatch

func (o *GKMatchmaker) FinishMatchmakingForMatch(match *GKMatch)

Informs the server when programmatic matchmaking finishes.

func (*GKMatchmaker) InviteHandler deprecated

func (o *GKMatchmaker) InviteHandler() objc.Block

Deprecated: Use the “GKLocalPlayer/register(_:)“ method instead.

func (*GKMatchmaker) MatchForInviteCompletionHandler

func (o *GKMatchmaker) MatchForInviteCompletionHandler(invite *GKInvite, completionHandler func(*GKMatch, unsafe.Pointer))

Creates a match from an invitation that the local player accepts.

func (*GKMatchmaker) QueryActivityWithCompletionHandler

func (o *GKMatchmaker) QueryActivityWithCompletionHandler(completionHandler func(int, unsafe.Pointer))

Finds the number of players, across player groups, who recently requested a match.

func (*GKMatchmaker) QueryPlayerGroupActivityWithCompletionHandler

func (o *GKMatchmaker) QueryPlayerGroupActivityWithCompletionHandler(playerGroup uint, completionHandler func(int, unsafe.Pointer))

Finds the number of players in a player group who recently requested a match.

func (*GKMatchmaker) QueryQueueActivityWithCompletionHandler

func (o *GKMatchmaker) QueryQueueActivityWithCompletionHandler(queueName *foundation.NSString, completionHandler func(int, unsafe.Pointer))

Finds the number of players in a specific queue who recently requested a match.

func (*GKMatchmaker) SetInviteHandler deprecated

func (o *GKMatchmaker) SetInviteHandler(inviteHandler func(*GKInvite, *foundation.NSArray[objc.ID]))

Deprecated: Use the “GKLocalPlayer/register(_:)“ method instead.

func (*GKMatchmaker) StartBrowsingForNearbyPlayersWithHandler

func (o *GKMatchmaker) StartBrowsingForNearbyPlayersWithHandler(reachableHandler func(*GKPlayer, bool))

Finds nearby players through Bluetooth or WiFi on the same subnet.

func (*GKMatchmaker) StartBrowsingForNearbyPlayersWithReachableHandler

func (o *GKMatchmaker) StartBrowsingForNearbyPlayersWithReachableHandler(reachableHandler func(*foundation.NSString, bool))

* This method is obsolete. It will never be invoked and its implementation does nothing** Deprecated: since macOS 10.10.

func (*GKMatchmaker) StartGroupActivityWithPlayerHandler

func (o *GKMatchmaker) StartGroupActivityWithPlayerHandler(handler func(*GKPlayer))

Begins a SharePlay activity for your game when a FaceTime call is active.

func (*GKMatchmaker) StopBrowsingForNearbyPlayers

func (o *GKMatchmaker) StopBrowsingForNearbyPlayers()

Stops finding nearby players.

func (*GKMatchmaker) StopGroupActivity

func (o *GKMatchmaker) StopGroupActivity()

Ends a SharePlay activity for the entire group, which the local player activates.

type GKMatchmakerViewController

type GKMatchmakerViewController struct {
	appkit.NSViewController
}

An interface that allows a player to invite other players to a real-time game and automatch to fill any empty slots.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkmatchmakerviewcontroller

func GKMatchmakerViewControllerFromID

func GKMatchmakerViewControllerFromID(id objc.ID) *GKMatchmakerViewController

func (*GKMatchmakerViewController) AddPlayersToMatch

func (o *GKMatchmakerViewController) AddPlayersToMatch(match *GKMatch)

Invites additional players to join an existing match.

func (*GKMatchmakerViewController) CanStartWithMinimumPlayers

func (o *GKMatchmakerViewController) CanStartWithMinimumPlayers() bool

A BOOL value to allow the GKMatchMakerViewController to return control to the game once the minimum number of players are connected. By default the value is NO, and the multiplayer match can only proceed after all players are connected. If the value is set to YES, then once the number of connected players is greater than or equal to minPlayers of the match request, matchmakerViewController:didFindMatch: will be called and the game can get the match instance, and update the game scene accordingly. The remaining players wil continue to connect.

func (*GKMatchmakerViewController) DefaultInvitationMessage

func (o *GKMatchmakerViewController) DefaultInvitationMessage() *foundation.NSString

deprecated, set the message on the match request instead Deprecated: No longer supported.

func (*GKMatchmakerViewController) InitWithInvite

func (o *GKMatchmakerViewController) InitWithInvite(invite *GKInvite) objc.ID

Creates a matchmaker view controller to present to a player who accepts an invitation.

func (*GKMatchmakerViewController) InitWithMatchRequest

func (o *GKMatchmakerViewController) InitWithMatchRequest(request *GKMatchRequest) objc.ID

Creates a matchmaker view controller for the local player to start inviting other players.

func (*GKMatchmakerViewController) IsHosted

func (o *GKMatchmakerViewController) IsHosted() bool

set to YES to receive hosted (eg. not peer-to-peer) match results. Will cause the controller to return an array of players instead of a match.

func (*GKMatchmakerViewController) MatchRequest

func (o *GKMatchmakerViewController) MatchRequest() *GKMatchRequest

func (*GKMatchmakerViewController) MatchmakerDelegate

func (*GKMatchmakerViewController) MatchmakingMode

func (o *GKMatchmakerViewController) MatchmakingMode() GKMatchmakingMode

this controls which mode of matchmaking to support in the UI (all, nearby only, automatch only, invite only). Throws an exeption if you can not set to the desired mode (due to restrictions)

func (*GKMatchmakerViewController) SetCanStartWithMinimumPlayers

func (o *GKMatchmakerViewController) SetCanStartWithMinimumPlayers(canStartWithMinimumPlayers bool)

func (*GKMatchmakerViewController) SetDefaultInvitationMessage deprecated

func (o *GKMatchmakerViewController) SetDefaultInvitationMessage(defaultInvitationMessage *foundation.NSString)

Deprecated: No longer supported.

func (*GKMatchmakerViewController) SetHosted

func (o *GKMatchmakerViewController) SetHosted(hosted bool)

func (*GKMatchmakerViewController) SetHostedPlayerConnected

func (o *GKMatchmakerViewController) SetHostedPlayerConnected(playerID *foundation.NSString, connected bool)

Updates a player’s status on the view to show that the player has connected or disconnected from your server. Deprecated: since macOS 10.10.

func (*GKMatchmakerViewController) SetHostedPlayerDidConnect

func (o *GKMatchmakerViewController) SetHostedPlayerDidConnect(player *GKPlayer, connected bool)

Updates the connection status of a player in a hosted game.

func (*GKMatchmakerViewController) SetMatchmakerDelegate

func (o *GKMatchmakerViewController) SetMatchmakerDelegate(matchmakerDelegate GKMatchmakerViewControllerDelegate)

func (*GKMatchmakerViewController) SetMatchmakingMode

func (o *GKMatchmakerViewController) SetMatchmakingMode(matchmakingMode GKMatchmakingMode)

type GKMatchmakerViewControllerDelegate

type GKMatchmakerViewControllerDelegate interface {
	MatchmakerViewControllerWasCancelled(viewController *GKMatchmakerViewController)
	MatchmakerViewControllerDidFailWithError(viewController *GKMatchmakerViewController, error_ unsafe.Pointer)
}

GKMatchmakerViewControllerDelegate wraps the ObjC protocol GKMatchmakerViewControllerDelegate.

type GKMatchmakingMode

type GKMatchmakingMode int64

Possible modes that a multiplayer game uses to find matches.

const (
	// The default matchmaking mode.
	GKMatchmakingModeDefault GKMatchmakingMode = 0
	// A mode that matches the local player only with nearby players.
	GKMatchmakingModeNearbyOnly GKMatchmakingMode = 1
	// A mode that matches the local player only with players who are also actively looking for a match.
	GKMatchmakingModeAutomatchOnly GKMatchmakingMode = 2
	// A mode that matches the local player only with players who they invite, and doesn’t use automatch to fill empty slots.
	GKMatchmakingModeInviteOnly GKMatchmakingMode = 3
)

func (GKMatchmakingMode) String

func (e GKMatchmakingMode) String() string

type GKNotificationBanner

type GKNotificationBanner struct {
	foundation.NSObject
}

A Game Center-style banner that displays a message to the local player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gknotificationbanner Deprecated: Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.

func GKNotificationBannerFromID

func GKNotificationBannerFromID(id objc.ID) *GKNotificationBanner

type GKPeerConnectionState

type GKPeerConnectionState int32

The state of a peer known to the session. Deprecated: No longer supported

const (
	// A peer not connected to the session, but one that the session can connect to.
	GKPeerStateAvailable GKPeerConnectionState = 0
	// A peer that is no longer interested in receiving connections.
	GKPeerStateUnavailable GKPeerConnectionState = 1
	// A peer connected to the session.
	GKPeerStateConnected GKPeerConnectionState = 2
	// A peer that disconnected from the session.
	GKPeerStateDisconnected GKPeerConnectionState = 3
	// A peer attempting to connect to the session.
	GKPeerStateConnecting     GKPeerConnectionState = 4
	GKPeerStateConnectedRelay GKPeerConnectionState = 5
)

func (GKPeerConnectionState) String

func (e GKPeerConnectionState) String() string

type GKPhotoSize

type GKPhotoSize int64

The size of a photo that Game Center loads.

const (
	GKPhotoSizeSmall  GKPhotoSize = 0
	GKPhotoSizeNormal GKPhotoSize = 1
)

func (GKPhotoSize) String

func (e GKPhotoSize) String() string

type GKPlayer

type GKPlayer struct {
	GKBasePlayer
}

A remote player who the local player running your game can invite and communicate with through Game Center.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkplayer

func GKPlayerAnonymousGuestPlayerWithIdentifier

func GKPlayerAnonymousGuestPlayerWithIdentifier(guestIdentifier *foundation.NSString) *GKPlayer

Creates a guest player with the specified identifier.

func GKPlayerFromID

func GKPlayerFromID(id objc.ID) *GKPlayer

func (*GKPlayer) Alias

func (o *GKPlayer) Alias() *foundation.NSString

The alias property contains the player's nickname. When you need to display the name to the user, consider using displayName instead. The nickname is unique but not invariant: the player may change their nickname. The nickname may be very long, so be sure to use appropriate string truncation API when drawing.

func (*GKPlayer) GamePlayerID

func (o *GKPlayer) GamePlayerID() *foundation.NSString

This is the player's unique and persistent ID that is scoped to this application.

func (*GKPlayer) GuestIdentifier

func (o *GKPlayer) GuestIdentifier() *foundation.NSString

func (*GKPlayer) IsFriend deprecated

func (o *GKPlayer) IsFriend() bool

Deprecated: since macOS 10.10.

func (*GKPlayer) IsInvitable

func (o *GKPlayer) IsInvitable() bool

func (*GKPlayer) LoadPhotoForSizeWithCompletionHandler

func (o *GKPlayer) LoadPhotoForSizeWithCompletionHandler(size GKPhotoSize, completionHandler func(*appkit.NSImage, unsafe.Pointer))

Loads a photo of the player from Game Center.

func (*GKPlayer) ScopedIDsArePersistent

func (o *GKPlayer) ScopedIDsArePersistent() bool

Returns a Boolean value depending on whether the player identifiers are persistent across game instances or unique to the game instance.

func (*GKPlayer) TeamPlayerID

func (o *GKPlayer) TeamPlayerID() *foundation.NSString

This is the player's unique and persistent ID that is scoped to the Apple Store Connect Team identifier of this application.

type GKPlayerConnectionState

type GKPlayerConnectionState int64

The possible states of a connection to a match.

const (
	// An undetermined state in which the player can’t receive data.
	GKPlayerStateUnknown GKPlayerConnectionState = 0
	// A state in which a player connects to the match and can receive data.
	GKPlayerStateConnected GKPlayerConnectionState = 1
	// A state in which a player disconnects from the match and can’t receive data.
	GKPlayerStateDisconnected GKPlayerConnectionState = 2
)

func (GKPlayerConnectionState) String

func (e GKPlayerConnectionState) String() string

type GKReleaseState

type GKReleaseState uint64

Describes the release state of an App Store Connect resource, such as an Achievement or Leaderboard.

const (
	// The system can’t determine the release state of the resource.
	GKReleaseStateUnknown GKReleaseState = 0
	// The resource is associated with a release in App Store Connect. This has no relationship with the “archived” state of a resource (i.e., A resource can be release and archived).
	GKReleaseStateReleased GKReleaseState = 1
	// The resource has been created in App Store Connect but isn’t yet associated with a released version of an App.
	GKReleaseStatePrereleased GKReleaseState = 2
)

func (GKReleaseState) String

func (e GKReleaseState) String() string

type GKSavedGame

type GKSavedGame struct {
	foundation.NSObject
}

An object that represents a file containing saved game data.

Apple documentation: https://developer.apple.com/documentation/gamekit/gksavedgame

func GKSavedGameFromID

func GKSavedGameFromID(id objc.ID) *GKSavedGame

func (*GKSavedGame) DeviceName

func (o *GKSavedGame) DeviceName() *foundation.NSString

func (*GKSavedGame) LoadDataWithCompletionHandler

func (o *GKSavedGame) LoadDataWithCompletionHandler(handler func(*foundation.NSData, unsafe.Pointer))

Loads the game data from the file.

func (*GKSavedGame) ModificationDate

func (o *GKSavedGame) ModificationDate() *foundation.NSDate

func (*GKSavedGame) Name

func (o *GKSavedGame) Name() *foundation.NSString

type GKSavedGameListener

type GKSavedGameListener interface {
}

GKSavedGameListener wraps the ObjC protocol GKSavedGameListener.

type GKScore

type GKScore struct {
	foundation.NSObject
}

An object containing information for a score that was earned by the player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkscore Deprecated: since macOS 11.0.

func GKScoreFromID

func GKScoreFromID(id objc.ID) *GKScore

func (*GKScore) Category deprecated

func (o *GKScore) Category() *foundation.NSString

Deprecated: since macOS 10.10.

func (*GKScore) ChallengeComposeControllerWithMessagePlayersCompletion

func (o *GKScore) ChallengeComposeControllerWithMessagePlayersCompletion(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*GKPlayer])) *appkit.NSViewController

Provides a challenge compose view controller with preselected player identifiers and a preformatted, player-editable message. Deprecated: since macOS 26.0.

func (*GKScore) ChallengeComposeControllerWithMessagePlayersCompletionHandler

func (o *GKScore) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message *foundation.NSString, players *foundation.NSArray[*GKPlayer], completionHandler func(*appkit.NSViewController, bool, *foundation.NSArray[*foundation.NSString])) *appkit.NSViewController

Provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message. Deprecated: since macOS 14.0.

func (*GKScore) Context

func (o *GKScore) Context() uint64

optional additional context that allows a game to store and retrieve additional data associated with the store. Default value of zero is returned if no value is set. Deprecated: since macOS 11.0.

func (*GKScore) Date

func (o *GKScore) Date() *foundation.NSDate

The date this score was recorded. A newly initialized, unsubmitted GKScore records the current date at init time. Deprecated: since macOS 11.0.

func (*GKScore) FormattedValue

func (o *GKScore) FormattedValue() *foundation.NSString

The score formatted as a string, localized with a label

func (*GKScore) InitWithCategory

func (o *GKScore) InitWithCategory(category *foundation.NSString) *GKScore

Returns an initialized score object. Deprecated: since macOS 10.10.

func (*GKScore) InitWithLeaderboardIdentifier

func (o *GKScore) InitWithLeaderboardIdentifier(identifier *foundation.NSString) *GKScore

Returns an initialized score object using the local player and the current date. Deprecated: since macOS 11.0.

func (*GKScore) InitWithLeaderboardIdentifierForPlayer

func (o *GKScore) InitWithLeaderboardIdentifierForPlayer(identifier *foundation.NSString, playerID *foundation.NSString) *GKScore

Returns an initialized score object for the specified leaderboard and player. Deprecated: since macOS 10.10.

func (*GKScore) InitWithLeaderboardIdentifierPlayer

func (o *GKScore) InitWithLeaderboardIdentifierPlayer(identifier *foundation.NSString, player *GKPlayer) *GKScore

Returns an initialized score object for the specified leaderboard and player. Deprecated: since macOS 11.0.

func (*GKScore) IssueChallengeToPlayersMessage

func (o *GKScore) IssueChallengeToPlayersMessage(playerIDs *foundation.NSArray[*foundation.NSString], message *foundation.NSString)

Issues a score challenge to a set of players. Deprecated: since macOS 10.10.

func (*GKScore) LeaderboardIdentifier

func (o *GKScore) LeaderboardIdentifier() *foundation.NSString

leaderboard identifier (required) Deprecated: since macOS 11.0.

func (*GKScore) Player

func (o *GKScore) Player() *GKPlayer

The player that recorded the score. Deprecated: since macOS 11.0.

func (*GKScore) PlayerID deprecated

func (o *GKScore) PlayerID() *foundation.NSString

Deprecated: since macOS 10.10.

func (*GKScore) Rank

func (o *GKScore) Rank() int

The rank of the player within the leaderboard, only valid when returned from GKLeaderboard Deprecated: since macOS 11.0.

func (*GKScore) ReportScoreWithCompletionHandler

func (o *GKScore) ReportScoreWithCompletionHandler(completionHandler func(unsafe.Pointer))

Reports a score to Game Center. Deprecated: since macOS 10.10.

func (*GKScore) SetCategory deprecated

func (o *GKScore) SetCategory(category *foundation.NSString)

Deprecated: since macOS 10.10.

func (*GKScore) SetContext deprecated

func (o *GKScore) SetContext(context_ uint64)

Deprecated: since macOS 11.0.

func (*GKScore) SetLeaderboardIdentifier deprecated

func (o *GKScore) SetLeaderboardIdentifier(leaderboardIdentifier *foundation.NSString)

Deprecated: since macOS 11.0.

func (*GKScore) SetShouldSetDefaultLeaderboard deprecated

func (o *GKScore) SetShouldSetDefaultLeaderboard(shouldSetDefaultLeaderboard bool)

Deprecated: since macOS 11.0.

func (*GKScore) SetValue

func (o *GKScore) SetValue(value int64)

func (*GKScore) ShouldSetDefaultLeaderboard

func (o *GKScore) ShouldSetDefaultLeaderboard() bool

Convenience property to make the leaderboard associated with this GKScore, the default leaderboard for this player. Default value is false. If true, reporting that score will make the category this score belongs to, the default leaderboard for this user Deprecated: since macOS 11.0.

func (*GKScore) Value

func (o *GKScore) Value() int64

The score value as a 64bit integer. Deprecated: since macOS 11.0.

type GKScoreChallenge

type GKScoreChallenge struct {
	GKChallenge
}

A type of challenge where a player must beat the leaderboard score of another player.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkscorechallenge Deprecated: since macOS 26.0.

func GKScoreChallengeFromID

func GKScoreChallengeFromID(id objc.ID) *GKScoreChallenge

func (*GKScoreChallenge) LeaderboardEntry

func (o *GKScoreChallenge) LeaderboardEntry() *GKLeaderboardEntry

The leaderboard entry to meet to satisfy this challenge

func (*GKScoreChallenge) Score

func (o *GKScoreChallenge) Score() *GKScore

The score to meet to satisfy this challenge Deprecated: since macOS 14.4.

type GKSendDataMode

type GKSendDataMode int32

The mechanism used to transmit data to other peers. Deprecated: No longer supported

const (
	// The data is sent continuously until it is successfully received by the intended recipients or the connection times out.
	GKSendDataReliable GKSendDataMode = 0
	// The data is sent once and is not sent again if a transmission error occurred.
	GKSendDataUnreliable GKSendDataMode = 1
)

func (GKSendDataMode) String

func (e GKSendDataMode) String() string

type GKSession

type GKSession struct {
	foundation.NSObject
}

A GKSession object provides the ability to discover and connect to nearby iOS devices using Bluetooth or Wi-fi.

Apple documentation: https://developer.apple.com/documentation/gamekit/gksession Deprecated: since macOS 10.10.

func GKSessionFromID

func GKSessionFromID(id objc.ID) *GKSession

func (*GKSession) AcceptConnectionFromPeerError

func (o *GKSession) AcceptConnectionFromPeerError(peerID *foundation.NSString) (bool, error)

Called by the delegate to accept a connection request received from a remote peer.

func (*GKSession) CancelConnectToPeer

func (o *GKSession) CancelConnectToPeer(peerID *foundation.NSString)

Cancels a pending request to connect to another iOS device.

func (*GKSession) ConnectToPeerWithTimeout

func (o *GKSession) ConnectToPeerWithTimeout(peerID *foundation.NSString, timeout float64)

Creates a connection to another iOS device.

func (*GKSession) Delegate deprecated

func (o *GKSession) Delegate() GKSessionDelegate

Deprecated: No longer supported.

func (*GKSession) DenyConnectionFromPeer

func (o *GKSession) DenyConnectionFromPeer(peerID *foundation.NSString)

Called by the delegate to reject a connection request received from a remote peer.

func (*GKSession) DisconnectFromAllPeers

func (o *GKSession) DisconnectFromAllPeers()

Disconnects the session from all connected peers.

func (*GKSession) DisconnectPeerFromAllPeers

func (o *GKSession) DisconnectPeerFromAllPeers(peerID *foundation.NSString)

Disconnects a connected peer from all peers connected to the session.

func (*GKSession) DisconnectTimeout

func (o *GKSession) DisconnectTimeout() float64

The timeout for disconnecting a peer if it appears that the peer has lost connection to the game network

func (*GKSession) DisplayName deprecated

func (o *GKSession) DisplayName() *foundation.NSString

Deprecated: No longer supported.

func (*GKSession) DisplayNameForPeer

func (o *GKSession) DisplayNameForPeer(peerID *foundation.NSString) *foundation.NSString

Returns a user-readable name for a peer.

func (*GKSession) InitWithSessionIDDisplayNameSessionMode

func (o *GKSession) InitWithSessionIDDisplayNameSessionMode(sessionID *foundation.NSString, name *foundation.NSString, mode GKSessionMode) objc.ID

Initializes and returns a newly allocated session. Deprecated: No longer available

func (*GKSession) IsAvailable

func (o *GKSession) IsAvailable() bool

Toggle availability on the network based on session mode and search criteria. Delegate will get a callback -session:didReceiveConnectionRequestFromPeer: when a peer attempts a connection.

func (*GKSession) PeerID deprecated

func (o *GKSession) PeerID() *foundation.NSString

Deprecated: No longer supported.

func (*GKSession) PeersWithConnectionState

func (o *GKSession) PeersWithConnectionState(state GKPeerConnectionState) *foundation.NSArray[objc.ID]

Returns a list of peers in the specified connection state. Deprecated: No longer supported.

func (*GKSession) SendDataToAllPeersWithDataModeError

func (o *GKSession) SendDataToAllPeersWithDataModeError(data *foundation.NSData, mode GKSendDataMode) (bool, error)

Transmits a collection of bytes to all connected peers. Deprecated: No longer supported.

func (*GKSession) SendDataToPeersWithDataModeError

func (o *GKSession) SendDataToPeersWithDataModeError(data *foundation.NSData, peers *foundation.NSArray[objc.ID], mode GKSendDataMode) (bool, error)

Transmits a collection of bytes to a list of connected peers. Deprecated: No longer supported.

func (*GKSession) SessionID deprecated

func (o *GKSession) SessionID() *foundation.NSString

Deprecated: No longer supported.

func (*GKSession) SessionMode deprecated

func (o *GKSession) SessionMode() GKSessionMode

Deprecated: No longer supported.

func (*GKSession) SetAvailable

func (o *GKSession) SetAvailable(available bool)

func (*GKSession) SetDataReceiveHandlerWithContext

func (o *GKSession) SetDataReceiveHandlerWithContext(handler objc.ID, context_ unsafe.Pointer)

Sets the object that handles data received from other peers connected to the session. Deprecated: No longer supported.

func (*GKSession) SetDelegate deprecated

func (o *GKSession) SetDelegate(delegate GKSessionDelegate)

Deprecated: No longer supported.

func (*GKSession) SetDisconnectTimeout

func (o *GKSession) SetDisconnectTimeout(disconnectTimeout float64)

type GKSessionDelegate

type GKSessionDelegate interface {
}

GKSessionDelegate wraps the ObjC protocol GKSessionDelegate.

type GKSessionMode

type GKSessionMode int32

Modes that determine how a session interacts with other peers. Deprecated: No longer supported

const (
	// A server advertises itself to local devices using its sessionID property.
	GKSessionModeServer GKSessionMode = 0
	// A client searches for servers advertising the same sessionID property.
	GKSessionModeClient GKSessionMode = 1
	// A peer advertises like a server and searches like a client.
	GKSessionModePeer GKSessionMode = 2
)

func (GKSessionMode) String

func (e GKSessionMode) String() string

type GKTransportType

type GKTransportType int64

The mechanism used to send messages to other players in a game session.

const (
	// The data is sent once and is not sent again if a transmission error occurs.
	GKTransportTypeUnreliable GKTransportType = 0
	// The data is sent continuously until it is successfully received by the intended recipients or the connection times out.
	GKTransportTypeReliable GKTransportType = 1
)

func (GKTransportType) String

func (e GKTransportType) String() string

type GKTurnBasedEventHandler

type GKTurnBasedEventHandler struct {
	foundation.NSObject
}

The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches. To use it, call the sharedTurnBasedEventHandler class method to get the singleton instance and assign an object that implements the GKTurnBasedEventHandlerDelegate protocol to its delegate property. All methods are called on the main thread.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedeventhandler Deprecated: since macOS 10.10.

func GKTurnBasedEventHandlerFromID

func GKTurnBasedEventHandlerFromID(id objc.ID) *GKTurnBasedEventHandler

func GKTurnBasedEventHandlerSharedTurnBasedEventHandler

func GKTurnBasedEventHandlerSharedTurnBasedEventHandler() *GKTurnBasedEventHandler

Returns the shared instance of the event handler. Deprecated: since macOS 10.10.

func (*GKTurnBasedEventHandler) Delegate deprecated

Deprecated: since macOS 10.10.

func (*GKTurnBasedEventHandler) SetDelegate deprecated

func (o *GKTurnBasedEventHandler) SetDelegate(delegate *foundation.NSObject)

Deprecated: since macOS 10.10.

type GKTurnBasedEventHandlerDelegate

type GKTurnBasedEventHandlerDelegate interface {
	HandleInviteFromGameCenter(playersToInvite *foundation.NSArray[*foundation.NSString])
	HandleTurnEventForMatchDidBecomeActive(match *GKTurnBasedMatch, didBecomeActive bool)
}

GKTurnBasedEventHandlerDelegate wraps the ObjC protocol GKTurnBasedEventHandlerDelegate.

type GKTurnBasedEventListener

type GKTurnBasedEventListener interface {
}

GKTurnBasedEventListener wraps the ObjC protocol GKTurnBasedEventListener.

type GKTurnBasedExchange

type GKTurnBasedExchange struct {
	foundation.NSObject
}

Exchange request information that participants send in a turn-based match.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedexchange

func GKTurnBasedExchangeFromID

func GKTurnBasedExchangeFromID(id objc.ID) *GKTurnBasedExchange

func (*GKTurnBasedExchange) CancelWithLocalizableMessageKeyArgumentsCompletionHandler

func (o *GKTurnBasedExchange) CancelWithLocalizableMessageKeyArgumentsCompletionHandler(key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString], completionHandler func(unsafe.Pointer))

Cancels an exchange request.

func (*GKTurnBasedExchange) CompletionDate

func (o *GKTurnBasedExchange) CompletionDate() *foundation.NSDate

func (*GKTurnBasedExchange) Data

func (*GKTurnBasedExchange) ExchangeID

func (o *GKTurnBasedExchange) ExchangeID() *foundation.NSString

func (*GKTurnBasedExchange) Message

func (o *GKTurnBasedExchange) Message() *foundation.NSString

func (*GKTurnBasedExchange) Recipients

func (*GKTurnBasedExchange) Replies

func (*GKTurnBasedExchange) ReplyWithLocalizableMessageKeyArgumentsDataCompletionHandler

func (o *GKTurnBasedExchange) ReplyWithLocalizableMessageKeyArgumentsDataCompletionHandler(key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString], data *foundation.NSData, completionHandler func(unsafe.Pointer))

Replies to an exchange request on behalf of a recipient.

func (*GKTurnBasedExchange) SendDate

func (o *GKTurnBasedExchange) SendDate() *foundation.NSDate

func (*GKTurnBasedExchange) Sender

func (*GKTurnBasedExchange) Status

func (*GKTurnBasedExchange) TimeoutDate

func (o *GKTurnBasedExchange) TimeoutDate() *foundation.NSDate

type GKTurnBasedExchangeReply

type GKTurnBasedExchangeReply struct {
	foundation.NSObject
}

Details about a recipient’s response to an exchange request.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedexchangereply

func GKTurnBasedExchangeReplyFromID

func GKTurnBasedExchangeReplyFromID(id objc.ID) *GKTurnBasedExchangeReply

func (*GKTurnBasedExchangeReply) Data

func (*GKTurnBasedExchangeReply) Message

func (*GKTurnBasedExchangeReply) Recipient

func (*GKTurnBasedExchangeReply) ReplyDate

func (o *GKTurnBasedExchangeReply) ReplyDate() *foundation.NSDate

type GKTurnBasedExchangeStatus

type GKTurnBasedExchangeStatus int64

The status of an exchange or reply.

const (
	// The state of the exchange request is unknown.
	GKTurnBasedExchangeStatusUnknown GKTurnBasedExchangeStatus = 0
	// GameKit sent the exchange request to recipients but not all recipients replied.
	GKTurnBasedExchangeStatusActive GKTurnBasedExchangeStatus = 1
	// All recipients of the exchange request replied.
	GKTurnBasedExchangeStatusComplete GKTurnBasedExchangeStatus = 2
	// The current participant saved the exchange request.
	GKTurnBasedExchangeStatusResolved GKTurnBasedExchangeStatus = 3
	// The sender canceled the exchange request.
	GKTurnBasedExchangeStatusCanceled GKTurnBasedExchangeStatus = 4
)

func (GKTurnBasedExchangeStatus) String

func (e GKTurnBasedExchangeStatus) String() string

type GKTurnBasedMatch

type GKTurnBasedMatch struct {
	foundation.NSObject
}

An object that encapsulates the match data for games where players take turns.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedmatch

func GKTurnBasedMatchFromID

func GKTurnBasedMatchFromID(id objc.ID) *GKTurnBasedMatch

func (*GKTurnBasedMatch) AcceptInviteWithCompletionHandler

func (o *GKTurnBasedMatch) AcceptInviteWithCompletionHandler(completionHandler func(*GKTurnBasedMatch, unsafe.Pointer))

Accepts an invitation for the local player to join a turn-based match.

func (*GKTurnBasedMatch) ActiveExchanges

func (o *GKTurnBasedMatch) ActiveExchanges() *foundation.NSArray[*GKTurnBasedExchange]

func (*GKTurnBasedMatch) CompletedExchanges

func (o *GKTurnBasedMatch) CompletedExchanges() *foundation.NSArray[*GKTurnBasedExchange]

func (*GKTurnBasedMatch) CreationDate

func (o *GKTurnBasedMatch) CreationDate() *foundation.NSDate

func (*GKTurnBasedMatch) CurrentParticipant

func (o *GKTurnBasedMatch) CurrentParticipant() *GKTurnBasedParticipant

func (*GKTurnBasedMatch) DeclineInviteWithCompletionHandler

func (o *GKTurnBasedMatch) DeclineInviteWithCompletionHandler(completionHandler func(unsafe.Pointer))

Declines an invitation for the local player to join a turn-based match.

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataCompletionHandler

func (o *GKTurnBasedMatch) EndMatchInTurnWithMatchDataCompletionHandler(matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Ends the match.

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler

func (o *GKTurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler(matchData *foundation.NSData, scores *foundation.NSArray[*GKLeaderboardScore], achievements *foundation.NSArray[objc.ID], completionHandler func(unsafe.Pointer))

Ends the match while submitting scores and achievements for all of the participants.

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievementsCompletionHandler

func (o *GKTurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievementsCompletionHandler(matchData *foundation.NSData, scores *foundation.NSArray[*GKScore], achievements *foundation.NSArray[*GKAchievement], completionHandler func(unsafe.Pointer))

Ends the match while submitting all of the scores and achievements. Deprecated: since macOS 11.0.

func (*GKTurnBasedMatch) EndTurnWithNextParticipantMatchDataCompletionHandler

func (o *GKTurnBasedMatch) EndTurnWithNextParticipantMatchDataCompletionHandler(nextParticipant *GKTurnBasedParticipant, matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Updates the data stored on Game Center for the current match. Deprecated: since macOS 10.9.

func (*GKTurnBasedMatch) EndTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler

func (o *GKTurnBasedMatch) EndTurnWithNextParticipantsTurnTimeoutMatchDataCompletionHandler(nextParticipants *foundation.NSArray[*GKTurnBasedParticipant], timeout float64, matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Passes the turn from the current participant to the next participant.

func (*GKTurnBasedMatch) ExchangeDataMaximumSize

func (o *GKTurnBasedMatch) ExchangeDataMaximumSize() uint

func (*GKTurnBasedMatch) ExchangeMaxInitiatedExchangesPerPlayer

func (o *GKTurnBasedMatch) ExchangeMaxInitiatedExchangesPerPlayer() uint

func (*GKTurnBasedMatch) Exchanges

func (*GKTurnBasedMatch) LoadMatchDataWithCompletionHandler

func (o *GKTurnBasedMatch) LoadMatchDataWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))

Fetches your game-specific data that you store in Game Center when ending a turn, saving a turn, or leaving a match.

func (*GKTurnBasedMatch) MatchData

func (o *GKTurnBasedMatch) MatchData() *foundation.NSData

func (*GKTurnBasedMatch) MatchDataMaximumSize

func (o *GKTurnBasedMatch) MatchDataMaximumSize() uint

func (*GKTurnBasedMatch) MatchID

func (o *GKTurnBasedMatch) MatchID() *foundation.NSString

func (*GKTurnBasedMatch) Message

func (o *GKTurnBasedMatch) Message() *foundation.NSString

func (*GKTurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler

func (o *GKTurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantMatchDataCompletionHandler(matchOutcome GKTurnBasedMatchOutcome, nextParticipant *GKTurnBasedParticipant, matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Resigns the current player from the match without ending the match. Deprecated: since macOS 10.9.

func (*GKTurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler

func (o *GKTurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchDataCompletionHandler(matchOutcome GKTurnBasedMatchOutcome, nextParticipants *foundation.NSArray[*GKTurnBasedParticipant], timeout float64, matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Forfeits the match on behalf of the local player when it’s their turn.

func (*GKTurnBasedMatch) ParticipantQuitOutOfTurnWithOutcomeWithCompletionHandler

func (o *GKTurnBasedMatch) ParticipantQuitOutOfTurnWithOutcomeWithCompletionHandler(matchOutcome GKTurnBasedMatchOutcome, completionHandler func(unsafe.Pointer))

Forfeits the match on behalf of the local player when it’s not their turn.

func (*GKTurnBasedMatch) Participants

func (*GKTurnBasedMatch) RematchWithCompletionHandler

func (o *GKTurnBasedMatch) RematchWithCompletionHandler(completionHandler func(*GKTurnBasedMatch, unsafe.Pointer))

Creates a new turn-based match with the same participants from an existing match.

func (*GKTurnBasedMatch) RemoveWithCompletionHandler

func (o *GKTurnBasedMatch) RemoveWithCompletionHandler(completionHandler func(unsafe.Pointer))

Removes a match from Game Center that the local player participants in.

func (*GKTurnBasedMatch) SaveCurrentTurnWithMatchDataCompletionHandler

func (o *GKTurnBasedMatch) SaveCurrentTurnWithMatchDataCompletionHandler(matchData *foundation.NSData, completionHandler func(unsafe.Pointer))

Saves your match data in Game Center without ending the turn.

func (*GKTurnBasedMatch) SaveMergedMatchDataWithResolvedExchangesCompletionHandler

func (o *GKTurnBasedMatch) SaveMergedMatchDataWithResolvedExchangesCompletionHandler(matchData *foundation.NSData, exchanges *foundation.NSArray[*GKTurnBasedExchange], completionHandler func(unsafe.Pointer))

Saves match data for completed exchanges without ending the turn.

func (*GKTurnBasedMatch) SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler

func (o *GKTurnBasedMatch) SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeoutCompletionHandler(participants *foundation.NSArray[*GKTurnBasedParticipant], data *foundation.NSData, key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString], timeout float64, completionHandler func(*GKTurnBasedExchange, unsafe.Pointer))

Sends an exchange request that contains your game data to one or more participants.

func (*GKTurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler

func (o *GKTurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler(participants *foundation.NSArray[*GKTurnBasedParticipant], key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString], completionHandler func(unsafe.Pointer))

Sends a reminder from one participant to a specific set of other participants.

func (*GKTurnBasedMatch) SetLocalizableMessageWithKeyArguments

func (o *GKTurnBasedMatch) SetLocalizableMessageWithKeyArguments(key *foundation.NSString, arguments *foundation.NSArray[*foundation.NSString])

Sends a localized message from the current participant to all other participants when you end a turn, forfeit a match, or end a match.

func (*GKTurnBasedMatch) SetMessage

func (o *GKTurnBasedMatch) SetMessage(message *foundation.NSString)

func (*GKTurnBasedMatch) Status

type GKTurnBasedMatchOutcome

type GKTurnBasedMatchOutcome int64

The state of a participant when they forfeit a match or when a match ends.

const (
	GKTurnBasedMatchOutcomeNone        GKTurnBasedMatchOutcome = 0
	GKTurnBasedMatchOutcomeQuit        GKTurnBasedMatchOutcome = 1
	GKTurnBasedMatchOutcomeWon         GKTurnBasedMatchOutcome = 2
	GKTurnBasedMatchOutcomeLost        GKTurnBasedMatchOutcome = 3
	GKTurnBasedMatchOutcomeTied        GKTurnBasedMatchOutcome = 4
	GKTurnBasedMatchOutcomeTimeExpired GKTurnBasedMatchOutcome = 5
	GKTurnBasedMatchOutcomeFirst       GKTurnBasedMatchOutcome = 6
	GKTurnBasedMatchOutcomeSecond      GKTurnBasedMatchOutcome = 7
	GKTurnBasedMatchOutcomeThird       GKTurnBasedMatchOutcome = 8
	GKTurnBasedMatchOutcomeFourth      GKTurnBasedMatchOutcome = 9
	GKTurnBasedMatchOutcomeCustomRange GKTurnBasedMatchOutcome = 16711680
)

func (GKTurnBasedMatchOutcome) String

func (e GKTurnBasedMatchOutcome) String() string

type GKTurnBasedMatchStatus

type GKTurnBasedMatchStatus int64

The states of a match from when it’s created to when it ends.

const (
	GKTurnBasedMatchStatusUnknown  GKTurnBasedMatchStatus = 0
	GKTurnBasedMatchStatusOpen     GKTurnBasedMatchStatus = 1
	GKTurnBasedMatchStatusEnded    GKTurnBasedMatchStatus = 2
	GKTurnBasedMatchStatusMatching GKTurnBasedMatchStatus = 3
)

func (GKTurnBasedMatchStatus) String

func (e GKTurnBasedMatchStatus) String() string

type GKTurnBasedMatchmakerViewController

type GKTurnBasedMatchmakerViewController struct {
	appkit.NSViewController
}

An interface that allows a player to invite other players to a turn-based match and automatch to fill any empty slots.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedmatchmakerviewcontroller

func GKTurnBasedMatchmakerViewControllerFromID

func GKTurnBasedMatchmakerViewControllerFromID(id objc.ID) *GKTurnBasedMatchmakerViewController

func (*GKTurnBasedMatchmakerViewController) InitWithMatchRequest

func (o *GKTurnBasedMatchmakerViewController) InitWithMatchRequest(request *GKMatchRequest) objc.ID

Creates a matchmaker view controller for the local player to start inviting other players to a turn-based game.

func (*GKTurnBasedMatchmakerViewController) MatchmakingMode

func (*GKTurnBasedMatchmakerViewController) SetMatchmakingMode

func (o *GKTurnBasedMatchmakerViewController) SetMatchmakingMode(matchmakingMode GKMatchmakingMode)

func (*GKTurnBasedMatchmakerViewController) SetShowExistingMatches

func (o *GKTurnBasedMatchmakerViewController) SetShowExistingMatches(showExistingMatches bool)

func (*GKTurnBasedMatchmakerViewController) SetTurnBasedMatchmakerDelegate

func (o *GKTurnBasedMatchmakerViewController) SetTurnBasedMatchmakerDelegate(turnBasedMatchmakerDelegate GKTurnBasedMatchmakerViewControllerDelegate)

func (*GKTurnBasedMatchmakerViewController) ShowExistingMatches

func (o *GKTurnBasedMatchmakerViewController) ShowExistingMatches() bool

func (*GKTurnBasedMatchmakerViewController) TurnBasedMatchmakerDelegate

type GKTurnBasedMatchmakerViewControllerDelegate

type GKTurnBasedMatchmakerViewControllerDelegate interface {
	TurnBasedMatchmakerViewControllerWasCancelled(viewController *GKTurnBasedMatchmakerViewController)
	TurnBasedMatchmakerViewControllerDidFailWithError(viewController *GKTurnBasedMatchmakerViewController, error_ unsafe.Pointer)
}

GKTurnBasedMatchmakerViewControllerDelegate wraps the ObjC protocol GKTurnBasedMatchmakerViewControllerDelegate.

type GKTurnBasedParticipant

type GKTurnBasedParticipant struct {
	foundation.NSObject
}

A participant in a turn-based match.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkturnbasedparticipant

func GKTurnBasedParticipantFromID

func GKTurnBasedParticipantFromID(id objc.ID) *GKTurnBasedParticipant

func (*GKTurnBasedParticipant) LastTurnDate

func (o *GKTurnBasedParticipant) LastTurnDate() *foundation.NSDate

func (*GKTurnBasedParticipant) MatchOutcome

func (*GKTurnBasedParticipant) Player

func (o *GKTurnBasedParticipant) Player() *GKPlayer

func (*GKTurnBasedParticipant) PlayerID deprecated

Deprecated: since macOS 10.10.

func (*GKTurnBasedParticipant) SetMatchOutcome

func (o *GKTurnBasedParticipant) SetMatchOutcome(matchOutcome GKTurnBasedMatchOutcome)

func (*GKTurnBasedParticipant) Status

func (*GKTurnBasedParticipant) TimeoutDate

func (o *GKTurnBasedParticipant) TimeoutDate() *foundation.NSDate

type GKTurnBasedParticipantStatus

type GKTurnBasedParticipantStatus int64

The state the participant is in during the match.

const (
	GKTurnBasedParticipantStatusUnknown  GKTurnBasedParticipantStatus = 0
	GKTurnBasedParticipantStatusInvited  GKTurnBasedParticipantStatus = 1
	GKTurnBasedParticipantStatusDeclined GKTurnBasedParticipantStatus = 2
	GKTurnBasedParticipantStatusMatching GKTurnBasedParticipantStatus = 3
	GKTurnBasedParticipantStatusActive   GKTurnBasedParticipantStatus = 4
	GKTurnBasedParticipantStatusDone     GKTurnBasedParticipantStatus = 5
)

func (GKTurnBasedParticipantStatus) String

type GKViewController

type GKViewController interface {
}

GKViewController wraps the ObjC protocol GKViewController.

type GKVoiceChat

type GKVoiceChat struct {
	foundation.NSObject
}

A voice channel that allows players to speak with each other in a multiplayer game.

Apple documentation: https://developer.apple.com/documentation/gamekit/gkvoicechat Deprecated: No longer supported

func GKVoiceChatFromID

func GKVoiceChatFromID(id objc.ID) *GKVoiceChat

func (*GKVoiceChat) IsActive deprecated

func (o *GKVoiceChat) IsActive() bool

Deprecated: No longer supported

func (*GKVoiceChat) Name deprecated

func (o *GKVoiceChat) Name() *foundation.NSString

Deprecated: No longer supported

func (*GKVoiceChat) PlayerIDs

func (o *GKVoiceChat) PlayerIDs() *foundation.NSArray[*foundation.NSString]

* This property is obsolete. ** Deprecated: since macOS 10.10.

func (*GKVoiceChat) PlayerStateUpdateHandler deprecated

func (o *GKVoiceChat) PlayerStateUpdateHandler() objc.Block

Deprecated: since macOS 10.10.

func (*GKVoiceChat) PlayerVoiceChatStateDidChangeHandler deprecated

func (o *GKVoiceChat) PlayerVoiceChatStateDidChangeHandler() objc.Block

Deprecated: No longer supported

func (*GKVoiceChat) Players deprecated

func (o *GKVoiceChat) Players() *foundation.NSArray[*GKPlayer]

Deprecated: No longer supported

func (*GKVoiceChat) SetActive

func (o *GKVoiceChat) SetActive(active bool)

func (*GKVoiceChat) SetMuteForPlayer

func (o *GKVoiceChat) SetMuteForPlayer(isMuted bool, playerID *foundation.NSString)

Mutes a player in a voice chat. Deprecated: since macOS 10.10.

func (*GKVoiceChat) SetPlayerMuted

func (o *GKVoiceChat) SetPlayerMuted(player *GKPlayer, isMuted bool)

Mutes a player in the chat, including the local player. Deprecated: No longer supported

func (*GKVoiceChat) SetPlayerStateUpdateHandler deprecated

func (o *GKVoiceChat) SetPlayerStateUpdateHandler(playerStateUpdateHandler func(*foundation.NSString, GKVoiceChatPlayerState))

Deprecated: since macOS 10.10.

func (*GKVoiceChat) SetPlayerVoiceChatStateDidChangeHandler deprecated

func (o *GKVoiceChat) SetPlayerVoiceChatStateDidChangeHandler(playerVoiceChatStateDidChangeHandler func(*GKPlayer, GKVoiceChatPlayerState))

Deprecated: No longer supported

func (*GKVoiceChat) SetVolume

func (o *GKVoiceChat) SetVolume(volume float32)

func (*GKVoiceChat) Start

func (o *GKVoiceChat) Start()

Starts communication with other players in a channel. Deprecated: No longer supported

func (*GKVoiceChat) Stop

func (o *GKVoiceChat) Stop()

Ends communication with other players in a channel. Deprecated: No longer supported

func (*GKVoiceChat) Volume deprecated

func (o *GKVoiceChat) Volume() float32

Deprecated: No longer supported

type GKVoiceChatClient

type GKVoiceChatClient interface {
	VoiceChatServiceSendDataToParticipantID(voiceChatService objc.ID, data *foundation.NSData, participantID *foundation.NSString)
	ParticipantID() *foundation.NSString
}

GKVoiceChatClient wraps the ObjC protocol GKVoiceChatClient.

type GKVoiceChatPlayerState

type GKVoiceChatPlayerState int64

The state of a player in a voice chat. Deprecated: No longer supported

const (
	GKVoiceChatPlayerConnected    GKVoiceChatPlayerState = 0
	GKVoiceChatPlayerDisconnected GKVoiceChatPlayerState = 1
	GKVoiceChatPlayerSpeaking     GKVoiceChatPlayerState = 2
	GKVoiceChatPlayerSilent       GKVoiceChatPlayerState = 3
	GKVoiceChatPlayerConnecting   GKVoiceChatPlayerState = 4
)

func (GKVoiceChatPlayerState) String

func (e GKVoiceChatPlayerState) String() string

type HIDReportCommandType

type HIDReportCommandType int64

@typedef HIDReportCommandType @abstract Type of the report command for DriverKit driver

const (
	KIOHIDReportCommandSetReport HIDReportCommandType = 0
	KIOHIDReportCommandGetReport HIDReportCommandType = 1
)

func (HIDReportCommandType) String

func (e HIDReportCommandType) String() string

type IOHIDButtonModes

type IOHIDButtonModes int64
const (
	KIOHIDButtonMode_BothLeftClicks         IOHIDButtonModes = 0
	KIOHIDButtonMode_ReverseLeftRightClicks IOHIDButtonModes = 1
	KIOHIDButtonMode_EnableRightClick       IOHIDButtonModes = 2
)

func (IOHIDButtonModes) String

func (e IOHIDButtonModes) String() string

type IOHIDElementCommitDirection

type IOHIDElementCommitDirection int64

@typedef IOHIDElementCommitDirection @abstract Commit direction passed in to the commit() function of an IOHIDElement. @field kIOHIDElementCommitDirectionIn Passing in kIOHIDElementCommitDirectionIn will issue a getReport call to the device, and the element will be updated with the value retrieved by the device. The value can be accessed via the getValue() or getDataValue() functions. @field kIOHIDElementCommitDirectionOut Passing in kIOHIDElementCommitDirectionOut will issue a setReport call to the device. Before issuing this call, the desired value should be set on the element with the setValue() or setDataValue() functions.

const (
	KIOHIDElementCommitDirectionIn  IOHIDElementCommitDirection = 0
	KIOHIDElementCommitDirectionOut IOHIDElementCommitDirection = 1
)

func (IOHIDElementCommitDirection) String

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type NXMouseButton

type NXMouseButton int64
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Os_unfair_lock_flags_t

type Os_unfair_lock_flags_t int64
const (
	OS_UNFAIR_LOCK_FLAG_NONE          Os_unfair_lock_flags_t = 0
	OS_UNFAIR_LOCK_FLAG_ADAPTIVE_SPIN Os_unfair_lock_flags_t = 262144
)

func (Os_unfair_lock_flags_t) String

func (e Os_unfair_lock_flags_t) String() string

type PMPageToPaperMappingType

type PMPageToPaperMappingType int64
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL