gamekit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 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

func GKAchievementDescriptionLoadAchievementDescriptionsWithCompletionHandler

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

Asynchronously load all achievement descriptions

func GKAchievementDescriptionPlaceholderCompletedAchievementImage

func GKAchievementDescriptionPlaceholderCompletedAchievementImage() *appkit.NSImage

func GKAchievementLoadAchievementsWithCompletionHandler

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

Asynchronously load all achievements for the local player

func GKAchievementReportAchievementsWithCompletionHandler

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

Report an array of achievements to the server. Percent complete is required. Points, completed state are set based on percentComplete. isHidden is set to NO anytime this method is invoked. Date is optional. Error will be nil on success. Possible reasons for error: 1. Local player not authenticated 2. Communications failure 3. Reported Achievement does not exist

func GKAchievementReportAchievementsWithEligibleChallengesWithCompletionHandler

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

Use this alternative to reportAchievements:withCompletionHandler: to allow only certain specific challenges to be completed. Pass nil to avoid completing any challenges. Deprecated: since macOS 26.0.

func GKAchievementResetAchievementsWithCompletionHandler

func GKAchievementResetAchievementsWithCompletionHandler(completionHandler func(unsafe.Pointer))

Reset the achievements progress for the local player. All the entries for the local player are removed from the server. Error will be nil on success. Possible reasons for error: 1. Local player not authenticated 2. Communications failure

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. - Important: Archived challenge definitions are excluded.

func GKChallengeLoadReceivedChallengesWithCompletionHandler

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

Query challenges for the current game issued to the local player -- equivalent GKChallenge objects are not guaranteed to be pointer equivalent across calls, but equal GKChallenge objects will have equal hashes Deprecated: since macOS 26.0.

func GKCloudPlayerGetCurrentSignedInPlayerForContainerCompletionHandler

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

Retrieve a player instance representing the active iCloud account for a given iCloud container. Returns nil and an error if the user is not signed in to iCloud or the container is invalid.

func GKErrorDomain

func GKErrorDomain() *foundation.NSString

func GKExchangeTimeoutDefault

func GKExchangeTimeoutDefault() float64

func GKExchangeTimeoutNone

func GKExchangeTimeoutNone() float64

func GKFriendRequestComposeViewControllerMaxNumberOfRecipients

func GKFriendRequestComposeViewControllerMaxNumberOfRecipients() uint

Get the maximum number of recipients permitted Deprecated: No longer supported.

func GKGameActivityCheckPendingGameActivityExistenceWithCompletionHandler

func GKGameActivityCheckPendingGameActivityExistenceWithCompletionHandler(completionHandler func(bool))

Checks whether there is a pending activity to handle for the current game. You can call this method before you initialize Game Center to avoid activating the system banner or welcome experience.

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. Party code should be two parts of strings with the same length (2-6) connected with a dash, and the code can be either pure digits (0-9), or both parts are uppercased characters from “GKGameActivity/validPartyCodeAlphabet“.

func GKGameActivityValidPartyCodeAlphabet

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

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

func GKGameSessionAddEventListener deprecated

func GKGameSessionAddEventListener(listener *foundation.NSObject)

Deprecated: since macOS 10.14.

func GKGameSessionCreateSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler

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

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))

func GKGameSessionLoadSessionsInContainerCompletionHandler

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

func GKGameSessionRemoveEventListener deprecated

func GKGameSessionRemoveEventListener(listener *foundation.NSObject)

Deprecated: since macOS 10.14.

func GKGameSessionRemoveSessionWithIdentifierCompletionHandler

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

func GKLeaderboardLoadCategoriesWithCompletionHandler deprecated

func GKLeaderboardLoadCategoriesWithCompletionHandler(completionHandler objc.Block)

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 classic and recurring leaderboards associated with the supplied App Store Connect leaderboard IDs. If leaderboardIDs is nil, this loads all classic and recurring leaderboards for this game.

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 array with all sets for game Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Set not present

func GKLeaderboardSubmitScoreContextPlayerLeaderboardIDsCompletionHandler

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

Class method to submit a single score to multiple leaderboards score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submitted leaderboardIDs - one or more leaderboard IDs defined in App Store Connect

func GKMatchRequestMaxPlayersAllowedForMatchOfType

func GKMatchRequestMaxPlayersAllowedForMatchOfType(matchType GKMatchType) uint

To determine the maximum allowed players for each type of match supported.

func GKNotificationBannerShowBannerWithTitleMessageCompletionHandler deprecated

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

Deprecated: Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.

func GKNotificationBannerShowBannerWithTitleMessageDurationCompletionHandler deprecated

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

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))

Load the Game Center players for the playerIDs provided. Error will be nil on success. Possible reasons for error: 1. Unauthenticated local player 2. Communications failure 3. Invalid player identifier Deprecated: since macOS 11.3.

func GKScoreReportLeaderboardScoresWithEligibleChallengesWithCompletionHandler deprecated

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

Deprecated: since macOS 26.0.

func GKScoreReportScoresWithCompletionHandler

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

Report scores to the server. The value must be set, and date may be changed. Possible reasons for error: 1. Value not set 2. Local player not authenticated 3. Communications problem Deprecated: since macOS 11.0.

func GKScoreReportScoresWithEligibleChallengesWithCompletionHandler

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

Use this alternative to reportScores:withCompletionHandler: to allow only certain specific challenges to be completed. Pass nil to avoid completing any 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))

func GKTurnBasedMatchLoadMatchWithIDWithCompletionHandler

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

func GKTurnBasedMatchLoadMatchesWithCompletionHandler

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

func GKTurnTimeoutDefault

func GKTurnTimeoutDefault() float64

func GKTurnTimeoutNone

func GKTurnTimeoutNone() float64

func GKVoiceChatIsVoIPAllowed deprecated

func GKVoiceChatIsVoIPAllowed() bool

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
}

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())

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())

this lets the developer trigger the access point as if the user had touched it. This is useful for games that use controllers or the remote on AppleTV. the argument lets you specify a specific state (default, profile, achievements, leaderboards) for GameCenterViewController

func (*GKAccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler

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

func (*GKAccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler

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

func (*GKAccessPoint) TriggerAccessPointWithPlayerHandler

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

func (*GKAccessPoint) TriggerAccessPointWithStateHandler

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

type GKAccessPointLocation

type GKAccessPointLocation int64
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
}

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

func GKAchievementFromID

func GKAchievementFromID(id objc.ID) *GKAchievement

func (*GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletion deprecated

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

Deprecated: since macOS 26.0.

func (*GKAchievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler deprecated

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

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

Designated initializer

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

Initialize the achievement for a specific player. Use to submit participant achievements when ending a turn-based match.

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 objc.Block)

* 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))

Given a list of players, return a subset of that list containing only players that are eligible to receive a challenge for the 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
}

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
}

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 deprecated

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

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
}

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
}

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
}

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()

Any GKChallenge object to be declined must be in a state of GKChallengeStatePending in order to be successfully cancelled

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
}

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
}

A singleton object responsible for dispatching challenge-related events to its delegate

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 deprecated

func GKChallengeEventHandlerChallengeEventHandler() *GKChallengeEventHandler

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 deprecated

type GKChallengeState int64

Deprecated: since macOS 26.0.

const (
	GKChallengeStateInvalid   GKChallengeState = 0
	GKChallengeStatePending   GKChallengeState = 1
	GKChallengeStateCompleted GKChallengeState = 2
	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
}

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
const (
	GKConnectionStateNotConnected GKConnectionState = 0
	GKConnectionStateConnected    GKConnectionState = 1
)

func (GKConnectionState) String

func (e GKConnectionState) String() string

type GKDialogController

type GKDialogController struct {
	appkit.NSResponder
}

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

func GKDialogControllerFromID

func GKDialogControllerFromID(id objc.ID) *GKDialogController

func GKDialogControllerSharedDialogController

func GKDialogControllerSharedDialogController() *GKDialogController

func (*GKDialogController) Dismiss

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

func (*GKDialogController) ParentWindow

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

func (*GKDialogController) PresentViewController

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

func (*GKDialogController) SetParentWindow

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

type GKErrorCode

type GKErrorCode int64
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
}

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])

Add recipients to the request. If you don't specify at least one recipient before presenting the view, the recipients field will be made firstResponder, to encourage the user to add some. If you add more than maxNumberOfRecipients recipients, these methods will throw an exception.

func (*GKFriendRequestComposeViewController) AddRecipientsWithEmailAddresses deprecated

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

Deprecated: since macOS 10.10.

func (*GKFriendRequestComposeViewController) AddRecipientsWithPlayerIDs deprecated

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

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

Specify the message sent to the invitee. A default message will be used if you don't specify one.

type GKFriendRequestComposeViewControllerDelegate

type GKFriendRequestComposeViewControllerDelegate interface {
	FriendRequestComposeViewControllerDidFinish(viewController *GKFriendRequestComposeViewController)
}

GKFriendRequestComposeViewControllerDelegate wraps the ObjC protocol GKFriendRequestComposeViewControllerDelegate.

type GKFriendsAuthorizationStatus

type GKFriendsAuthorizationStatus int64
const (
	GKFriendsAuthorizationStatusNotDetermined GKFriendsAuthorizationStatus = 0
	GKFriendsAuthorizationStatusRestricted    GKFriendsAuthorizationStatus = 1
	GKFriendsAuthorizationStatusDenied        GKFriendsAuthorizationStatus = 2
	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. The framework converts the party code to uppercase.

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. This reports all associated achievements and submit scores to leaderboards.

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. GameKit creates a classic match making request with the activity's party code and other information, and returns the match object in the completion handler or any error that occurred. An error occurs if this activity doesn't support party code, or has an unsupported range of players, which is used to be configured as match request's `minPlayers` and `maxPlayers`.

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. GameKit creates a classic server hosted match making request with the activity's party code and other information, and returns the players in the completion handler or any error that occurred. An error occurs if this activity doesn't support party code, or has unsupported range of players, which is used to be configured as match request's `minPlayers` and `maxPlayers`.

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. Returns `0` if the achievement hasn't been set in the current activity.

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. The system reports achievement completion when the activity ends.

func (*GKGameActivity) SetProgressOnAchievementToPercentComplete

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

Set a progress for an achievement for a player. The framework reports achievement progress when the activity ends.

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. The framewowrk submits the score to the leaderboard when the activity ends.

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. The framewwork submits the score to the leaderboard when the activity ends.

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
}

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
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
}

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

func (*GKGameCenterViewController) InitWithLeaderboardIDPlayerScopeTimeScope

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

func (*GKGameCenterViewController) InitWithLeaderboardPlayerScope

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

func (*GKGameCenterViewController) InitWithLeaderboardSetID

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

func (*GKGameCenterViewController) InitWithPlayer

func (*GKGameCenterViewController) InitWithState

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
const (
	GKGameCenterViewControllerStateDefault                GKGameCenterViewControllerState = -1
	GKGameCenterViewControllerStateLeaderboards           GKGameCenterViewControllerState = 0
	GKGameCenterViewControllerStateAchievements           GKGameCenterViewControllerState = 1
	GKGameCenterViewControllerStateChallenges             GKGameCenterViewControllerState = 2
	GKGameCenterViewControllerStateLocalPlayerProfile     GKGameCenterViewControllerState = 3
	GKGameCenterViewControllerStateDashboard              GKGameCenterViewControllerState = 4
	GKGameCenterViewControllerStateLocalPlayerFriendsList GKGameCenterViewControllerState = 5
)

func (GKGameCenterViewControllerState) String

type GKGameSession

type GKGameSession struct {
	foundation.NSObject
}

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))

func (*GKGameSession) GetShareURLWithCompletionHandler

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

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))

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]

func (*GKGameSession) SaveDataCompletionHandler

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

func (*GKGameSession) SendDataWithTransportTypeCompletionHandler

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

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))

func (*GKGameSession) SetConnectionStateCompletionHandler

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

func (*GKGameSession) Title

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

type GKGameSessionErrorCode deprecated

type GKGameSessionErrorCode int64

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
}

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
const (
	GKInviteRecipientResponseAccepted        GKInviteRecipientResponse = 0
	GKInviteRecipientResponseDeclined        GKInviteRecipientResponse = 1
	GKInviteRecipientResponseFailed          GKInviteRecipientResponse = 2
	GKInviteRecipientResponseIncompatible    GKInviteRecipientResponse = 3
	GKInviteRecipientResponseUnableToConnect GKInviteRecipientResponse = 4
	GKInviteRecipientResponseNoAnswer        GKInviteRecipientResponse = 5
	GKInviteeResponseAccepted                GKInviteRecipientResponse = 0
	GKInviteeResponseDeclined                GKInviteRecipientResponse = 1
	GKInviteeResponseFailed                  GKInviteRecipientResponse = 2
	GKInviteeResponseIncompatible            GKInviteRecipientResponse = 3
	GKInviteeResponseUnableToConnect         GKInviteRecipientResponse = 4
	GKInviteeResponseNoAnswer                GKInviteRecipientResponse = 5
)

func (GKInviteRecipientResponse) String

func (e GKInviteRecipientResponse) String() string

type GKLeaderboard

type GKLeaderboard struct {
	foundation.NSObject
}

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))

Loads leaderboard entries based on the supplied parameters. playerScope - Friends or Global timeScope - Today, Week, All Time (Only applicable to classic leaderboards) range - Range of ranked entries to return (minimum start index 1, maximum length 100) Upon completion, will return: localPlayerEntry - entry for the local player entries - requested entries matching supplied parameters totalPlayerCount - total player count matching specified scope

func (*GKLeaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler

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

Loads leaderboard entries for specific players based on the supplied parameters. players - Array of players to load entries for timeScope - Today, Week, All Time (Only applicable to classic leaderboards) Upon completion, will return: localPlayerEntry - entry for the local player entries - requested entries matching supplied parameters

func (*GKLeaderboard) LoadImageWithCompletionHandler

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

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

func (*GKLeaderboard) LoadPreviousOccurrenceWithCompletionHandler

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

Loads the occurrence preceding this occurrence for a recurring leaderboard in which the local player submitted a score. If no previous occurrence is found that the player submitted a score to, then the most recent previous occurrence is returned.

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))

Instance method to submit a single score to the leaderboard associated with this instance score - earned by the player context - developer supplied metadata associated with the player's score player - the player for whom this score is being submitted

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
}

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 objc.Block) *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
const (
	GKLeaderboardPlayerScopeGlobal      GKLeaderboardPlayerScope = 0
	GKLeaderboardPlayerScopeFriendsOnly GKLeaderboardPlayerScope = 1
)

func (GKLeaderboardPlayerScope) String

func (e GKLeaderboardPlayerScope) String() string

type GKLeaderboardScore

type GKLeaderboardScore struct {
	foundation.NSObject
}

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
}

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))

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

func (*GKLeaderboardSet) LoadLeaderboardsWithCompletionHandler

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

Loads array with all leaderboards for the leaderboardSet Possible reasons for error: 1. Communications problem 2. Unauthenticated player Deprecated: since macOS 11.0.

func (*GKLeaderboardSet) LoadLeaderboardsWithHandler

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

Loads array with all classic leaderboards and current instances of recurring leaderboards for this leaderboardSet Possible reasons for error: 1. Communications problem 2. Unauthenticated player

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
const (
	GKLeaderboardTimeScopeToday   GKLeaderboardTimeScope = 0
	GKLeaderboardTimeScopeWeek    GKLeaderboardTimeScope = 1
	GKLeaderboardTimeScopeAllTime GKLeaderboardTimeScope = 2
)

func (GKLeaderboardTimeScope) String

func (e GKLeaderboardTimeScope) String() string

type GKLeaderboardType

type GKLeaderboardType int64
const (
	GKLeaderboardTypeClassic   GKLeaderboardType = 0
	GKLeaderboardTypeRecurring GKLeaderboardType = 1
)

func (GKLeaderboardType) String

func (e GKLeaderboardType) String() string

type GKLeaderboardViewController

type GKLeaderboardViewController struct {
	GKGameCenterViewController
}

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
}

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))

Asynchronously delete saved games with the given name. The completion handler will indicate whether or not the deletion was successful.

func (*GKLocalPlayer) FetchItemsForIdentityVerificationSignature

func (o *GKLocalPlayer) FetchItemsForIdentityVerificationSignature(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

func (*GKLocalPlayer) FetchSavedGamesWithCompletionHandler

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

Asynchronously fetch saved games. The handler is called with an array of GKSavedGame objects or an error. If there is more than one saved game with the same name then a conflict exists. The application should determine the correct data to use and call resolveConflictingSavedGames:withData:completionHandler:. This may require data merging or asking the user.

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))

Asynchronously load the challengable friends list as an array of GKPlayer. A challengable player is a friend player with friend level FL1 and FL2. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player

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))

Load the default leaderboard identifier for the local player Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present 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))

func (*GKLocalPlayer) LoadFriendsAuthorizationStatus

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

func (*GKLocalPlayer) LoadFriendsWithCompletionHandler

func (o *GKLocalPlayer) LoadFriendsWithCompletionHandler(completionHandler objc.Block)

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))

func (*GKLocalPlayer) LoadRecentPlayersWithCompletionHandler

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

Asynchronously load the recent players list as an array of GKPlayer. A recent player is someone that you have played a game with or is a legacy game center friend. Calls completionHandler when finished. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player

func (*GKLocalPlayer) PresentFriendRequestCreatorFromWindowError

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

presentFriendRequestCreatorFromWindow: Discussion: MacOS only. When invoked, if no error is encountered, the caller application is backgrounded and the 'Messages' application is launched/foregrounded, with a formatted friend request message. If an error occurs, controls are returned to the caller application, with an error describing the error. Possible reasons for error: - The local player user account is not allowed to add friends - The device is not allowing outgoing traffic at the time of the operation

func (*GKLocalPlayer) RegisterListener

func (o *GKLocalPlayer) RegisterListener(listener GKLocalPlayerListener)

A single listener may be registered once. Registering multiple times results in undefined behavior. The registered listener will receive callbacks for any selector it responds to.

func (*GKLocalPlayer) ResolveConflictingSavedGamesWithDataCompletionHandler

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

Asynchronously resolve a saved game conflict. This deletes all versions included in conflictingSavedGames and creates a new version with the given data. The completion handler is called with the newly created save and all other remaining versions or an error.

func (*GKLocalPlayer) SaveGameDataWithNameCompletionHandler

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

Asynchronously save game data. If a saved game with that name already exists it is overwritten, otherwise a new one is created. The completion handler is called with the new / modified GKSavedGame or an error. If the saved game was in conflict then the overwritten version will be the one with the same deviceName if present, otherwise the most recent overall.

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))

Set the default leaderboard for the current game Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present Deprecated: No longer supported

func (*GKLocalPlayer) UnregisterAllListeners

func (o *GKLocalPlayer) UnregisterAllListeners()

func (*GKLocalPlayer) UnregisterListener

func (o *GKLocalPlayer) UnregisterListener(listener GKLocalPlayerListener)

type GKLocalPlayerListener

GKLocalPlayerListener wraps the ObjC protocol GKLocalPlayerListener.

type GKMatch

type GKMatch struct {
	foundation.NSObject
}

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))

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

func (*GKMatch) ChooseBestHostingPlayerWithCompletionHandler

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

Choose the best host from among the connected players using gathered estimates for bandwidth and packet loss. This is intended for applications that wish to implement a client-server model on top of the match. The returned player ID will be nil if the best host cannot currently be determined (e.g. players are still connecting).

func (*GKMatch) Delegate

func (o *GKMatch) Delegate() GKMatchDelegate

func (*GKMatch) Disconnect

func (o *GKMatch) Disconnect()

Disconnect the match. This will show all other players in the match that the local player has disconnected. This should be called before releasing the match instance.

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))

Automatching to recreate a previous peer-to-peer match that became disconnected. A new match with the same set of players will be returned by the completion handler. All players should perform this when the match has ended for automatching to succeed. Error will be nil on success. Possible reasons for error: 1. Communications failure 2. Timeout

func (*GKMatch) SendDataToAllPlayersWithDataModeError

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

Asynchronously broadcasts data to all players. Returns YES if delivery started, NO if unable to start sending and error will be set.

func (*GKMatch) SendDataToPlayersDataModeError

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

Asynchronously send data to one or more GKPlayers. Returns YES if delivery started, NO if unable to start sending and error will be set.

func (*GKMatch) SendDataToPlayersWithDataModeError

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

* This method is obsolete. It will never be invoked and its implementation does nothing** 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

* This method is deprecated. GKVoiceChat is no longer supported. ** Deprecated: No longer supported

type GKMatchDelegate

type GKMatchDelegate interface {
}

GKMatchDelegate wraps the ObjC protocol GKMatchDelegate.

type GKMatchRequest

type GKMatchRequest struct {
	foundation.NSObject
}

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
const (
	GKMatchSendDataReliable   GKMatchSendDataMode = 0
	GKMatchSendDataUnreliable GKMatchSendDataMode = 1
)

func (GKMatchSendDataMode) String

func (e GKMatchSendDataMode) String() string

type GKMatchType

type GKMatchType uint64
const (
	GKMatchTypePeerToPeer GKMatchType = 0
	GKMatchTypeHosted     GKMatchType = 1
	GKMatchTypeTurnBased  GKMatchType = 2
)

func (GKMatchType) String

func (e GKMatchType) String() string

type GKMatchedPlayers

type GKMatchedPlayers struct {
	foundation.NSObject
}

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
}

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

func GKMatchmakerFromID

func GKMatchmakerFromID(id objc.ID) *GKMatchmaker

func GKMatchmakerSharedMatchmaker

func GKMatchmakerSharedMatchmaker() *GKMatchmaker

The shared matchmaker

func (*GKMatchmaker) AddPlayersToMatchMatchRequestCompletionHandler

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

Automatching or invites to add additional players to a peer-to-peer match for the specified request. Error will be nil on success: Possible reasons for error: 1. Communications failure 2. Timeout

func (*GKMatchmaker) Cancel

func (o *GKMatchmaker) Cancel()

Cancel matchmaking and any pending invites

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)

Cancel a pending invitation to a player

func (*GKMatchmaker) FindMatchForRequestWithCompletionHandler

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

Automatching or invites to find a peer-to-peer match for the specified request. Error will be nil on success: Possible reasons for error: 1. Communications failure 2. Unauthenticated player 3. Timeout Note that the players property on the returned GKMatch instance will only contain connected players. It will initially be empty as players are connecting. Implement the GKMatchDelegate method match:player:didChangeConnectionState: to listen for updates to the GKMatch instance's players property.

func (*GKMatchmaker) FindMatchedPlayersWithCompletionHandler

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

Automatching or invites for host-client rule-based match request.

func (*GKMatchmaker) FindPlayersForHostedMatchRequestWithCompletionHandler

func (o *GKMatchmaker) FindPlayersForHostedMatchRequestWithCompletionHandler(request *GKMatchRequest, completionHandler objc.Block)

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

func (*GKMatchmaker) FindPlayersForHostedRequestWithCompletionHandler

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

Automatching or invites for host-client match request. This returns a list of player identifiers to be included in the match. Determination and communication with the host is not part of this API. When inviting, no player identifiers will be returned. Player responses will be reported via the inviteeResponseHandler. Possible reasons for error: 1. Communications failure 2. Unauthenticated player 3. Timeout

func (*GKMatchmaker) FinishMatchmakingForMatch

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

Call this when finished with all programmatic P2P invites/matchmaking, for compatability with connected players using GKMatchmakerViewController.

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))

Get a match for an accepted invite Possible reasons for error: 1. Communications failure 2. Invite cancelled

func (*GKMatchmaker) QueryActivityWithCompletionHandler

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

Query the server for recent activity for all the player groups of that game. Error will be nil on success. Possible reasons for error: 1. Communications failure

func (*GKMatchmaker) QueryPlayerGroupActivityWithCompletionHandler

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

Query the server for recent activity in the specified player group. A larger value indicates that a given group has seen more recent activity. Error will be nil on success. Possible reasons for error: 1. Communications failure

func (*GKMatchmaker) QueryQueueActivityWithCompletionHandler

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

Query the server for recent activity for the specified queue.

func (*GKMatchmaker) SetInviteHandler deprecated

func (o *GKMatchmaker) SetInviteHandler(inviteHandler objc.Block)

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

func (*GKMatchmaker) StartBrowsingForNearbyPlayersWithHandler

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

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

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))

Activate a group activity by Game Center for your game, which allows people in the FaceTime call to join the local player's game. The handler will be called for each player who joined from the activity.

func (*GKMatchmaker) StopBrowsingForNearbyPlayers

func (o *GKMatchmaker) StopBrowsingForNearbyPlayers()

Stop browsing for nearby players.

func (*GKMatchmaker) StopGroupActivity

func (o *GKMatchmaker) StopGroupActivity()

End the group activity created by Game Center for your game, which was activated by the local player.

type GKMatchmakerViewController

type GKMatchmakerViewController struct {
	appkit.NSViewController
}

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)

Add additional players (not currently connected) to an existing peer-to-peer match. Apps should elect a single device to do this, otherwise conflicts could arise resulting in unexpected connection errors.

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

Initialize with an accepted invite, allowing the user to see the status of other invited players and get notified when the game starts

func (*GKMatchmakerViewController) InitWithMatchRequest

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

Initialize with a matchmaking request, allowing the user to send invites and/or start matchmaking

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)

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

func (*GKMatchmakerViewController) SetHostedPlayerDidConnect

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

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
const (
	GKMatchmakingModeDefault       GKMatchmakingMode = 0
	GKMatchmakingModeNearbyOnly    GKMatchmakingMode = 1
	GKMatchmakingModeAutomatchOnly GKMatchmakingMode = 2
	GKMatchmakingModeInviteOnly    GKMatchmakingMode = 3
)

func (GKMatchmakingMode) String

func (e GKMatchmakingMode) String() string

type GKNotificationBanner

type GKNotificationBanner struct {
	foundation.NSObject
}

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 deprecated

type GKPeerConnectionState int32

Deprecated: No longer supported

const (
	GKPeerStateAvailable      GKPeerConnectionState = 0
	GKPeerStateUnavailable    GKPeerConnectionState = 1
	GKPeerStateConnected      GKPeerConnectionState = 2
	GKPeerStateDisconnected   GKPeerConnectionState = 3
	GKPeerStateConnecting     GKPeerConnectionState = 4
	GKPeerStateConnectedRelay GKPeerConnectionState = 5
)

func (GKPeerConnectionState) String

func (e GKPeerConnectionState) String() string

type GKPhotoSize

type GKPhotoSize int64
const (
	GKPhotoSizeSmall  GKPhotoSize = 0
	GKPhotoSizeNormal GKPhotoSize = 1
)

func (GKPhotoSize) String

func (e GKPhotoSize) String() string

type GKPlayer

type GKPlayer struct {
	GKBasePlayer
}

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

func GKPlayerAnonymousGuestPlayerWithIdentifier

func GKPlayerAnonymousGuestPlayerWithIdentifier(guestIdentifier *foundation.NSString) *GKPlayer

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))

Asynchronously load the player's photo. Error will be nil on success. Possible reasons for error: 1. Communications failure

func (*GKPlayer) ScopedIDsArePersistent

func (o *GKPlayer) ScopedIDsArePersistent() bool

This convenience method checks if the gamePlayerID and the teamPlayerID (scopedIDs) are persistent or unique for the instantiation of this app.

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
const (
	GKPlayerStateUnknown      GKPlayerConnectionState = 0
	GKPlayerStateConnected    GKPlayerConnectionState = 1
	GKPlayerStateDisconnected GKPlayerConnectionState = 2
)

func (GKPlayerConnectionState) String

func (e GKPlayerConnectionState) String() string

type GKReleaseState

type GKReleaseState uint64
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
}

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))

Asynchronously load the data for this saved game. The completion handler is called with loaded data or an error.

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
}

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 deprecated

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

Deprecated: since macOS 26.0.

func (*GKScore) ChallengeComposeControllerWithMessagePlayersCompletionHandler deprecated

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

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 deprecated

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

Deprecated: since macOS 10.10.

func (*GKScore) InitWithLeaderboardIdentifier

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

Initialize the score with the local player and current date. Deprecated: since macOS 11.0.

func (*GKScore) InitWithLeaderboardIdentifierForPlayer

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

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

func (*GKScore) InitWithLeaderboardIdentifierPlayer

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

Initialize the achievement for a specific player. Use to submit participant scores when ending a turn-based match. Deprecated: since macOS 11.0.

func (*GKScore) IssueChallengeToPlayersMessage

func (o *GKScore) 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 (*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 deprecated

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

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
}

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 deprecated

type GKSendDataMode int32

Deprecated: No longer supported

const (
	GKSendDataReliable   GKSendDataMode = 0
	GKSendDataUnreliable GKSendDataMode = 1
)

func (GKSendDataMode) String

func (e GKSendDataMode) String() string

type GKSession

type GKSession struct {
	foundation.NSObject
}

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)

Methods to accept or deny a prior connection request from -session:didReceiveConnectionRequestFromPeer:

func (*GKSession) CancelConnectToPeer

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

func (*GKSession) ConnectToPeerWithTimeout

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

Attempt connection to a remote peer. Remote peer gets a callback to -session:didReceiveConnectionRequestFromPeer:. Success results in a call to delegate -session:peer:didChangeState: GKPeerStateConnected Failure results in a call to delegate -session:connectionWithPeerFailed:withError:

func (*GKSession) Delegate deprecated

func (o *GKSession) Delegate() GKSessionDelegate

Deprecated: No longer supported.

func (*GKSession) DenyConnectionFromPeer

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

func (*GKSession) DisconnectFromAllPeers

func (o *GKSession) DisconnectFromAllPeers()

Disconnect local peer

func (*GKSession) DisconnectPeerFromAllPeers

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

Disconnect a peer from the session (the peer gets disconnected from all connected peers).

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

Return the application chosen name of a specific peer

func (*GKSession) InitWithSessionIDDisplayNameSessionMode deprecated

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

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 peers according to connection state Deprecated: No longer supported.

func (*GKSession) SendDataToAllPeersWithDataModeError

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

Asynchronous delivery to all peers. Returns YES if delivery started, NO if unable to start sending, and error will be set. Delivery will be reliable or unreliable as set by mode. Deprecated: No longer supported.

func (*GKSession) SendDataToPeersWithDataModeError

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

Asynchronous delivery of data to one or more peers. Returns YES if delivery started, NO if unable to start sending, and error will be set. Delivery will be reliable or unreliable as set by mode. 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)

Set the handler to receive data sent from remote peers. 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 deprecated

type GKSessionMode int32

Deprecated: No longer supported

const (
	GKSessionModeServer GKSessionMode = 0
	GKSessionModeClient GKSessionMode = 1
	GKSessionModePeer   GKSessionMode = 2
)

func (GKSessionMode) String

func (e GKSessionMode) String() string

type GKTransportType

type GKTransportType int64
const (
	GKTransportTypeUnreliable GKTransportType = 0
	GKTransportTypeReliable   GKTransportType = 1
)

func (GKTransportType) String

func (e GKTransportType) String() string

type GKTurnBasedEventHandler

type GKTurnBasedEventHandler struct {
	foundation.NSObject
}

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

func GKTurnBasedEventHandlerFromID

func GKTurnBasedEventHandlerFromID(id objc.ID) *GKTurnBasedEventHandler

func GKTurnBasedEventHandlerSharedTurnBasedEventHandler deprecated

func GKTurnBasedEventHandlerSharedTurnBasedEventHandler() *GKTurnBasedEventHandler

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
}

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))

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))

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
}

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
const (
	GKTurnBasedExchangeStatusUnknown  GKTurnBasedExchangeStatus = 0
	GKTurnBasedExchangeStatusActive   GKTurnBasedExchangeStatus = 1
	GKTurnBasedExchangeStatusComplete GKTurnBasedExchangeStatus = 2
	GKTurnBasedExchangeStatusResolved GKTurnBasedExchangeStatus = 3
	GKTurnBasedExchangeStatusCanceled GKTurnBasedExchangeStatus = 4
)

func (GKTurnBasedExchangeStatus) String

func (e GKTurnBasedExchangeStatus) String() string

type GKTurnBasedMatch

type GKTurnBasedMatch struct {
	foundation.NSObject
}

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))

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))

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataCompletionHandler

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

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievementsCompletionHandler

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

func (*GKTurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievementsCompletionHandler deprecated

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

Deprecated: since macOS 11.0.

func (*GKTurnBasedMatch) EndTurnWithNextParticipantMatchDataCompletionHandler deprecated

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

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))

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))

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 deprecated

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

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))

func (*GKTurnBasedMatch) ParticipantQuitOutOfTurnWithOutcomeWithCompletionHandler

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

func (*GKTurnBasedMatch) Participants

func (*GKTurnBasedMatch) RematchWithCompletionHandler

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

func (*GKTurnBasedMatch) RemoveWithCompletionHandler

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

func (*GKTurnBasedMatch) SaveCurrentTurnWithMatchDataCompletionHandler

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

func (*GKTurnBasedMatch) SaveMergedMatchDataWithResolvedExchangesCompletionHandler

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

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))

func (*GKTurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArgumentsCompletionHandler

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

func (*GKTurnBasedMatch) SetLocalizableMessageWithKeyArguments

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

func (*GKTurnBasedMatch) SetMessage

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

func (*GKTurnBasedMatch) Status

type GKTurnBasedMatchOutcome

type GKTurnBasedMatchOutcome int64
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
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
}

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

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
}

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
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
}

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)

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

func (*GKVoiceChat) SetPlayerMuted deprecated

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

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 deprecated

func (o *GKVoiceChat) Start()

Deprecated: No longer supported

func (*GKVoiceChat) Stop deprecated

func (o *GKVoiceChat) Stop()

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 deprecated

type GKVoiceChatPlayerState int64

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