Documentation
¶
Overview ¶
Package gamekit provides a fluent Go API over the macOS GameKit framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Errors ¶
Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.
Main-thread requirements ¶
Methods, setters, and constructors of classes Apple isolates to the main thread run there automatically; callers never need to arrange main-thread dispatch for the generated API.
Delegates ¶
A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- BasePlayer: CloudPlayer, Player
- Challenge: AchievementChallenge, ScoreChallenge
- GameCenterViewController: AchievementViewController, LeaderboardViewController
- Player: LocalPlayer
Index ¶
- Variables
- func AddEventListener(listener obj.Object)
- func CheckPendingGameActivityExistenceWithCompletionHandler(completionHandler func(bool))
- func GKErrorDomain() obj.Object
- func GKExchangeTimeoutDefault() float64
- func GKExchangeTimeoutNone() float64
- func GKGameSessionErrorDomain() obj.Object
- func GKPlayerAuthenticationDidChangeNotificationName() obj.Object
- func GKPlayerDidChangeNotificationName() obj.Object
- func GKPlayerIDNoLongerAvailable() obj.Object
- func GKSessionErrorDomain() obj.Object
- func GKTurnTimeoutDefault() float64
- func GKTurnTimeoutNone() float64
- func GKVoiceChatServiceErrorDomain() obj.Object
- func IncompleteAchievementImage() obj.Object
- func IsValidPartyCode(partyCode string) bool
- func IsVoIPAllowed() bool
- func LoadAchievementDescriptions(ctx context.Context) (result obj.Object, err error)
- func LoadAchievements(ctx context.Context) (result obj.Object, err error)
- func LoadCategoriesWithCompletionHandler(completionHandler func(obj.Object, obj.Object, unsafe.Pointer))
- func LoadChallengeDefinitions(ctx context.Context) (result obj.Object, err error)
- func LoadGameActivityDefinitions(ctx context.Context) (result obj.Object, err error)
- func LoadGameActivityDefinitionsWithIDs(ctx context.Context, activityDefinitionIDs []string) (result obj.Object, err error)
- func LoadLeaderboardSets(ctx context.Context) (result obj.Object, err error)
- func LoadLeaderboards(ctx context.Context) (result obj.Object, err error)
- func LoadLeaderboardsWithIDs(ctx context.Context, leaderboardIDs []string) (result obj.Object, err error)
- func LoadMatches(ctx context.Context) (result obj.Object, err error)
- func LoadPlayersForIdentifiers(ctx context.Context, identifiers []string) (result obj.Object, err error)
- func LoadReceivedChallenges(ctx context.Context) (result obj.Object, err error)
- func LoadSessionsInContainer(ctx context.Context, containerName string) (result obj.Object, err error)
- func MaxNumberOfRecipients() int
- func MaxPlayersAllowedForMatchOfType(matchType MatchType) int
- func PlaceholderCompletedAchievementImage() obj.Object
- func RemoveEventListener(listener obj.Object)
- func RemoveSessionWithIdentifier(ctx context.Context, identifier string) error
- func ReportAchievements(ctx context.Context, achievements []*Achievement) error
- func ReportAchievementsWithEligibleChallenges(ctx context.Context, achievements []*Achievement, challenges []*Challenge) error
- func ReportLeaderboardScoresWithEligibleChallenges(ctx context.Context, scores []*LeaderboardScore, challenges []*Challenge) error
- func ReportScores(ctx context.Context, scores []*Score) error
- func ReportScoresWithEligibleChallenges(ctx context.Context, scores []*Score, challenges []*Challenge) error
- func ResetAchievements(ctx context.Context) error
- func SetDefaultLeaderboard(ctx context.Context, leaderboardIdentifier string) error
- func ShowBannerWithTitleMessage(ctx context.Context, title string, message string) error
- func ShowBannerWithTitleMessageDuration(ctx context.Context, title string, message string, duration float64) error
- func SubmitScoreContextPlayerLeaderboardIDs(ctx context.Context, score int, context_ int, player *Player, ...) error
- func ValidPartyCodeAlphabet() []string
- type AccessPoint
- func (ap *AccessPoint) Description() string
- func (ap *AccessPoint) FrameInScreenCoordinates() corefoundation.CGRect
- func (ap *AccessPoint) IsActive() bool
- func (ap *AccessPoint) IsEqual(other obj.Object) bool
- func (ap *AccessPoint) IsKind(className string) bool
- func (ap *AccessPoint) Location() AccessPointLocation
- func (ap *AccessPoint) ParentWindow() obj.Object
- func (ap *AccessPoint) ShowHighlights() bool
- func (ap *AccessPoint) String() string
- func (ap *AccessPoint) TriggerAccessPointForArcadeWithHandler(ctx context.Context) error
- func (ap *AccessPoint) TriggerAccessPointForChallengesWithHandler(ctx context.Context) error
- func (ap *AccessPoint) TriggerAccessPointForFriendingWithHandler(ctx context.Context) error
- func (ap *AccessPoint) TriggerAccessPointForPlayTogetherWithHandler(ctx context.Context) error
- func (ap *AccessPoint) TriggerAccessPointWithAchievementIDHandler(ctx context.Context, achievementID string) error
- func (ap *AccessPoint) TriggerAccessPointWithChallengeDefinitionIDHandler(ctx context.Context, challengeDefinitionID string) error
- func (ap *AccessPoint) TriggerAccessPointWithGameActivityDefinitionIDHandler(ctx context.Context, gameActivityDefinitionID string) error
- func (ap *AccessPoint) TriggerAccessPointWithGameActivityHandler(ctx context.Context, gameActivity *GameActivity) error
- func (ap *AccessPoint) TriggerAccessPointWithHandler(ctx context.Context) error
- func (ap *AccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler(ctx context.Context, leaderboardID string, playerScope LeaderboardPlayerScope, ...) error
- func (ap *AccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler(ctx context.Context, leaderboardSetID string) error
- func (ap *AccessPoint) TriggerAccessPointWithPlayerHandler(ctx context.Context, player *Player) error
- func (ap *AccessPoint) TriggerAccessPointWithStateHandler(ctx context.Context, state GameCenterViewControllerState) error
- func (ap *AccessPoint) WithActive(active bool) *AccessPoint
- func (ap *AccessPoint) WithLocation(location AccessPointLocation) *AccessPoint
- func (ap *AccessPoint) WithParentWindow(parentWindow obj.Object) *AccessPoint
- func (ap *AccessPoint) WithShowHighlights(showHighlights bool) *AccessPoint
- type AccessPointLocation
- type Achievement
- func (a *Achievement) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, ...) obj.Object
- func (a *Achievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, ...) obj.Object
- func (a *Achievement) Description() string
- func (a *Achievement) Identifier() string
- func (a *Achievement) IsCompleted() bool
- func (a *Achievement) IsEqual(other obj.Object) bool
- func (a *Achievement) IsHidden() bool
- func (a *Achievement) IsKind(className string) bool
- func (a *Achievement) IssueChallengeToPlayersMessage(playerIDs []string, message string)
- func (a *Achievement) LastReportedDate() time.Time
- func (a *Achievement) PercentComplete() float64
- func (a *Achievement) Player() *Player
- func (a *Achievement) PlayerID() string
- func (a *Achievement) ReportAchievement(ctx context.Context) error
- func (a *Achievement) SelectChallengeablePlayerIDs(ctx context.Context, playerIDs []string) (result obj.Object, err error)
- func (a *Achievement) SelectChallengeablePlayers(ctx context.Context, players []*Player) (result obj.Object, err error)
- func (a *Achievement) ShowsCompletionBanner() bool
- func (a *Achievement) String() string
- func (a *Achievement) WithIdentifier(identifier string) *Achievement
- func (a *Achievement) WithPercentComplete(percentComplete float64) *Achievement
- func (a *Achievement) WithShowsCompletionBanner(showsCompletionBanner bool) *Achievement
- type AchievementChallenge
- type AchievementDescription
- func (ad *AchievementDescription) AchievedDescription() string
- func (ad *AchievementDescription) ActivityIdentifier() string
- func (ad *AchievementDescription) ActivityProperties() map[string]string
- func (ad *AchievementDescription) Description() string
- func (ad *AchievementDescription) GroupIdentifier() string
- func (ad *AchievementDescription) Identifier() string
- func (ad *AchievementDescription) Image() unsafe.Pointer
- func (ad *AchievementDescription) IsEqual(other obj.Object) bool
- func (ad *AchievementDescription) IsHidden() bool
- func (ad *AchievementDescription) IsKind(className string) bool
- func (ad *AchievementDescription) IsReplayable() bool
- func (ad *AchievementDescription) LoadImage(ctx context.Context) (result obj.Object, err error)
- func (ad *AchievementDescription) MaximumPoints() int
- func (ad *AchievementDescription) RarityPercent() *foundation.Number
- func (ad *AchievementDescription) ReleaseState() ReleaseState
- func (ad *AchievementDescription) String() string
- func (ad *AchievementDescription) Title() string
- func (ad *AchievementDescription) UnachievedDescription() string
- type AchievementViewController
- func (avc *AchievementViewController) WithAchievementDelegate(achievementDelegate AchievementViewControllerDelegate) *AchievementViewController
- func (avc *AchievementViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *AchievementViewController
- func (avc *AchievementViewController) WithLeaderboardCategory(leaderboardCategory string) *AchievementViewController
- func (avc *AchievementViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *AchievementViewController
- func (avc *AchievementViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *AchievementViewController
- func (avc *AchievementViewController) WithViewState(viewState GameCenterViewControllerState) *AchievementViewController
- type AchievementViewControllerDelegate
- type BasePlayer
- type BasePlayerProvider
- type CGLCPContextPriorityRequest
- type Challenge
- func (c *Challenge) CompletionDate() time.Time
- func (c *Challenge) Decline()
- func (c *Challenge) Description() string
- func (c *Challenge) IsEqual(other obj.Object) bool
- func (c *Challenge) IsKind(className string) bool
- func (c *Challenge) IssueDate() time.Time
- func (c *Challenge) IssuingPlayer() *Player
- func (c *Challenge) IssuingPlayerID() string
- func (c *Challenge) Message() string
- func (c *Challenge) ReceivingPlayer() *Player
- func (c *Challenge) ReceivingPlayerID() string
- func (c *Challenge) State() ChallengeState
- func (c *Challenge) String() string
- type ChallengeDefinition
- func (cd *ChallengeDefinition) Description() string
- func (cd *ChallengeDefinition) Details() string
- func (cd *ChallengeDefinition) DurationOptions() []obj.Object
- func (cd *ChallengeDefinition) GroupIdentifier() string
- func (cd *ChallengeDefinition) HasActiveChallengesWithCompletionHandler(completionHandler func(bool, unsafe.Pointer))
- func (cd *ChallengeDefinition) Identifier() string
- func (cd *ChallengeDefinition) IsEqual(other obj.Object) bool
- func (cd *ChallengeDefinition) IsKind(className string) bool
- func (cd *ChallengeDefinition) IsRepeatable() bool
- func (cd *ChallengeDefinition) Leaderboard() *Leaderboard
- func (cd *ChallengeDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
- func (cd *ChallengeDefinition) ReleaseState() ReleaseState
- func (cd *ChallengeDefinition) String() string
- func (cd *ChallengeDefinition) Title() string
- type ChallengeEventHandler
- func (ceh *ChallengeEventHandler) Description() string
- func (ceh *ChallengeEventHandler) IsEqual(other obj.Object) bool
- func (ceh *ChallengeEventHandler) IsKind(className string) bool
- func (ceh *ChallengeEventHandler) String() string
- func (ceh *ChallengeEventHandler) WithDelegate(delegate ChallengeEventHandlerDelegate) *ChallengeEventHandler
- type ChallengeEventHandlerDelegate
- type ChallengeEventHandlerDelegateLocalPlayerDidCompleteChallengeHandler
- type ChallengeEventHandlerDelegateLocalPlayerDidReceiveChallengeHandler
- type ChallengeEventHandlerDelegateLocalPlayerDidSelectChallengeHandler
- type ChallengeEventHandlerDelegateRemotePlayerDidCompleteChallengeHandler
- type ChallengeEventHandlerDelegateShouldShowBannerForLocallyCompletedChallengeHandler
- type ChallengeEventHandlerDelegateShouldShowBannerForLocallyReceivedChallengeHandler
- type ChallengeEventHandlerDelegateShouldShowBannerForRemotelyCompletedChallengeHandler
- type ChallengeListener
- type ChallengeProvider
- type ChallengeStatedeprecated
- type ChallengesViewController
- func (cvc *ChallengesViewController) Description() string
- func (cvc *ChallengesViewController) IsEqual(other obj.Object) bool
- func (cvc *ChallengesViewController) IsKind(className string) bool
- func (cvc *ChallengesViewController) String() string
- func (cvc *ChallengesViewController) WithChallengeDelegate(challengeDelegate ChallengesViewControllerDelegate) *ChallengesViewController
- type ChallengesViewControllerDelegate
- type Clockid
- type CloudPlayer
- type ConnectionState
- type DialogController
- func (dc *DialogController) Description() string
- func (dc *DialogController) Dismiss(sender obj.Object)
- func (dc *DialogController) IsEqual(other obj.Object) bool
- func (dc *DialogController) IsKind(className string) bool
- func (dc *DialogController) ParentWindow() obj.Object
- func (dc *DialogController) PresentViewController(viewController obj.Object) bool
- func (dc *DialogController) String() string
- func (dc *DialogController) WithParentWindow(parentWindow obj.Object) *DialogController
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type EntryID
- type ErrorCode
- type EvCmd
- type EvsioEVSIOCCSIndices
- type EvsioEVSIOSCSIndices
- type FilesecProperty
- type Flag
- type FriendRequestComposeViewController
- func (frcvc *FriendRequestComposeViewController) AddRecipientPlayers(players []*Player)
- func (frcvc *FriendRequestComposeViewController) AddRecipientsWithEmailAddresses(emailAddresses []string)
- func (frcvc *FriendRequestComposeViewController) AddRecipientsWithPlayerIDs(playerIDs []string)
- func (frcvc *FriendRequestComposeViewController) Description() string
- func (frcvc *FriendRequestComposeViewController) IsEqual(other obj.Object) bool
- func (frcvc *FriendRequestComposeViewController) IsKind(className string) bool
- func (frcvc *FriendRequestComposeViewController) SetMessage(message string)
- func (frcvc *FriendRequestComposeViewController) String() string
- func (frcvc *FriendRequestComposeViewController) WithComposeViewDelegate(composeViewDelegate FriendRequestComposeViewControllerDelegate) *FriendRequestComposeViewController
- type FriendRequestComposeViewControllerDelegate
- type FriendsAuthorizationStatus
- type GameActivity
- func GameActivityFromID(id objc.ID) *GameActivity
- func NewGameActivityWithDefinition(activityDefinition *GameActivityDefinition) *GameActivity
- func StartWithDefinition(activityDefinition *GameActivityDefinition) (result *GameActivity, err error)
- func StartWithDefinitionPartyCode(activityDefinition *GameActivityDefinition, partyCode string) (result *GameActivity, err error)
- func (ga *GameActivity) Achievements() []*Achievement
- func (ga *GameActivity) ActivityDefinition() *GameActivityDefinition
- func (ga *GameActivity) CreationDate() time.Time
- func (ga *GameActivity) Description() string
- func (ga *GameActivity) Duration() float64
- func (ga *GameActivity) End()
- func (ga *GameActivity) EndDate() time.Time
- func (ga *GameActivity) FindMatch(ctx context.Context) (result *Match, err error)
- func (ga *GameActivity) FindPlayersForHostedMatch(ctx context.Context) (result obj.Object, err error)
- func (ga *GameActivity) GetProgressOnAchievement(achievement *Achievement) float64
- func (ga *GameActivity) GetScoreOnLeaderboard(leaderboard *Leaderboard) *LeaderboardScore
- func (ga *GameActivity) Identifier() string
- func (ga *GameActivity) IsEqual(other obj.Object) bool
- func (ga *GameActivity) IsKind(className string) bool
- func (ga *GameActivity) LastResumeDate() time.Time
- func (ga *GameActivity) LeaderboardScores() []*LeaderboardScore
- func (ga *GameActivity) MakeMatchRequest() *MatchRequest
- func (ga *GameActivity) PartyCode() string
- func (ga *GameActivity) PartyURL() string
- func (ga *GameActivity) Pause()
- func (ga *GameActivity) Properties() map[string]string
- func (ga *GameActivity) RemoveAchievements(achievements []*Achievement)
- func (ga *GameActivity) RemoveScoresFromLeaderboards(leaderboards []*Leaderboard)
- func (ga *GameActivity) Resume()
- func (ga *GameActivity) SetAchievementCompleted(achievement *Achievement)
- func (ga *GameActivity) SetProgressOnAchievementToPercentComplete(achievement *Achievement, percentComplete float64)
- func (ga *GameActivity) SetScoreOnLeaderboardToScore(leaderboard *Leaderboard, score int)
- func (ga *GameActivity) SetScoreOnLeaderboardToScoreContext(leaderboard *Leaderboard, score int, context_ int)
- func (ga *GameActivity) Start()
- func (ga *GameActivity) StartDate() time.Time
- func (ga *GameActivity) State() GameActivityState
- func (ga *GameActivity) String() string
- func (ga *GameActivity) WithProperties(properties map[string]string) *GameActivity
- type GameActivityDefinition
- func (gad *GameActivityDefinition) DefaultProperties() map[string]string
- func (gad *GameActivityDefinition) Description() string
- func (gad *GameActivityDefinition) Details() string
- func (gad *GameActivityDefinition) FallbackURL() string
- func (gad *GameActivityDefinition) GroupIdentifier() string
- func (gad *GameActivityDefinition) Identifier() string
- func (gad *GameActivityDefinition) IsEqual(other obj.Object) bool
- func (gad *GameActivityDefinition) IsKind(className string) bool
- func (gad *GameActivityDefinition) LoadAchievementDescriptions(ctx context.Context) (result obj.Object, err error)
- func (gad *GameActivityDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
- func (gad *GameActivityDefinition) LoadLeaderboards(ctx context.Context) (result obj.Object, err error)
- func (gad *GameActivityDefinition) MaxPlayers() *foundation.Number
- func (gad *GameActivityDefinition) MinPlayers() *foundation.Number
- func (gad *GameActivityDefinition) PlayStyle() GameActivityPlayStyle
- func (gad *GameActivityDefinition) ReleaseState() ReleaseState
- func (gad *GameActivityDefinition) String() string
- func (gad *GameActivityDefinition) SupportsPartyCode() bool
- func (gad *GameActivityDefinition) SupportsUnlimitedPlayers() bool
- func (gad *GameActivityDefinition) Title() string
- type GameActivityListener
- type GameActivityPlayStyle
- type GameActivityState
- type GameCenterControllerDelegate
- type GameCenterViewController
- func GameCenterViewControllerFromID(id objc.ID) *GameCenterViewController
- func NewGameCenterViewControllerWithAchievementID(achievementID string) *GameCenterViewController
- func NewGameCenterViewControllerWithLeaderboardIDPlayerScopeTimeScope(leaderboardID string, playerScope LeaderboardPlayerScope, ...) *GameCenterViewController
- func NewGameCenterViewControllerWithLeaderboardPlayerScope(leaderboard *Leaderboard, playerScope LeaderboardPlayerScope) *GameCenterViewController
- func NewGameCenterViewControllerWithLeaderboardSetID(leaderboardSetID string) *GameCenterViewController
- func NewGameCenterViewControllerWithPlayer(player *Player) *GameCenterViewController
- func NewGameCenterViewControllerWithState(state GameCenterViewControllerState) *GameCenterViewController
- func (gcvc *GameCenterViewController) Description() string
- func (gcvc *GameCenterViewController) IsEqual(other obj.Object) bool
- func (gcvc *GameCenterViewController) IsKind(className string) bool
- func (gcvc *GameCenterViewController) LeaderboardCategory() string
- func (gcvc *GameCenterViewController) LeaderboardIdentifier() string
- func (gcvc *GameCenterViewController) LeaderboardTimeScope() LeaderboardTimeScope
- func (gcvc *GameCenterViewController) String() string
- func (gcvc *GameCenterViewController) ViewState() GameCenterViewControllerState
- func (gcvc *GameCenterViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *GameCenterViewController
- func (gcvc *GameCenterViewController) WithLeaderboardCategory(leaderboardCategory string) *GameCenterViewController
- func (gcvc *GameCenterViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *GameCenterViewController
- func (gcvc *GameCenterViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *GameCenterViewController
- func (gcvc *GameCenterViewController) WithViewState(viewState GameCenterViewControllerState) *GameCenterViewController
- type GameCenterViewControllerProvider
- type GameCenterViewControllerState
- type GameSession
- func CreateSessionInContainerWithTitleMaxConnectedPlayers(ctx context.Context, containerName string, title string, maxPlayers int) (result *GameSession, err error)
- func GameSessionFromID(id objc.ID) *GameSession
- func LoadSessionWithIdentifier(ctx context.Context, identifier string) (result *GameSession, err error)
- func NewGameSession() *GameSession
- func (gs *GameSession) BadgedPlayers() []*CloudPlayer
- func (gs *GameSession) ClearBadgeForPlayers(ctx context.Context, players []*CloudPlayer) error
- func (gs *GameSession) Description() string
- func (gs *GameSession) GetShareURL(ctx context.Context) (result obj.Object, err error)
- func (gs *GameSession) Identifier() string
- func (gs *GameSession) IsEqual(other obj.Object) bool
- func (gs *GameSession) IsKind(className string) bool
- func (gs *GameSession) LastModifiedDate() time.Time
- func (gs *GameSession) LastModifiedPlayer() *CloudPlayer
- func (gs *GameSession) LoadData(ctx context.Context) (result obj.Object, err error)
- func (gs *GameSession) MaxNumberOfConnectedPlayers() int
- func (gs *GameSession) Owner() *CloudPlayer
- func (gs *GameSession) Players() []*CloudPlayer
- func (gs *GameSession) PlayersWithConnectionState(state ConnectionState) []*CloudPlayer
- func (gs *GameSession) SaveData(ctx context.Context, data []byte) (result obj.Object, err error)
- func (gs *GameSession) SendDataWithTransportType(ctx context.Context, data []byte, transport TransportType) error
- func (gs *GameSession) SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayers(ctx context.Context, key string, arguments []string, data []byte, ...) error
- func (gs *GameSession) SetConnectionState(ctx context.Context, state ConnectionState) error
- func (gs *GameSession) String() string
- func (gs *GameSession) Title() string
- type GameSessionErrorCodedeprecated
- type GameSessionEventListener
- type HIDReportCommandType
- type IOHIDButtonModes
- type IOHIDElementCommitDirection
- type Idtype
- type Invite
- func (i *Invite) Description() string
- func (i *Invite) Inviter() string
- func (i *Invite) IsEqual(other obj.Object) bool
- func (i *Invite) IsHosted() bool
- func (i *Invite) IsKind(className string) bool
- func (i *Invite) PlayerAttributes() uint32
- func (i *Invite) PlayerGroup() int
- func (i *Invite) Sender() *Player
- func (i *Invite) String() string
- type InviteEventListener
- type InviteRecipientResponse
- type IpcInfoObjectType
- type LaunchDataType
- type Leaderboard
- func (l *Leaderboard) ActivityIdentifier() string
- func (l *Leaderboard) ActivityProperties() map[string]string
- func (l *Leaderboard) BaseLeaderboardID() string
- func (l *Leaderboard) Category() string
- func (l *Leaderboard) Description() string
- func (l *Leaderboard) Duration() float64
- func (l *Leaderboard) GroupIdentifier() string
- func (l *Leaderboard) Identifier() string
- func (l *Leaderboard) IsEqual(other obj.Object) bool
- func (l *Leaderboard) IsHidden() bool
- func (l *Leaderboard) IsKind(className string) bool
- func (l *Leaderboard) IsLoading() bool
- func (l *Leaderboard) LeaderboardDescription() string
- func (l *Leaderboard) LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(playerScope LeaderboardPlayerScope, timeScope LeaderboardTimeScope, ...)
- func (l *Leaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler(players []*Player, timeScope LeaderboardTimeScope, ...)
- func (l *Leaderboard) LoadImage(ctx context.Context) (result obj.Object, err error)
- func (l *Leaderboard) LoadPreviousOccurrenceWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
- func (l *Leaderboard) LoadScores(ctx context.Context) (result obj.Object, err error)
- func (l *Leaderboard) LocalPlayerScore() *Score
- func (l *Leaderboard) MaxRange() int
- func (l *Leaderboard) NextStartDate() time.Time
- func (l *Leaderboard) PlayerScope() LeaderboardPlayerScope
- func (l *Leaderboard) Range() foundation.NSRange
- func (l *Leaderboard) ReleaseState() ReleaseState
- func (l *Leaderboard) Scores() []*Score
- func (l *Leaderboard) StartDate() time.Time
- func (l *Leaderboard) String() string
- func (l *Leaderboard) SubmitScoreContextPlayer(ctx context.Context, score int, context_ int, player *Player) error
- func (l *Leaderboard) TimeScope() LeaderboardTimeScope
- func (l *Leaderboard) Title() string
- func (l *Leaderboard) Type() LeaderboardType
- func (l *Leaderboard) WithCategory(category string) *Leaderboard
- func (l *Leaderboard) WithIdentifier(identifier string) *Leaderboard
- func (l *Leaderboard) WithPlayerScope(playerScope LeaderboardPlayerScope) *Leaderboard
- func (l *Leaderboard) WithRange(range_ foundation.NSRange) *Leaderboard
- func (l *Leaderboard) WithTimeScope(timeScope LeaderboardTimeScope) *Leaderboard
- type LeaderboardEntry
- func (le *LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, ...) obj.Object
- func (le *LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, ...) obj.Object
- func (le *LeaderboardEntry) Context() int
- func (le *LeaderboardEntry) Date() time.Time
- func (le *LeaderboardEntry) Description() string
- func (le *LeaderboardEntry) FormattedScore() string
- func (le *LeaderboardEntry) IsEqual(other obj.Object) bool
- func (le *LeaderboardEntry) IsKind(className string) bool
- func (le *LeaderboardEntry) Player() *Player
- func (le *LeaderboardEntry) Rank() int
- func (le *LeaderboardEntry) Score() int
- func (le *LeaderboardEntry) String() string
- type LeaderboardPlayerScope
- type LeaderboardScore
- func (ls *LeaderboardScore) Context() int
- func (ls *LeaderboardScore) Description() string
- func (ls *LeaderboardScore) IsEqual(other obj.Object) bool
- func (ls *LeaderboardScore) IsKind(className string) bool
- func (ls *LeaderboardScore) LeaderboardID() string
- func (ls *LeaderboardScore) Player() *Player
- func (ls *LeaderboardScore) String() string
- func (ls *LeaderboardScore) Value() int
- func (ls *LeaderboardScore) WithContext(context_ int) *LeaderboardScore
- func (ls *LeaderboardScore) WithLeaderboardID(leaderboardID string) *LeaderboardScore
- func (ls *LeaderboardScore) WithPlayer(player PlayerProvider) *LeaderboardScore
- func (ls *LeaderboardScore) WithValue(value int) *LeaderboardScore
- type LeaderboardSet
- func (ls *LeaderboardSet) Description() string
- func (ls *LeaderboardSet) GroupIdentifier() string
- func (ls *LeaderboardSet) Identifier() string
- func (ls *LeaderboardSet) IsEqual(other obj.Object) bool
- func (ls *LeaderboardSet) IsKind(className string) bool
- func (ls *LeaderboardSet) LoadImage(ctx context.Context) (result obj.Object, err error)
- func (ls *LeaderboardSet) LoadLeaderboards(ctx context.Context) (result obj.Object, err error)
- func (ls *LeaderboardSet) LoadLeaderboardsWithHandler(ctx context.Context) (result obj.Object, err error)
- func (ls *LeaderboardSet) String() string
- func (ls *LeaderboardSet) Title() string
- func (ls *LeaderboardSet) WithIdentifier(identifier string) *LeaderboardSet
- type LeaderboardTimeScope
- type LeaderboardType
- type LeaderboardViewController
- func (lvc *LeaderboardViewController) Category() string
- func (lvc *LeaderboardViewController) TimeScope() LeaderboardTimeScope
- func (lvc *LeaderboardViewController) WithCategory(category string) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithLeaderboardCategory(leaderboardCategory string) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithLeaderboardDelegate(leaderboardDelegate LeaderboardViewControllerDelegate) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithTimeScope(timeScope LeaderboardTimeScope) *LeaderboardViewController
- func (lvc *LeaderboardViewController) WithViewState(viewState GameCenterViewControllerState) *LeaderboardViewController
- type LeaderboardViewControllerDelegate
- type LocalPlayer
- func (lp *LocalPlayer) Authenticate(ctx context.Context) error
- func (lp *LocalPlayer) DeleteSavedGamesWithName(ctx context.Context, name string) error
- func (lp *LocalPlayer) FetchItemsForIdentityVerificationSignature(...)
- func (lp *LocalPlayer) FetchSavedGames(ctx context.Context) (result obj.Object, err error)
- func (lp *LocalPlayer) Friends() []string
- func (lp *LocalPlayer) GenerateIdentityVerificationSignatureWithCompletionHandler(...)
- func (lp *LocalPlayer) IsAuthenticated() bool
- func (lp *LocalPlayer) IsMultiplayerGamingRestricted() bool
- func (lp *LocalPlayer) IsPersonalizedCommunicationRestricted() bool
- func (lp *LocalPlayer) IsPresentingFriendRequestViewController() bool
- func (lp *LocalPlayer) IsUnderage() bool
- func (lp *LocalPlayer) LoadChallengableFriends(ctx context.Context) (result obj.Object, err error)
- func (lp *LocalPlayer) LoadDefaultLeaderboardCategoryID(ctx context.Context) (result string, err error)
- func (lp *LocalPlayer) LoadDefaultLeaderboardIdentifier(ctx context.Context) (result string, err error)
- func (lp *LocalPlayer) LoadFriendPlayers(ctx context.Context) (result obj.Object, err error)
- func (lp *LocalPlayer) LoadFriends(ctx context.Context) (result obj.Object, err error)
- func (lp *LocalPlayer) LoadFriendsAuthorizationStatus(completionHandler func(FriendsAuthorizationStatus, unsafe.Pointer))
- func (lp *LocalPlayer) LoadFriendsWithIdentifiers(ctx context.Context, identifiers []string) (result obj.Object, err error)
- func (lp *LocalPlayer) LoadRecentPlayers(ctx context.Context) (result obj.Object, err error)
- func (lp *LocalPlayer) PresentFriendRequestCreatorFromWindow(window obj.Object) error
- func (lp *LocalPlayer) ResolveConflictingSavedGamesWithData(ctx context.Context, conflictingSavedGames []*SavedGame, data []byte) (result obj.Object, err error)
- func (lp *LocalPlayer) SaveGameDataWithName(ctx context.Context, data []byte, name string) (result *SavedGame, err error)
- func (lp *LocalPlayer) SetDefaultLeaderboardCategoryID(ctx context.Context, categoryID string) error
- func (lp *LocalPlayer) SetDefaultLeaderboardIdentifier(ctx context.Context, leaderboardIdentifier string) error
- func (lp *LocalPlayer) UnregisterAllListeners()
- func (lp *LocalPlayer) WithAuthenticateHandler(authenticateHandler func(obj.Object, unsafe.Pointer)) *LocalPlayer
- type LocalPlayerListener
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type Match
- func (m *Match) ChooseBestHostPlayer(ctx context.Context) (result string, err error)
- func (m *Match) ChooseBestHostingPlayer(ctx context.Context) (result *Player, err error)
- func (m *Match) Description() string
- func (m *Match) Disconnect()
- func (m *Match) ExpectedPlayerCount() int
- func (m *Match) IsEqual(other obj.Object) bool
- func (m *Match) IsKind(className string) bool
- func (m *Match) PlayerIDs() []string
- func (m *Match) PlayerProperties() obj.Object
- func (m *Match) Players() []*Player
- func (m *Match) Properties() unsafe.Pointer
- func (m *Match) Rematch(ctx context.Context) (result *Match, err error)
- func (m *Match) SendDataToAllPlayersWithDataMode(data []byte, mode MatchSendDataMode) error
- func (m *Match) SendDataToPlayersDataMode(data []byte, players []*Player, mode MatchSendDataMode) error
- func (m *Match) SendDataToPlayersWithDataMode(data []byte, playerIDs []string, mode MatchSendDataMode) error
- func (m *Match) String() string
- func (m *Match) VoiceChatWithName(name string) *VoiceChat
- func (m *Match) WithDelegate(delegate MatchDelegate) *Match
- type MatchDelegate
- type MatchDelegateMatchDidFailWithErrorHandler
- type MatchDelegateMatchDidReceiveDataForRecipientFromRemotePlayerHandler
- type MatchDelegateMatchDidReceiveDataFromPlayerHandler
- type MatchDelegateMatchDidReceiveDataFromRemotePlayerHandler
- type MatchDelegateMatchPlayerDidChangeConnectionStateHandler
- type MatchDelegateMatchPlayerDidChangeStateHandler
- type MatchDelegateMatchShouldReinviteDisconnectedPlayerHandler
- type MatchDelegateMatchShouldReinvitePlayerHandler
- type MatchRequest
- func (mr *MatchRequest) DefaultNumberOfPlayers() int
- func (mr *MatchRequest) Description() string
- func (mr *MatchRequest) InviteMessage() string
- func (mr *MatchRequest) IsEqual(other obj.Object) bool
- func (mr *MatchRequest) IsKind(className string) bool
- func (mr *MatchRequest) MaxPlayers() int
- func (mr *MatchRequest) MinPlayers() int
- func (mr *MatchRequest) PlayerAttributes() uint32
- func (mr *MatchRequest) PlayerGroup() int
- func (mr *MatchRequest) PlayersToInvite() []string
- func (mr *MatchRequest) Properties() unsafe.Pointer
- func (mr *MatchRequest) QueueName() string
- func (mr *MatchRequest) RecipientProperties() obj.Object
- func (mr *MatchRequest) Recipients() []*Player
- func (mr *MatchRequest) RestrictToAutomatch() bool
- func (mr *MatchRequest) String() string
- func (mr *MatchRequest) WithDefaultNumberOfPlayers(defaultNumberOfPlayers int) *MatchRequest
- func (mr *MatchRequest) WithInviteMessage(inviteMessage string) *MatchRequest
- func (mr *MatchRequest) WithInviteeResponseHandler(inviteeResponseHandler func(obj.Object, InviteRecipientResponse)) *MatchRequest
- func (mr *MatchRequest) WithMaxPlayers(maxPlayers int) *MatchRequest
- func (mr *MatchRequest) WithMinPlayers(minPlayers int) *MatchRequest
- func (mr *MatchRequest) WithPlayerAttributes(playerAttributes uint32) *MatchRequest
- func (mr *MatchRequest) WithPlayerGroup(playerGroup int) *MatchRequest
- func (mr *MatchRequest) WithPlayersToInvite(items ...obj.Object) *MatchRequest
- func (mr *MatchRequest) WithProperties(properties unsafe.Pointer) *MatchRequest
- func (mr *MatchRequest) WithQueueName(queueName string) *MatchRequest
- func (mr *MatchRequest) WithRecipientProperties(recipientProperties obj.Object) *MatchRequest
- func (mr *MatchRequest) WithRecipientResponseHandler(recipientResponseHandler func(obj.Object, InviteRecipientResponse)) *MatchRequest
- func (mr *MatchRequest) WithRecipients(items ...PlayerProvider) *MatchRequest
- func (mr *MatchRequest) WithRestrictToAutomatch(restrictToAutomatch bool) *MatchRequest
- type MatchSendDataMode
- type MatchType
- type MatchedPlayers
- func (mp *MatchedPlayers) Description() string
- func (mp *MatchedPlayers) IsEqual(other obj.Object) bool
- func (mp *MatchedPlayers) IsKind(className string) bool
- func (mp *MatchedPlayers) PlayerProperties() obj.Object
- func (mp *MatchedPlayers) Players() []*Player
- func (mp *MatchedPlayers) Properties() unsafe.Pointer
- func (mp *MatchedPlayers) String() string
- type Matchmaker
- func (m *Matchmaker) AddPlayersToMatchMatchRequest(ctx context.Context, match *Match, matchRequest *MatchRequest) error
- func (m *Matchmaker) Cancel()
- func (m *Matchmaker) CancelInviteToPlayer(playerID string)
- func (m *Matchmaker) CancelPendingInviteToPlayer(player *Player)
- func (m *Matchmaker) Description() string
- func (m *Matchmaker) FindMatchForRequest(ctx context.Context, request *MatchRequest) (result *Match, err error)
- func (m *Matchmaker) FindMatchedPlayers(ctx context.Context, request *MatchRequest) (result *MatchedPlayers, err error)
- func (m *Matchmaker) FindPlayersForHostedMatchRequest(ctx context.Context, request *MatchRequest) (result obj.Object, err error)
- func (m *Matchmaker) FindPlayersForHostedRequest(ctx context.Context, request *MatchRequest) (result obj.Object, err error)
- func (m *Matchmaker) FinishMatchmakingForMatch(match *Match)
- func (m *Matchmaker) IsEqual(other obj.Object) bool
- func (m *Matchmaker) IsKind(className string) bool
- func (m *Matchmaker) MatchForInvite(ctx context.Context, invite *Invite) (result *Match, err error)
- func (m *Matchmaker) QueryActivityWithCompletionHandler(completionHandler func(int, unsafe.Pointer))
- func (m *Matchmaker) QueryPlayerGroupActivityWithCompletionHandler(playerGroup int, completionHandler func(int, unsafe.Pointer))
- func (m *Matchmaker) QueryQueueActivityWithCompletionHandler(queueName string, completionHandler func(int, unsafe.Pointer))
- func (m *Matchmaker) StartBrowsingForNearbyPlayersWithHandler(reachableHandler func(obj.Object, bool))
- func (m *Matchmaker) StartBrowsingForNearbyPlayersWithReachableHandler(reachableHandler func(obj.Object, bool))
- func (m *Matchmaker) StartGroupActivityWithPlayerHandler(ctx context.Context) (result *Player, err error)
- func (m *Matchmaker) StopBrowsingForNearbyPlayers()
- func (m *Matchmaker) StopGroupActivity()
- func (m *Matchmaker) String() string
- func (m *Matchmaker) WithInviteHandler(inviteHandler func(obj.Object, obj.Object)) *Matchmaker
- type MatchmakerViewController
- func (mvc *MatchmakerViewController) AddPlayersToMatch(match *Match)
- func (mvc *MatchmakerViewController) CanStartWithMinimumPlayers() bool
- func (mvc *MatchmakerViewController) DefaultInvitationMessage() string
- func (mvc *MatchmakerViewController) Description() string
- func (mvc *MatchmakerViewController) IsEqual(other obj.Object) bool
- func (mvc *MatchmakerViewController) IsHosted() bool
- func (mvc *MatchmakerViewController) IsKind(className string) bool
- func (mvc *MatchmakerViewController) MatchRequest() *MatchRequest
- func (mvc *MatchmakerViewController) MatchmakingMode() MatchmakingMode
- func (mvc *MatchmakerViewController) SetHostedPlayerConnected(playerID string, connected bool)
- func (mvc *MatchmakerViewController) SetHostedPlayerDidConnect(player *Player, connected bool)
- func (mvc *MatchmakerViewController) String() string
- func (mvc *MatchmakerViewController) WithCanStartWithMinimumPlayers(canStartWithMinimumPlayers bool) *MatchmakerViewController
- func (mvc *MatchmakerViewController) WithDefaultInvitationMessage(defaultInvitationMessage string) *MatchmakerViewController
- func (mvc *MatchmakerViewController) WithHosted(hosted bool) *MatchmakerViewController
- func (mvc *MatchmakerViewController) WithMatchmakerDelegate(matchmakerDelegate MatchmakerViewControllerDelegate) *MatchmakerViewController
- func (mvc *MatchmakerViewController) WithMatchmakingMode(matchmakingMode MatchmakingMode) *MatchmakerViewController
- type MatchmakerViewControllerDelegate
- type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindHostedPlayersHandler
- type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindMatchHandler
- type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindPlayersHandler
- type MatchmakerViewControllerDelegateMatchmakerViewControllerDidReceiveAcceptFromHostedPlayerHandler
- type MatchmakerViewControllerDelegateMatchmakerViewControllerHostedPlayerDidAcceptHandler
- type MatchmakingMode
- type MpoFlags
- type NXMouseButton
- type NotificationBanner
- type OSClockid
- type OSUnfairLockFlags
- type PMPageToPaperMappingType
- type PeerConnectionStatedeprecated
- type Perm
- type PhotoSize
- type Player
- func (p *Player) Alias() string
- func (p *Player) GamePlayerID() string
- func (p *Player) GuestIdentifier() string
- func (p *Player) IsFriend() bool
- func (p *Player) IsInvitable() bool
- func (p *Player) LoadPhotoForSize(ctx context.Context, size PhotoSize) (result obj.Object, err error)
- func (p *Player) ScopedIDsArePersistent() bool
- func (p *Player) TeamPlayerID() string
- type PlayerConnectionState
- type PlayerProvider
- type PtrauthKey
- type QosClass
- type ReleaseState
- type SavedGame
- func (sg *SavedGame) Description() string
- func (sg *SavedGame) DeviceName() string
- func (sg *SavedGame) IsEqual(other obj.Object) bool
- func (sg *SavedGame) IsKind(className string) bool
- func (sg *SavedGame) LoadData(ctx context.Context) (result obj.Object, err error)
- func (sg *SavedGame) ModificationDate() time.Time
- func (sg *SavedGame) Name() string
- func (sg *SavedGame) String() string
- type SavedGameListener
- type Score
- func NewScoreWithCategory(category string) *Score
- func NewScoreWithLeaderboardIdentifier(identifier string) *Score
- func NewScoreWithLeaderboardIdentifierForPlayer(identifier string, playerID string) *Score
- func NewScoreWithLeaderboardIdentifierPlayer(identifier string, player *Player) *Score
- func ScoreFromID(id objc.ID) *Score
- func (s *Score) Category() string
- func (s *Score) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, ...) obj.Object
- func (s *Score) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, ...) obj.Object
- func (s *Score) Context() uint64
- func (s *Score) Date() time.Time
- func (s *Score) Description() string
- func (s *Score) FormattedValue() string
- func (s *Score) IsEqual(other obj.Object) bool
- func (s *Score) IsKind(className string) bool
- func (s *Score) IssueChallengeToPlayersMessage(playerIDs []string, message string)
- func (s *Score) LeaderboardIdentifier() string
- func (s *Score) Player() *Player
- func (s *Score) PlayerID() string
- func (s *Score) Rank() int
- func (s *Score) ReportScore(ctx context.Context) error
- func (s *Score) ShouldSetDefaultLeaderboard() bool
- func (s *Score) String() string
- func (s *Score) Value() int64
- func (s *Score) WithCategory(category string) *Score
- func (s *Score) WithContext(context_ uint64) *Score
- func (s *Score) WithLeaderboardIdentifier(leaderboardIdentifier string) *Score
- func (s *Score) WithShouldSetDefaultLeaderboard(shouldSetDefaultLeaderboard bool) *Score
- func (s *Score) WithValue(value int64) *Score
- type ScoreChallenge
- type SendDataModedeprecated
- type Session
- func (s *Session) AcceptConnectionFromPeer(peerID string) error
- func (s *Session) CancelConnectToPeer(peerID string)
- func (s *Session) ConnectToPeerWithTimeout(peerID string, timeout float64)
- func (s *Session) DenyConnectionFromPeer(peerID string)
- func (s *Session) Description() string
- func (s *Session) DisconnectFromAllPeers()
- func (s *Session) DisconnectPeerFromAllPeers(peerID string)
- func (s *Session) DisconnectTimeout() float64
- func (s *Session) DisplayName() string
- func (s *Session) DisplayNameForPeer(peerID string) string
- func (s *Session) IsAvailable() bool
- func (s *Session) IsEqual(other obj.Object) bool
- func (s *Session) IsKind(className string) bool
- func (s *Session) PeerID() string
- func (s *Session) PeersWithConnectionState(state PeerConnectionState) obj.Object
- func (s *Session) SendDataToAllPeersWithDataMode(data []byte, mode SendDataMode) error
- func (s *Session) SendDataToPeersWithDataMode(data []byte, peers obj.Object, mode SendDataMode) error
- func (s *Session) SessionID() string
- func (s *Session) SessionMode() SessionMode
- func (s *Session) SetDataReceiveHandlerWithContext(handler obj.Object, context_ unsafe.Pointer)
- func (s *Session) String() string
- func (s *Session) WithAvailable(available bool) *Session
- func (s *Session) WithDelegate(delegate SessionDelegate) *Session
- func (s *Session) WithDisconnectTimeout(disconnectTimeout float64) *Session
- type SessionDelegate
- type SessionDelegateSessionConnectionWithPeerFailedWithErrorHandler
- type SessionDelegateSessionDidFailWithErrorHandler
- type SessionDelegateSessionDidReceiveConnectionRequestFromPeerHandler
- type SessionDelegateSessionPeerDidChangeStateHandler
- type SessionModedeprecated
- type Tag
- type TransportType
- type TurnBasedEventHandler
- func (tbeh *TurnBasedEventHandler) Delegate() *foundation.Object
- func (tbeh *TurnBasedEventHandler) Description() string
- func (tbeh *TurnBasedEventHandler) IsEqual(other obj.Object) bool
- func (tbeh *TurnBasedEventHandler) IsKind(className string) bool
- func (tbeh *TurnBasedEventHandler) String() string
- func (tbeh *TurnBasedEventHandler) WithDelegate(delegate obj.Object) *TurnBasedEventHandler
- type TurnBasedEventHandlerDelegate
- type TurnBasedEventHandlerDelegateHandleMatchEndedHandler
- type TurnBasedEventHandlerDelegateHandleTurnEventForMatchHandler
- type TurnBasedEventListener
- type TurnBasedExchange
- func (tbe *TurnBasedExchange) CancelWithLocalizableMessageKeyArguments(ctx context.Context, key string, arguments []string) error
- func (tbe *TurnBasedExchange) CompletionDate() time.Time
- func (tbe *TurnBasedExchange) Data() []byte
- func (tbe *TurnBasedExchange) Description() string
- func (tbe *TurnBasedExchange) ExchangeID() string
- func (tbe *TurnBasedExchange) IsEqual(other obj.Object) bool
- func (tbe *TurnBasedExchange) IsKind(className string) bool
- func (tbe *TurnBasedExchange) Message() string
- func (tbe *TurnBasedExchange) Recipients() []*TurnBasedParticipant
- func (tbe *TurnBasedExchange) Replies() []*TurnBasedExchangeReply
- func (tbe *TurnBasedExchange) ReplyWithLocalizableMessageKeyArgumentsData(ctx context.Context, key string, arguments []string, data []byte) error
- func (tbe *TurnBasedExchange) SendDate() time.Time
- func (tbe *TurnBasedExchange) Sender() *TurnBasedParticipant
- func (tbe *TurnBasedExchange) Status() TurnBasedExchangeStatus
- func (tbe *TurnBasedExchange) String() string
- func (tbe *TurnBasedExchange) TimeoutDate() time.Time
- type TurnBasedExchangeReply
- func (tber *TurnBasedExchangeReply) Data() []byte
- func (tber *TurnBasedExchangeReply) Description() string
- func (tber *TurnBasedExchangeReply) IsEqual(other obj.Object) bool
- func (tber *TurnBasedExchangeReply) IsKind(className string) bool
- func (tber *TurnBasedExchangeReply) Message() string
- func (tber *TurnBasedExchangeReply) Recipient() *TurnBasedParticipant
- func (tber *TurnBasedExchangeReply) ReplyDate() time.Time
- func (tber *TurnBasedExchangeReply) String() string
- type TurnBasedExchangeStatus
- type TurnBasedMatch
- func (tbm *TurnBasedMatch) AcceptInvite(ctx context.Context) (result *TurnBasedMatch, err error)
- func (tbm *TurnBasedMatch) ActiveExchanges() []*TurnBasedExchange
- func (tbm *TurnBasedMatch) CompletedExchanges() []*TurnBasedExchange
- func (tbm *TurnBasedMatch) CreationDate() time.Time
- func (tbm *TurnBasedMatch) CurrentParticipant() *TurnBasedParticipant
- func (tbm *TurnBasedMatch) DeclineInvite(ctx context.Context) error
- func (tbm *TurnBasedMatch) Description() string
- func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchData(ctx context.Context, matchData []byte) error
- func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievements(ctx context.Context, matchData []byte, scores []*LeaderboardScore, ...) error
- func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievements(ctx context.Context, matchData []byte, scores []*Score, ...) error
- func (tbm *TurnBasedMatch) EndTurnWithNextParticipantMatchData(ctx context.Context, nextParticipant *TurnBasedParticipant, matchData []byte) error
- func (tbm *TurnBasedMatch) EndTurnWithNextParticipantsTurnTimeoutMatchData(ctx context.Context, nextParticipants []*TurnBasedParticipant, timeout float64, ...) error
- func (tbm *TurnBasedMatch) ExchangeDataMaximumSize() int
- func (tbm *TurnBasedMatch) ExchangeMaxInitiatedExchangesPerPlayer() int
- func (tbm *TurnBasedMatch) Exchanges() []*TurnBasedExchange
- func (tbm *TurnBasedMatch) IsEqual(other obj.Object) bool
- func (tbm *TurnBasedMatch) IsKind(className string) bool
- func (tbm *TurnBasedMatch) LoadMatchDataWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
- func (tbm *TurnBasedMatch) MatchData() []byte
- func (tbm *TurnBasedMatch) MatchDataMaximumSize() int
- func (tbm *TurnBasedMatch) MatchID() string
- func (tbm *TurnBasedMatch) Message() string
- func (tbm *TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantMatchData(ctx context.Context, matchOutcome TurnBasedMatchOutcome, ...) error
- func (tbm *TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchData(ctx context.Context, matchOutcome TurnBasedMatchOutcome, ...) error
- func (tbm *TurnBasedMatch) ParticipantQuitOutOfTurnWithOutcome(ctx context.Context, matchOutcome TurnBasedMatchOutcome) error
- func (tbm *TurnBasedMatch) Participants() []*TurnBasedParticipant
- func (tbm *TurnBasedMatch) Rematch(ctx context.Context) (result *TurnBasedMatch, err error)
- func (tbm *TurnBasedMatch) Remove(ctx context.Context) error
- func (tbm *TurnBasedMatch) SaveCurrentTurnWithMatchData(ctx context.Context, matchData []byte) error
- func (tbm *TurnBasedMatch) SaveMergedMatchDataWithResolvedExchanges(ctx context.Context, matchData []byte, exchanges []*TurnBasedExchange) error
- func (tbm *TurnBasedMatch) SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeout(ctx context.Context, participants []*TurnBasedParticipant, data []byte, ...) (result *TurnBasedExchange, err error)
- func (tbm *TurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArguments(ctx context.Context, participants []*TurnBasedParticipant, key string, ...) error
- func (tbm *TurnBasedMatch) SetLocalizableMessageWithKeyArguments(key string, arguments []string)
- func (tbm *TurnBasedMatch) Status() TurnBasedMatchStatus
- func (tbm *TurnBasedMatch) String() string
- func (tbm *TurnBasedMatch) WithMessage(message string) *TurnBasedMatch
- type TurnBasedMatchOutcome
- type TurnBasedMatchStatus
- type TurnBasedMatchmakerViewController
- func (tbmvc *TurnBasedMatchmakerViewController) Description() string
- func (tbmvc *TurnBasedMatchmakerViewController) IsEqual(other obj.Object) bool
- func (tbmvc *TurnBasedMatchmakerViewController) IsKind(className string) bool
- func (tbmvc *TurnBasedMatchmakerViewController) MatchmakingMode() MatchmakingMode
- func (tbmvc *TurnBasedMatchmakerViewController) ShowExistingMatches() bool
- func (tbmvc *TurnBasedMatchmakerViewController) String() string
- func (tbmvc *TurnBasedMatchmakerViewController) WithMatchmakingMode(matchmakingMode MatchmakingMode) *TurnBasedMatchmakerViewController
- func (tbmvc *TurnBasedMatchmakerViewController) WithShowExistingMatches(showExistingMatches bool) *TurnBasedMatchmakerViewController
- func (tbmvc *TurnBasedMatchmakerViewController) WithTurnBasedMatchmakerDelegate(turnBasedMatchmakerDelegate TurnBasedMatchmakerViewControllerDelegate) *TurnBasedMatchmakerViewController
- type TurnBasedMatchmakerViewControllerDelegate
- type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerDidFindMatchHandler
- type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerPlayerQuitForMatchHandler
- type TurnBasedParticipant
- func (tbp *TurnBasedParticipant) Description() string
- func (tbp *TurnBasedParticipant) IsEqual(other obj.Object) bool
- func (tbp *TurnBasedParticipant) IsKind(className string) bool
- func (tbp *TurnBasedParticipant) LastTurnDate() time.Time
- func (tbp *TurnBasedParticipant) MatchOutcome() TurnBasedMatchOutcome
- func (tbp *TurnBasedParticipant) Player() *Player
- func (tbp *TurnBasedParticipant) PlayerID() string
- func (tbp *TurnBasedParticipant) Status() TurnBasedParticipantStatus
- func (tbp *TurnBasedParticipant) String() string
- func (tbp *TurnBasedParticipant) TimeoutDate() time.Time
- func (tbp *TurnBasedParticipant) WithMatchOutcome(matchOutcome TurnBasedMatchOutcome) *TurnBasedParticipant
- type TurnBasedParticipantStatus
- type Type
- type ViewController
- type VirtualMemoryGuardExceptionCode
- type VoiceChat
- func (vc *VoiceChat) Description() string
- func (vc *VoiceChat) IsActive() bool
- func (vc *VoiceChat) IsEqual(other obj.Object) bool
- func (vc *VoiceChat) IsKind(className string) bool
- func (vc *VoiceChat) Name() string
- func (vc *VoiceChat) PlayerIDs() []string
- func (vc *VoiceChat) Players() []*Player
- func (vc *VoiceChat) SetMuteForPlayer(isMuted bool, playerID string)
- func (vc *VoiceChat) SetPlayerMuted(player *Player, isMuted bool)
- func (vc *VoiceChat) Start()
- func (vc *VoiceChat) Stop()
- func (vc *VoiceChat) String() string
- func (vc *VoiceChat) Volume() float32
- func (vc *VoiceChat) WithActive(active bool) *VoiceChat
- func (vc *VoiceChat) WithPlayerStateUpdateHandler(playerStateUpdateHandler func(obj.Object, VoiceChatPlayerState)) *VoiceChat
- func (vc *VoiceChat) WithPlayerVoiceChatStateDidChangeHandler(playerVoiceChatStateDidChangeHandler func(obj.Object, VoiceChatPlayerState)) *VoiceChat
- func (vc *VoiceChat) WithVolume(volume float32) *VoiceChat
- type VoiceChatClient
- type VoiceChatPlayerStatedeprecated
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
var ErrAPINotAvailable = errkit.New("GKErrorDomain", 31)
ErrAPINotAvailable matches the GameKit error GKErrorAPINotAvailable.
var ErrAPIObsolete = errkit.New("GKErrorDomain", 34)
ErrAPIObsolete matches the GameKit error GKErrorAPIObsolete.
var ErrAppUnlisted = errkit.New("GKErrorDomain", 37)
ErrAppUnlisted matches the GameKit error GKErrorAppUnlisted.
var ErrAuthenticationInProgress = errkit.New("GKErrorDomain", 7)
ErrAuthenticationInProgress matches the GameKit error GKErrorAuthenticationInProgress.
var ErrBadContainer = errkit.New("GKGameSessionErrorDomain", 12)
ErrBadContainer matches the GameKit error GKGameSessionErrorBadContainer.
var ErrCancelled = errkit.New("GKErrorDomain", 2)
ErrCancelled matches the GameKit error GKErrorCancelled.
var ErrChallengeInvalid = errkit.New("GKErrorDomain", 19)
ErrChallengeInvalid matches the GameKit error GKErrorChallengeInvalid.
var ErrCloudDriveDisabled = errkit.New("GKGameSessionErrorDomain", 15)
ErrCloudDriveDisabled matches the GameKit error GKGameSessionErrorCloudDriveDisabled.
var ErrCloudQuotaExceeded = errkit.New("GKGameSessionErrorDomain", 13)
ErrCloudQuotaExceeded matches the GameKit error GKGameSessionErrorCloudQuotaExceeded.
var ErrCommunicationsFailure = errkit.New("GKErrorDomain", 3)
ErrCommunicationsFailure matches the GameKit error GKErrorCommunicationsFailure.
var ErrConnectionCancelledByUser = errkit.New("GKGameSessionErrorDomain", 5)
ErrConnectionCancelledByUser matches the GameKit error GKGameSessionErrorConnectionCancelledByUser.
var ErrConnectionFailed = errkit.New("GKGameSessionErrorDomain", 6)
ErrConnectionFailed matches the GameKit error GKGameSessionErrorConnectionFailed.
var ErrConnectionTimeout = errkit.New("GKErrorDomain", 33)
ErrConnectionTimeout matches the GameKit error GKErrorConnectionTimeout.
var ErrDebugMode = errkit.New("GKErrorDomain", 38)
ErrDebugMode matches the GameKit error GKErrorDebugMode.
var ErrFriendListDenied = errkit.New("GKErrorDomain", 102)
ErrFriendListDenied matches the GameKit error GKErrorFriendListDenied.
var ErrFriendListDescriptionMissing = errkit.New("GKErrorDomain", 100)
ErrFriendListDescriptionMissing matches the GameKit error GKErrorFriendListDescriptionMissing.
var ErrFriendListRestricted = errkit.New("GKErrorDomain", 101)
ErrFriendListRestricted matches the GameKit error GKErrorFriendListRestricted.
var ErrFriendRequestNotAvailable = errkit.New("GKErrorDomain", 103)
ErrFriendRequestNotAvailable matches the GameKit error GKErrorFriendRequestNotAvailable.
var ErrGameSessionRequestInvalid = errkit.New("GKErrorDomain", 29)
ErrGameSessionRequestInvalid matches the GameKit error GKErrorGameSessionRequestInvalid.
var ErrGameUnrecognized = errkit.New("GKErrorDomain", 15)
ErrGameUnrecognized matches the GameKit error GKErrorGameUnrecognized.
ErrICloudUnavailable matches the GameKit error GKErrorICloudUnavailable.
var ErrInvalidCredentials = errkit.New("GKErrorDomain", 5)
ErrInvalidCredentials matches the GameKit error GKErrorInvalidCredentials.
var ErrInvalidParameter = errkit.New("GKErrorDomain", 17)
ErrInvalidParameter matches the GameKit error GKErrorInvalidParameter.
var ErrInvalidPlayer = errkit.New("GKErrorDomain", 8)
ErrInvalidPlayer matches the GameKit error GKErrorInvalidPlayer.
var ErrInvalidSession = errkit.New("GKGameSessionErrorDomain", 16)
ErrInvalidSession matches the GameKit error GKGameSessionErrorInvalidSession.
var ErrInvitationsDisabled = errkit.New("GKErrorDomain", 25)
ErrInvitationsDisabled matches the GameKit error GKErrorInvitationsDisabled.
var ErrLockdownMode = errkit.New("GKErrorDomain", 36)
ErrLockdownMode matches the GameKit error GKErrorLockdownMode.
var ErrMatchNotConnected = errkit.New("GKErrorDomain", 28)
ErrMatchNotConnected matches the GameKit error GKErrorMatchNotConnected.
var ErrMatchRequestInvalid = errkit.New("GKErrorDomain", 13)
ErrMatchRequestInvalid matches the GameKit error GKErrorMatchRequestInvalid.
var ErrNetworkFailure = errkit.New("GKGameSessionErrorDomain", 14)
ErrNetworkFailure matches the GameKit error GKGameSessionErrorNetworkFailure.
var ErrNotAuthenticated = errkit.New("GKErrorDomain", 6)
ErrNotAuthenticated matches the GameKit error GKErrorNotAuthenticated.
var ErrNotAuthorized = errkit.New("GKErrorDomain", 32)
ErrNotAuthorized matches the GameKit error GKErrorNotAuthorized.
var ErrNotSupported = errkit.New("GKErrorDomain", 16)
ErrNotSupported matches the GameKit error GKErrorNotSupported.
var ErrParentalControlsBlocked = errkit.New("GKErrorDomain", 10)
ErrParentalControlsBlocked matches the GameKit error GKErrorParentalControlsBlocked.
var ErrPlayerPhotoFailure = errkit.New("GKErrorDomain", 26)
ErrPlayerPhotoFailure matches the GameKit error GKErrorPlayerPhotoFailure.
var ErrPlayerStatusExceedsMaximumLength = errkit.New("GKErrorDomain", 11)
ErrPlayerStatusExceedsMaximumLength matches the GameKit error GKErrorPlayerStatusExceedsMaximumLength.
var ErrPlayerStatusInvalid = errkit.New("GKErrorDomain", 12)
ErrPlayerStatusInvalid matches the GameKit error GKErrorPlayerStatusInvalid.
var ErrRestrictedToAutomatch = errkit.New("GKErrorDomain", 30)
ErrRestrictedToAutomatch matches the GameKit error GKErrorRestrictedToAutomatch.
var ErrScoreNotSet = errkit.New("GKErrorDomain", 9)
ErrScoreNotSet matches the GameKit error GKErrorScoreNotSet.
var ErrSendDataNoRecipients = errkit.New("GKGameSessionErrorDomain", 9)
ErrSendDataNoRecipients matches the GameKit error GKGameSessionErrorSendDataNoRecipients.
var ErrSendDataNotConnected = errkit.New("GKGameSessionErrorDomain", 8)
ErrSendDataNotConnected matches the GameKit error GKGameSessionErrorSendDataNotConnected.
var ErrSendDataNotReachable = errkit.New("GKGameSessionErrorDomain", 10)
ErrSendDataNotReachable matches the GameKit error GKGameSessionErrorSendDataNotReachable.
var ErrSendRateLimitReached = errkit.New("GKGameSessionErrorDomain", 11)
ErrSendRateLimitReached matches the GameKit error GKGameSessionErrorSendRateLimitReached.
var ErrSessionConflict = errkit.New("GKGameSessionErrorDomain", 3)
ErrSessionConflict matches the GameKit error GKGameSessionErrorSessionConflict.
var ErrSessionHasMaxConnectedPlayers = errkit.New("GKGameSessionErrorDomain", 7)
ErrSessionHasMaxConnectedPlayers matches the GameKit error GKGameSessionErrorSessionHasMaxConnectedPlayers.
ErrSessionNotShared matches the GameKit error GKGameSessionErrorSessionNotShared.
var ErrTurnBasedInvalidParticipant = errkit.New("GKErrorDomain", 22)
ErrTurnBasedInvalidParticipant matches the GameKit error GKErrorTurnBasedInvalidParticipant.
var ErrTurnBasedInvalidState = errkit.New("GKErrorDomain", 24)
ErrTurnBasedInvalidState matches the GameKit error GKErrorTurnBasedInvalidState.
var ErrTurnBasedInvalidTurn = errkit.New("GKErrorDomain", 23)
ErrTurnBasedInvalidTurn matches the GameKit error GKErrorTurnBasedInvalidTurn.
var ErrTurnBasedMatchDataTooLarge = errkit.New("GKErrorDomain", 20)
ErrTurnBasedMatchDataTooLarge matches the GameKit error GKErrorTurnBasedMatchDataTooLarge.
var ErrTurnBasedTooManySessions = errkit.New("GKErrorDomain", 21)
ErrTurnBasedTooManySessions matches the GameKit error GKErrorTurnBasedTooManySessions.
ErrUbiquityContainerUnavailable matches the GameKit error GKErrorUbiquityContainerUnavailable.
var ErrUnderage = errkit.New("GKErrorDomain", 14)
ErrUnderage matches the GameKit error GKErrorUnderage.
var ErrUnexpectedConnection = errkit.New("GKErrorDomain", 18)
ErrUnexpectedConnection matches the GameKit error GKErrorUnexpectedConnection.
var ErrUnknown = errkit.New("GKErrorDomain", 1)
ErrUnknown matches the GameKit error GKErrorUnknown.
var ErrUserDenied = errkit.New("GKErrorDomain", 4)
ErrUserDenied matches the GameKit error GKErrorUserDenied.
Functions ¶
func AddEventListener ¶ added in v0.17.0
AddEventListener adds a new event listener object.
func CheckPendingGameActivityExistenceWithCompletionHandler ¶ added in v0.17.0
func CheckPendingGameActivityExistenceWithCompletionHandler(completionHandler func(bool))
CheckPendingGameActivityExistenceWithCompletionHandler checks whether there is a pending activity to handle for the current game.
func GKErrorDomain ¶
GKErrorDomain returns the string constant GKErrorDomain, for use as a dictionary key or argument.
func GKExchangeTimeoutDefault ¶
func GKExchangeTimeoutDefault() float64
GKExchangeTimeoutDefault returns the value of the constant GKExchangeTimeoutDefault.
func GKExchangeTimeoutNone ¶
func GKExchangeTimeoutNone() float64
GKExchangeTimeoutNone returns the value of the constant GKExchangeTimeoutNone.
func GKGameSessionErrorDomain ¶
GKGameSessionErrorDomain returns the string constant GKGameSessionErrorDomain, for use as a dictionary key or argument.
func GKPlayerAuthenticationDidChangeNotificationName ¶
GKPlayerAuthenticationDidChangeNotificationName returns the string constant GKPlayerAuthenticationDidChangeNotificationName, for use as a dictionary key or argument.
func GKPlayerDidChangeNotificationName ¶
GKPlayerDidChangeNotificationName returns the string constant GKPlayerDidChangeNotificationName, for use as a dictionary key or argument.
func GKPlayerIDNoLongerAvailable ¶
GKPlayerIDNoLongerAvailable returns the string constant GKPlayerIDNoLongerAvailable, for use as a dictionary key or argument.
func GKSessionErrorDomain ¶
GKSessionErrorDomain returns the string constant GKSessionErrorDomain, for use as a dictionary key or argument.
func GKTurnTimeoutDefault ¶
func GKTurnTimeoutDefault() float64
GKTurnTimeoutDefault returns the value of the constant GKTurnTimeoutDefault.
func GKTurnTimeoutNone ¶
func GKTurnTimeoutNone() float64
GKTurnTimeoutNone returns the value of the constant GKTurnTimeoutNone.
func GKVoiceChatServiceErrorDomain ¶
GKVoiceChatServiceErrorDomain returns the string constant GKVoiceChatServiceErrorDomain, for use as a dictionary key or argument.
func IncompleteAchievementImage ¶ added in v0.17.0
IncompleteAchievementImage returns a common image that you can display when the player hasn’t completed the achievement.
func IsValidPartyCode ¶ added in v0.17.0
IsValidPartyCode checks whether a party code is in valid format.
func IsVoIPAllowed ¶ added in v0.17.0
func IsVoIPAllowed() bool
IsVoIPAllowed reports whether voice chat is available on the device.
func LoadAchievementDescriptions ¶ added in v0.17.0
LoadAchievementDescriptions downloads the localized descriptions of achievements from Game Center.
LoadAchievementDescriptions blocks until the operation completes or ctx is cancelled.
func LoadAchievements ¶ added in v0.17.0
LoadAchievements loads the achievements that you previously reported the player making progress toward.
LoadAchievements blocks until the operation completes or ctx is cancelled.
func LoadCategoriesWithCompletionHandler ¶ added in v0.18.0
func LoadCategoriesWithCompletionHandler(completionHandler func(obj.Object, obj.Object, unsafe.Pointer))
LoadCategoriesWithCompletionHandler loads categories with completion handler.
func LoadChallengeDefinitions ¶ added in v0.17.0
LoadChallengeDefinitions loads all the challenge definitions for the current game, returns an empty array if none exist.
LoadChallengeDefinitions blocks until the operation completes or ctx is cancelled.
func LoadGameActivityDefinitions ¶ added in v0.17.0
LoadGameActivityDefinitions loads all the game activity definitions for the current game.
LoadGameActivityDefinitions blocks until the operation completes or ctx is cancelled.
func LoadGameActivityDefinitionsWithIDs ¶ added in v0.17.0
func LoadGameActivityDefinitionsWithIDs(ctx context.Context, activityDefinitionIDs []string) (result obj.Object, err error)
LoadGameActivityDefinitionsWithIDs loads game activity definitions with the supplied App Store Connect identifiers.
LoadGameActivityDefinitionsWithIDs blocks until the operation completes or ctx is cancelled.
func LoadLeaderboardSets ¶ added in v0.17.0
LoadLeaderboardSets loads all of the leaderboard sets you configure for your game.
LoadLeaderboardSets blocks until the operation completes or ctx is cancelled.
func LoadLeaderboards ¶ added in v0.17.0
LoadLeaderboards loads the array of GKLeaderboard for your app Possible reasons for error: 1. Communications problem 2. Unauthenticated player 3. Leaderboard not present
LoadLeaderboards blocks until the operation completes or ctx is cancelled.
func LoadLeaderboardsWithIDs ¶ added in v0.17.0
func LoadLeaderboardsWithIDs(ctx context.Context, leaderboardIDs []string) (result obj.Object, err error)
LoadLeaderboardsWithIDs loads leaderboards for the specified leaderboard IDs that Game Center uses.
LoadLeaderboardsWithIDs blocks until the operation completes or ctx is cancelled.
func LoadMatches ¶ added in v0.17.0
LoadMatches fetches the turn-based matches from Game Center that the local player participates in.
LoadMatches blocks until the operation completes or ctx is cancelled.
func LoadPlayersForIdentifiers ¶ added in v0.17.0
func LoadPlayersForIdentifiers(ctx context.Context, identifiers []string) (result obj.Object, err error)
LoadPlayersForIdentifiers loads information about a list of players from Game Center.
LoadPlayersForIdentifiers blocks until the operation completes or ctx is cancelled.
func LoadReceivedChallenges ¶ added in v0.17.0
LoadReceivedChallenges loads the list of outstanding challenges.
LoadReceivedChallenges blocks until the operation completes or ctx is cancelled.
func LoadSessionsInContainer ¶ added in v0.17.0
func LoadSessionsInContainer(ctx context.Context, containerName string) (result obj.Object, err error)
LoadSessionsInContainer retrieves all of the game sessions associated with a container.
LoadSessionsInContainer blocks until the operation completes or ctx is cancelled.
func MaxNumberOfRecipients ¶ added in v0.17.0
func MaxNumberOfRecipients() int
MaxNumberOfRecipients returns the maximum number of recipients permitted in a single request.
func MaxPlayersAllowedForMatchOfType ¶ added in v0.17.0
MaxPlayersAllowedForMatchOfType returns the maximum number of players allowed in the match request for a given match type.
func PlaceholderCompletedAchievementImage ¶ added in v0.17.0
PlaceholderCompletedAchievementImage returns a placeholder image that you can display when the player completes the achievement.
func RemoveEventListener ¶ added in v0.17.0
RemoveEventListener stops listening to the event listener object.
func RemoveSessionWithIdentifier ¶ added in v0.17.0
RemoveSessionWithIdentifier removes the specified game session.
RemoveSessionWithIdentifier blocks until the operation completes or ctx is cancelled.
func ReportAchievements ¶ added in v0.17.0
func ReportAchievements(ctx context.Context, achievements []*Achievement) error
ReportAchievements reports the player’s progress of players toward one or more achievements.
ReportAchievements blocks until the operation completes or ctx is cancelled.
func ReportAchievementsWithEligibleChallenges ¶ added in v0.17.0
func ReportAchievementsWithEligibleChallenges(ctx context.Context, achievements []*Achievement, challenges []*Challenge) error
ReportAchievementsWithEligibleChallenges reports the player’s progress on achievements and limits the challenges, associated with those achievements, that the player may complete.
ReportAchievementsWithEligibleChallenges blocks until the operation completes or ctx is cancelled.
func ReportLeaderboardScoresWithEligibleChallenges ¶ added in v0.17.0
func ReportLeaderboardScoresWithEligibleChallenges(ctx context.Context, scores []*LeaderboardScore, challenges []*Challenge) error
ReportLeaderboardScoresWithEligibleChallenges submits a list of scores and all eligible challenges.
ReportLeaderboardScoresWithEligibleChallenges blocks until the operation completes or ctx is cancelled.
func ReportScores ¶ added in v0.17.0
ReportScores reports a list of scores to Game Center
ReportScores blocks until the operation completes or ctx is cancelled.
func ReportScoresWithEligibleChallenges ¶ added in v0.17.0
func ReportScoresWithEligibleChallenges(ctx context.Context, scores []*Score, challenges []*Challenge) error
ReportScoresWithEligibleChallenges submits a list of scores and all eligible challenges.
ReportScoresWithEligibleChallenges blocks until the operation completes or ctx is cancelled.
func ResetAchievements ¶ added in v0.17.0
ResetAchievements resets the percentage completed for all of the player’s achievements.
ResetAchievements blocks until the operation completes or ctx is cancelled.
func SetDefaultLeaderboard ¶ added in v0.17.0
SetDefaultLeaderboard wraps the corresponding Objective-C method.
SetDefaultLeaderboard blocks until the operation completes or ctx is cancelled.
func ShowBannerWithTitleMessage ¶ added in v0.17.0
ShowBannerWithTitleMessage displays a banner with a title and message to the player.
ShowBannerWithTitleMessage blocks until the operation completes or ctx is cancelled.
func ShowBannerWithTitleMessageDuration ¶ added in v0.17.0
func ShowBannerWithTitleMessageDuration(ctx context.Context, title string, message string, duration float64) error
ShowBannerWithTitleMessageDuration displays a banner to the player for a specified period of time.
ShowBannerWithTitleMessageDuration blocks until the operation completes or ctx is cancelled.
func SubmitScoreContextPlayerLeaderboardIDs ¶ added in v0.17.0
func SubmitScoreContextPlayerLeaderboardIDs(ctx context.Context, score int, context_ int, player *Player, leaderboardIDs []string) error
SubmitScoreContextPlayerLeaderboardIDs submits a score to multiple leaderboards.
SubmitScoreContextPlayerLeaderboardIDs blocks until the operation completes or ctx is cancelled.
func ValidPartyCodeAlphabet ¶ added in v0.17.0
func ValidPartyCodeAlphabet() []string
ValidPartyCodeAlphabet returns allowed characters for the party code to be used to share this activity.
ValidPartyCodeAlphabet returns the collection as a Go slice.
Types ¶
type AccessPoint ¶ added in v0.17.0
AccessPoint is an idiomatic wrapper over the Objective-C class GKAccessPoint.
An object that allows players to view and manage their Game Center information from within your game.
func AccessPointFromID ¶ added in v0.17.0
func AccessPointFromID(id objc.ID) *AccessPoint
AccessPointFromID adopts an existing Objective-C object as a AccessPoint (nil for 0), retaining it and registering a release finalizer.
func NewAccessPoint ¶ added in v0.17.0
func NewAccessPoint() *AccessPoint
NewAccessPoint creates a new AccessPoint.
func (*AccessPoint) Description ¶ added in v0.17.0
func (ap *AccessPoint) Description() string
Description returns the object's -description text.
func (*AccessPoint) FrameInScreenCoordinates ¶ added in v0.17.0
func (ap *AccessPoint) FrameInScreenCoordinates() corefoundation.CGRect
FrameInScreenCoordinates returns observable property that contains the current frame needed to display the widget
func (*AccessPoint) IsActive ¶ added in v0.17.0
func (ap *AccessPoint) IsActive() bool
IsActive reports whether 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 (*AccessPoint) IsEqual ¶ added in v0.17.0
func (ap *AccessPoint) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AccessPoint) IsKind ¶ added in v0.17.0
func (ap *AccessPoint) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AccessPoint) Location ¶ added in v0.17.0
func (ap *AccessPoint) Location() AccessPointLocation
Location returns these properties control the placement of the widget
func (*AccessPoint) ParentWindow ¶ added in v0.17.0
func (ap *AccessPoint) ParentWindow() obj.Object
ParentWindow returns 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 (*AccessPoint) ShowHighlights ¶ added in v0.17.0
func (ap *AccessPoint) ShowHighlights() bool
ShowHighlights reports whether set this property to true if you wish to show the highlights for most recent achievement, current rank on default leaderboard, etc
func (*AccessPoint) String ¶ added in v0.17.0
func (ap *AccessPoint) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*AccessPoint) TriggerAccessPointForArcadeWithHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointForArcadeWithHandler(ctx context.Context) error
TriggerAccessPointForArcadeWithHandler brings up the Arcade dashboard.
TriggerAccessPointForArcadeWithHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointForChallengesWithHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointForChallengesWithHandler(ctx context.Context) error
TriggerAccessPointForChallengesWithHandler displays the view that allows players to engage each other with challenges.
TriggerAccessPointForChallengesWithHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointForFriendingWithHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointForFriendingWithHandler(ctx context.Context) error
TriggerAccessPointForFriendingWithHandler brings up the invite friends view.
TriggerAccessPointForFriendingWithHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointForPlayTogetherWithHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointForPlayTogetherWithHandler(ctx context.Context) error
TriggerAccessPointForPlayTogetherWithHandler displays the view that allows players to engage each other with activities and challenges.
TriggerAccessPointForPlayTogetherWithHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithAchievementIDHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithAchievementIDHandler(ctx context.Context, achievementID string) error
TriggerAccessPointWithAchievementIDHandler displays the Game Center dashboard in a state that shows a specific achievement.
TriggerAccessPointWithAchievementIDHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithChallengeDefinitionIDHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithChallengeDefinitionIDHandler(ctx context.Context, challengeDefinitionID string) error
TriggerAccessPointWithChallengeDefinitionIDHandler displays the challenge creation view for the provided challenge definition ID.
TriggerAccessPointWithChallengeDefinitionIDHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithGameActivityDefinitionIDHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithGameActivityDefinitionIDHandler(ctx context.Context, gameActivityDefinitionID string) error
TriggerAccessPointWithGameActivityDefinitionIDHandler displays the game activity creation view for the provided activity definition ID.
TriggerAccessPointWithGameActivityDefinitionIDHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithGameActivityHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithGameActivityHandler(ctx context.Context, gameActivity *GameActivity) error
TriggerAccessPointWithGameActivityHandler displays the game activity view for the provided activity instance.
TriggerAccessPointWithGameActivityHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithHandler(ctx context.Context) error
TriggerAccessPointWithHandler displays the Game Center dashboard as if the player taps or presses the access point.
TriggerAccessPointWithHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler(ctx context.Context, leaderboardID string, playerScope LeaderboardPlayerScope, timeScope LeaderboardTimeScope) error
TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler displays the Game Center dashboard in a state that shows a specific leaderboard.
TriggerAccessPointWithLeaderboardIDPlayerScopeTimeScopeHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithLeaderboardSetIDHandler(ctx context.Context, leaderboardSetID string) error
TriggerAccessPointWithLeaderboardSetIDHandler displays the Game Center dashboard in a state that shows a specific leaderboard set.
TriggerAccessPointWithLeaderboardSetIDHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithPlayerHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithPlayerHandler(ctx context.Context, player *Player) error
TriggerAccessPointWithPlayerHandler displays the Game Center dashboard in a state that shows a player profile.
TriggerAccessPointWithPlayerHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) TriggerAccessPointWithStateHandler ¶ added in v0.17.0
func (ap *AccessPoint) TriggerAccessPointWithStateHandler(ctx context.Context, state GameCenterViewControllerState) error
TriggerAccessPointWithStateHandler displays the Game Center dashboard in the specified state as if the player taps or presses the access point.
TriggerAccessPointWithStateHandler blocks until the operation completes or ctx is cancelled.
func (*AccessPoint) WithActive ¶ added in v0.17.0
func (ap *AccessPoint) WithActive(active bool) *AccessPoint
WithActive sets a Boolean value that determines whether to display the access point.
func (*AccessPoint) WithLocation ¶ added in v0.17.0
func (ap *AccessPoint) WithLocation(location AccessPointLocation) *AccessPoint
WithLocation sets the corner of the screen to display the access point.
func (*AccessPoint) WithParentWindow ¶ added in v0.17.0
func (ap *AccessPoint) WithParentWindow(parentWindow obj.Object) *AccessPoint
WithParentWindow sets the window that contains the access point.
func (*AccessPoint) WithShowHighlights ¶ added in v0.17.0
func (ap *AccessPoint) WithShowHighlights(showHighlights bool) *AccessPoint
WithShowHighlights sets a Boolean value that indicates whether to display highlights for achievements and current ranks for leaderboards.
type AccessPointLocation ¶ added in v0.17.0
type AccessPointLocation int64
Specifies the corner of the screen to display the access point.
const ( AccessPointLocationTopLeading AccessPointLocation = 0 AccessPointLocationTopTrailing AccessPointLocation = 1 AccessPointLocationBottomLeading AccessPointLocation = 2 AccessPointLocationBottomTrailing AccessPointLocation = 3 )
func (AccessPointLocation) String ¶ added in v0.17.0
func (e AccessPointLocation) String() string
String returns the AccessPointLocation constant's name, or its numeric form when the value is not a known constant.
type Achievement ¶ added in v0.17.0
Achievement is an idiomatic wrapper over the Objective-C class GKAchievement.
An achievement you can award a player as they make progress toward and reach a goal in your game.
func AchievementFromID ¶ added in v0.17.0
func AchievementFromID(id objc.ID) *Achievement
AchievementFromID adopts an existing Objective-C object as a Achievement (nil for 0), retaining it and registering a release finalizer.
func NewAchievementWithIdentifier ¶ added in v0.17.0
func NewAchievementWithIdentifier(identifier string) *Achievement
NewAchievementWithIdentifier initializes an achievement for the local player.
func NewAchievementWithIdentifierForPlayer ¶ added in v0.17.0
func NewAchievementWithIdentifierForPlayer(identifier string, playerID string) *Achievement
NewAchievementWithIdentifierForPlayer * This method is obsolete. Calling this initializer does nothing and will return nil **
func NewAchievementWithIdentifierPlayer ¶ added in v0.17.0
func NewAchievementWithIdentifierPlayer(identifier string, player *Player) *Achievement
NewAchievementWithIdentifierPlayer initializes an achievement for a player.
func (*Achievement) ChallengeComposeControllerWithMessagePlayersCompletion ¶ added in v0.18.0
func (a *Achievement) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletion provides a view controller that you present to the player to issue an achievement challenge.
func (*Achievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler ¶ added in v0.18.0
func (a *Achievement) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletionHandler provides a view controller that you present to the player to issue an achievement challenge.
func (*Achievement) Description ¶ added in v0.17.0
func (a *Achievement) Description() string
Description returns the object's -description text.
func (*Achievement) Identifier ¶ added in v0.17.0
func (a *Achievement) Identifier() string
Identifier returns achievement identifier
func (*Achievement) IsCompleted ¶ added in v0.17.0
func (a *Achievement) IsCompleted() bool
IsCompleted reports whether set to false until percentComplete = 100.
func (*Achievement) IsEqual ¶ added in v0.17.0
func (a *Achievement) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Achievement) IsHidden ¶ added in v0.17.0
func (a *Achievement) IsHidden() bool
IsHidden reports whether the object is hidden.
func (*Achievement) IsKind ¶ added in v0.17.0
func (a *Achievement) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Achievement) IssueChallengeToPlayersMessage ¶ added in v0.17.0
func (a *Achievement) IssueChallengeToPlayersMessage(playerIDs []string, message string)
IssueChallengeToPlayersMessage * This method is obsolete. It will never be invoked and its implementation does nothing**
func (*Achievement) LastReportedDate ¶ added in v0.17.0
func (a *Achievement) LastReportedDate() time.Time
LastReportedDate returns date the achievement was last reported. Read-only. Created at initialization
func (*Achievement) PercentComplete ¶ added in v0.17.0
func (a *Achievement) PercentComplete() float64
PercentComplete returns required, Percentage of achievement complete.
func (*Achievement) Player ¶ added in v0.17.0
func (a *Achievement) Player() *Player
Player returns the identifier of the player that earned the achievement.
func (*Achievement) PlayerID ¶ added in v0.17.0
func (a *Achievement) PlayerID() string
PlayerID returns the player ID.
func (*Achievement) ReportAchievement ¶ added in v0.17.0
func (a *Achievement) ReportAchievement(ctx context.Context) error
ReportAchievement wraps the corresponding Objective-C method.
ReportAchievement blocks until the operation completes or ctx is cancelled.
func (*Achievement) SelectChallengeablePlayerIDs ¶ added in v0.17.0
func (a *Achievement) SelectChallengeablePlayerIDs(ctx context.Context, playerIDs []string) (result obj.Object, err error)
SelectChallengeablePlayerIDs * This method is obsolete. It will never be invoked and its implementation does nothing**
SelectChallengeablePlayerIDs blocks until the operation completes or ctx is cancelled.
func (*Achievement) SelectChallengeablePlayers ¶ added in v0.17.0
func (a *Achievement) SelectChallengeablePlayers(ctx context.Context, players []*Player) (result obj.Object, err error)
SelectChallengeablePlayers finds the subset of players who can earn an achievement.
SelectChallengeablePlayers blocks until the operation completes or ctx is cancelled.
func (*Achievement) ShowsCompletionBanner ¶ added in v0.17.0
func (a *Achievement) ShowsCompletionBanner() bool
ShowsCompletionBanner reports whether a banner will be momentarily displayed after reporting a completed achievement
func (*Achievement) String ¶ added in v0.17.0
func (a *Achievement) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Achievement) WithIdentifier ¶ added in v0.17.0
func (a *Achievement) WithIdentifier(identifier string) *Achievement
WithIdentifier sets the identifier for the achievement that you enter in App Store Connect.
func (*Achievement) WithPercentComplete ¶ added in v0.17.0
func (a *Achievement) WithPercentComplete(percentComplete float64) *Achievement
WithPercentComplete sets a percentage value that states how far the player has progressed on the achievement.
func (*Achievement) WithShowsCompletionBanner ¶ added in v0.17.0
func (a *Achievement) WithShowsCompletionBanner(showsCompletionBanner bool) *Achievement
WithShowsCompletionBanner sets a Boolean value that indicates whether GameKit displays a banner when the player completes the achievement.
type AchievementChallenge ¶ added in v0.17.0
type AchievementChallenge struct {
Challenge
}
AchievementChallenge is an idiomatic wrapper over the Objective-C class GKAchievementChallenge.
It embeds Challenge, promoting that type's methods.
A type of challenge where a player must earn another player’s achievement.
func AchievementChallengeFromID ¶ added in v0.17.0
func AchievementChallengeFromID(id objc.ID) *AchievementChallenge
AchievementChallengeFromID adopts an existing Objective-C object as a AchievementChallenge (nil for 0), retaining it and registering a release finalizer.
func NewAchievementChallenge ¶ added in v0.17.0
func NewAchievementChallenge() *AchievementChallenge
NewAchievementChallenge creates a new AchievementChallenge.
func (*AchievementChallenge) Achievement ¶ added in v0.17.0
func (ac *AchievementChallenge) Achievement() *Achievement
Achievement returns the achievement.
type AchievementDescription ¶ added in v0.17.0
AchievementDescription is an idiomatic wrapper over the Objective-C class GKAchievementDescription.
An object containing the text and artwork used to present an achievement to a player.
func AchievementDescriptionFromID ¶ added in v0.17.0
func AchievementDescriptionFromID(id objc.ID) *AchievementDescription
AchievementDescriptionFromID adopts an existing Objective-C object as a AchievementDescription (nil for 0), retaining it and registering a release finalizer.
func NewAchievementDescription ¶ added in v0.17.0
func NewAchievementDescription() *AchievementDescription
NewAchievementDescription creates a new AchievementDescription.
func (*AchievementDescription) AchievedDescription ¶ added in v0.17.0
func (ad *AchievementDescription) AchievedDescription() string
AchievedDescription returns the description for an unachieved achievement.
func (*AchievementDescription) ActivityIdentifier ¶ added in v0.17.0
func (ad *AchievementDescription) ActivityIdentifier() string
ActivityIdentifier returns the identifier of the game activity associated with this achievement, as configured by the developer in App Store Connect.
func (*AchievementDescription) ActivityProperties ¶ added in v0.17.0
func (ad *AchievementDescription) ActivityProperties() map[string]string
ActivityProperties returns the properties when associating this achievement with a game activity, as configured by the developer in App Store Connect.
func (*AchievementDescription) Description ¶ added in v0.17.0
func (ad *AchievementDescription) Description() string
Description returns the object's -description text.
func (*AchievementDescription) GroupIdentifier ¶ added in v0.17.0
func (ad *AchievementDescription) GroupIdentifier() string
GroupIdentifier returns the group identifier for the achievement, if one exists.
func (*AchievementDescription) Identifier ¶ added in v0.17.0
func (ad *AchievementDescription) Identifier() string
Identifier returns the identifier.
func (*AchievementDescription) Image ¶ added in v0.18.0
func (ad *AchievementDescription) Image() unsafe.Pointer
Image returns the image.
func (*AchievementDescription) IsEqual ¶ added in v0.17.0
func (ad *AchievementDescription) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AchievementDescription) IsHidden ¶ added in v0.17.0
func (ad *AchievementDescription) IsHidden() bool
IsHidden reports whether the achievement should be listed or displayed if not yet unhidden by the game.
func (*AchievementDescription) IsKind ¶ added in v0.17.0
func (ad *AchievementDescription) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AchievementDescription) IsReplayable ¶ added in v0.17.0
func (ad *AchievementDescription) IsReplayable() bool
IsReplayable reports whether 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 (*AchievementDescription) LoadImage ¶ added in v0.17.0
LoadImage loads the image to display when the player completes the achievement.
LoadImage blocks until the operation completes or ctx is cancelled.
func (*AchievementDescription) MaximumPoints ¶ added in v0.17.0
func (ad *AchievementDescription) MaximumPoints() int
MaximumPoints returns maximum points available for completing this achievement.
func (*AchievementDescription) RarityPercent ¶ added in v0.17.0
func (ad *AchievementDescription) RarityPercent() *foundation.Number
RarityPercent returns 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 (*AchievementDescription) ReleaseState ¶ added in v0.17.0
func (ad *AchievementDescription) ReleaseState() ReleaseState
ReleaseState returns the release state of the achievement in App Store Connect.
func (*AchievementDescription) String ¶ added in v0.17.0
func (ad *AchievementDescription) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*AchievementDescription) Title ¶ added in v0.17.0
func (ad *AchievementDescription) Title() string
Title returns the title of the achievement.
func (*AchievementDescription) UnachievedDescription ¶ added in v0.17.0
func (ad *AchievementDescription) UnachievedDescription() string
UnachievedDescription returns the description for an achieved achievement.
type AchievementViewController ¶ added in v0.17.0
type AchievementViewController struct {
GameCenterViewController
}
AchievementViewController is an idiomatic wrapper over the Objective-C class GKAchievementViewController.
It embeds GameCenterViewController, promoting that type's methods.
An GKAchievementViewController object provides a standard user interface to display achievement progress for the local player. If the GKGameCenterViewController class is available, you should use it instead.
func AchievementViewControllerFromID ¶ added in v0.17.0
func AchievementViewControllerFromID(id objc.ID) *AchievementViewController
AchievementViewControllerFromID adopts an existing Objective-C object as a AchievementViewController (nil for 0), retaining it and registering a release finalizer.
func NewAchievementViewController ¶ added in v0.17.0
func NewAchievementViewController() *AchievementViewController
NewAchievementViewController creates a new AchievementViewController.
func (*AchievementViewController) WithAchievementDelegate ¶ added in v0.17.0
func (avc *AchievementViewController) WithAchievementDelegate(achievementDelegate AchievementViewControllerDelegate) *AchievementViewController
WithAchievementDelegate sets the achievement view controller’s delegate.
func (*AchievementViewController) WithGameCenterDelegate ¶ added in v0.17.0
func (avc *AchievementViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *AchievementViewController
WithGameCenterDelegate sets the view controller’s delegate.
func (*AchievementViewController) WithLeaderboardCategory ¶ added in v0.17.0
func (avc *AchievementViewController) WithLeaderboardCategory(leaderboardCategory string) *AchievementViewController
WithLeaderboardCategory sets the leaderboard category.
func (*AchievementViewController) WithLeaderboardIdentifier ¶ added in v0.17.0
func (avc *AchievementViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *AchievementViewController
WithLeaderboardIdentifier sets the leaderboard identifier.
func (*AchievementViewController) WithLeaderboardTimeScope ¶ added in v0.17.0
func (avc *AchievementViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *AchievementViewController
WithLeaderboardTimeScope sets the leaderboard time scope.
func (*AchievementViewController) WithViewState ¶ added in v0.17.0
func (avc *AchievementViewController) WithViewState(viewState GameCenterViewControllerState) *AchievementViewController
WithViewState sets the view state.
type AchievementViewControllerDelegate ¶ added in v0.17.0
type AchievementViewControllerDelegate interface {
// AchievementViewControllerDidFinish the achievement view has finished
AchievementViewControllerDidFinish(viewController *AchievementViewController)
}
AchievementViewControllerDelegate receives the callbacks of the Objective-C protocol GKAchievementViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (AchievementViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type BasePlayer ¶ added in v0.17.0
BasePlayer is an idiomatic wrapper over the Objective-C class GKBasePlayer.
BasePlayer is an abstract base — you do not construct it directly. Construct one of CloudPlayer, Player and pass it where a BasePlayer is accepted.
A class that provides common data and methods for the different player objects.
func BasePlayerFromID ¶ added in v0.17.0
func BasePlayerFromID(id objc.ID) *BasePlayer
BasePlayerFromID adopts an existing Objective-C object as a BasePlayer (nil for 0), retaining it and registering a release finalizer.
func (*BasePlayer) Description ¶ added in v0.17.0
func (bp *BasePlayer) Description() string
Description returns the object's -description text.
func (*BasePlayer) DisplayName ¶ added in v0.17.0
func (bp *BasePlayer) DisplayName() string
DisplayName returns 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.
func (*BasePlayer) IsEqual ¶ added in v0.17.0
func (bp *BasePlayer) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*BasePlayer) IsKind ¶ added in v0.17.0
func (bp *BasePlayer) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*BasePlayer) PlayerID ¶ added in v0.17.0
func (bp *BasePlayer) PlayerID() string
PlayerID returns the player ID.
func (*BasePlayer) String ¶ added in v0.17.0
func (bp *BasePlayer) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type BasePlayerProvider ¶ added in v0.17.0
BasePlayerProvider is accepted wherever a GKBasePlayer (or one of its subclasses) is expected.
type CGLCPContextPriorityRequest ¶
type CGLCPContextPriorityRequest int32
const ( KCGLCPContextPriorityRequestHigh CGLCPContextPriorityRequest = 0 KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1 KCGLCPContextPriorityRequestLow CGLCPContextPriorityRequest = 2 )
func (CGLCPContextPriorityRequest) String ¶
func (e CGLCPContextPriorityRequest) String() string
String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.
type Challenge ¶ added in v0.17.0
Challenge is an idiomatic wrapper over the Objective-C class GKChallenge.
Challenge is an abstract base — you do not construct it directly. Construct one of AchievementChallenge, ScoreChallenge and pass it where a Challenge is accepted.
A challenge issued by the local player to another player.
func ChallengeFromID ¶ added in v0.17.0
ChallengeFromID adopts an existing Objective-C object as a Challenge (nil for 0), retaining it and registering a release finalizer.
func (*Challenge) CompletionDate ¶ added in v0.17.0
CompletionDate returns date the challenge was completed or aborted
func (*Challenge) Decline ¶ added in v0.17.0
func (c *Challenge) Decline()
Decline declines a challenge that another player issues to the local player.
func (*Challenge) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Challenge) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Challenge) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Challenge) IssuingPlayer ¶ added in v0.17.0
IssuingPlayer returns the GKPlayer who issued the challenge
func (*Challenge) IssuingPlayerID ¶ added in v0.17.0
IssuingPlayerID returns * This property is obsolete. **
func (*Challenge) Message ¶ added in v0.17.0
Message returns the message sent to receivers of this challenge
func (*Challenge) ReceivingPlayer ¶ added in v0.17.0
ReceivingPlayer returns the GKPlayer who has received the challenge
func (*Challenge) ReceivingPlayerID ¶ added in v0.17.0
ReceivingPlayerID returns * This property is obsolete. **
func (*Challenge) State ¶ added in v0.17.0
func (c *Challenge) State() ChallengeState
State returns current state of the challenge
type ChallengeDefinition ¶ added in v0.17.0
ChallengeDefinition is an idiomatic wrapper over the Objective-C class GKChallengeDefinition.
An object that represents the static metadata you define for the challenge.
func ChallengeDefinitionFromID ¶ added in v0.17.0
func ChallengeDefinitionFromID(id objc.ID) *ChallengeDefinition
ChallengeDefinitionFromID adopts an existing Objective-C object as a ChallengeDefinition (nil for 0), retaining it and registering a release finalizer.
func NewChallengeDefinition ¶ added in v0.17.0
func NewChallengeDefinition() *ChallengeDefinition
NewChallengeDefinition creates a new ChallengeDefinition.
func (*ChallengeDefinition) Description ¶ added in v0.17.0
func (cd *ChallengeDefinition) Description() string
Description returns the object's -description text.
func (*ChallengeDefinition) Details ¶ added in v0.17.0
func (cd *ChallengeDefinition) Details() string
Details returns a more detailed description of the challenge definition.
func (*ChallengeDefinition) DurationOptions ¶ added in v0.17.0
func (cd *ChallengeDefinition) DurationOptions() []obj.Object
DurationOptions returns 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.
DurationOptions returns the collection as a Go slice.
func (*ChallengeDefinition) GroupIdentifier ¶ added in v0.17.0
func (cd *ChallengeDefinition) GroupIdentifier() string
GroupIdentifier returns the group identifier for the challenge definition, if one exists.
func (*ChallengeDefinition) HasActiveChallengesWithCompletionHandler ¶ added in v0.18.0
func (cd *ChallengeDefinition) HasActiveChallengesWithCompletionHandler(completionHandler func(bool, unsafe.Pointer))
HasActiveChallengesWithCompletionHandler indicates if this definition has active challenges associated with it.
func (*ChallengeDefinition) Identifier ¶ added in v0.17.0
func (cd *ChallengeDefinition) Identifier() string
Identifier returns the developer defined identifier for a given challenge definition.
func (*ChallengeDefinition) IsEqual ¶ added in v0.17.0
func (cd *ChallengeDefinition) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ChallengeDefinition) IsKind ¶ added in v0.17.0
func (cd *ChallengeDefinition) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ChallengeDefinition) IsRepeatable ¶ added in v0.17.0
func (cd *ChallengeDefinition) IsRepeatable() bool
IsRepeatable reports whether indicates if a challenge can be attempted more than once.
func (*ChallengeDefinition) Leaderboard ¶ added in v0.17.0
func (cd *ChallengeDefinition) Leaderboard() *Leaderboard
Leaderboard returns scores submitted to this leaderboard will also be submitted as scores in this challenge.
func (*ChallengeDefinition) LoadImageWithCompletionHandler ¶ added in v0.18.0
func (cd *ChallengeDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
LoadImageWithCompletionHandler loads the image set on the challenge definition, which may be nil if none was set.
func (*ChallengeDefinition) ReleaseState ¶ added in v0.17.0
func (cd *ChallengeDefinition) ReleaseState() ReleaseState
ReleaseState returns the release state of the challenge definition in App Store Connect.
func (*ChallengeDefinition) String ¶ added in v0.17.0
func (cd *ChallengeDefinition) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ChallengeDefinition) Title ¶ added in v0.17.0
func (cd *ChallengeDefinition) Title() string
Title returns a short title for the challenge definition.
type ChallengeEventHandler ¶ added in v0.17.0
ChallengeEventHandler is an idiomatic wrapper over the Objective-C class GKChallengeEventHandler.
The GKChallengeEventHandler class is used to respond to events related to challenges sent or received by the local player.
func ChallengeEventHandlerFromID ¶ added in v0.17.0
func ChallengeEventHandlerFromID(id objc.ID) *ChallengeEventHandler
ChallengeEventHandlerFromID adopts an existing Objective-C object as a ChallengeEventHandler (nil for 0), retaining it and registering a release finalizer.
func GKChallengeEventHandlerChallengeEventHandler ¶
func GKChallengeEventHandlerChallengeEventHandler() *ChallengeEventHandler
GKChallengeEventHandlerChallengeEventHandler returns the shared instance of the event handler
func NewChallengeEventHandler ¶ added in v0.17.0
func NewChallengeEventHandler() *ChallengeEventHandler
NewChallengeEventHandler creates a new ChallengeEventHandler.
func (*ChallengeEventHandler) Description ¶ added in v0.17.0
func (ceh *ChallengeEventHandler) Description() string
Description returns the object's -description text.
func (*ChallengeEventHandler) IsEqual ¶ added in v0.17.0
func (ceh *ChallengeEventHandler) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ChallengeEventHandler) IsKind ¶ added in v0.17.0
func (ceh *ChallengeEventHandler) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ChallengeEventHandler) String ¶ added in v0.17.0
func (ceh *ChallengeEventHandler) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ChallengeEventHandler) WithDelegate ¶ added in v0.17.0
func (ceh *ChallengeEventHandler) WithDelegate(delegate ChallengeEventHandlerDelegate) *ChallengeEventHandler
WithDelegate sets the delegate for the event handler.
type ChallengeEventHandlerDelegate ¶ added in v0.17.0
type ChallengeEventHandlerDelegate interface {
}
ChallengeEventHandlerDelegate receives the callbacks of the Objective-C protocol GKChallengeEventHandlerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ChallengeEventHandlerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type ChallengeEventHandlerDelegateLocalPlayerDidCompleteChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateLocalPlayerDidCompleteChallengeHandler interface {
LocalPlayerDidCompleteChallenge(challenge *Challenge)
}
ChallengeEventHandlerDelegateLocalPlayerDidCompleteChallengeHandler is the optional GKChallengeEventHandlerDelegate method localPlayerDidCompleteChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateLocalPlayerDidReceiveChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateLocalPlayerDidReceiveChallengeHandler interface {
LocalPlayerDidReceiveChallenge(challenge *Challenge)
}
ChallengeEventHandlerDelegateLocalPlayerDidReceiveChallengeHandler is the optional GKChallengeEventHandlerDelegate method localPlayerDidReceiveChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateLocalPlayerDidSelectChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateLocalPlayerDidSelectChallengeHandler interface {
LocalPlayerDidSelectChallenge(challenge *Challenge)
}
ChallengeEventHandlerDelegateLocalPlayerDidSelectChallengeHandler is the optional GKChallengeEventHandlerDelegate method localPlayerDidSelectChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateRemotePlayerDidCompleteChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateRemotePlayerDidCompleteChallengeHandler interface {
RemotePlayerDidCompleteChallenge(challenge *Challenge)
}
ChallengeEventHandlerDelegateRemotePlayerDidCompleteChallengeHandler is the optional GKChallengeEventHandlerDelegate method remotePlayerDidCompleteChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateShouldShowBannerForLocallyCompletedChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateShouldShowBannerForLocallyCompletedChallengeHandler interface {
ShouldShowBannerForLocallyCompletedChallenge(challenge *Challenge) bool
}
ChallengeEventHandlerDelegateShouldShowBannerForLocallyCompletedChallengeHandler is the optional GKChallengeEventHandlerDelegate method shouldShowBannerForLocallyCompletedChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateShouldShowBannerForLocallyReceivedChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateShouldShowBannerForLocallyReceivedChallengeHandler interface {
ShouldShowBannerForLocallyReceivedChallenge(challenge *Challenge) bool
}
ChallengeEventHandlerDelegateShouldShowBannerForLocallyReceivedChallengeHandler is the optional GKChallengeEventHandlerDelegate method shouldShowBannerForLocallyReceivedChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeEventHandlerDelegateShouldShowBannerForRemotelyCompletedChallengeHandler ¶ added in v0.17.0
type ChallengeEventHandlerDelegateShouldShowBannerForRemotelyCompletedChallengeHandler interface {
ShouldShowBannerForRemotelyCompletedChallenge(challenge *Challenge) bool
}
ChallengeEventHandlerDelegateShouldShowBannerForRemotelyCompletedChallengeHandler is the optional GKChallengeEventHandlerDelegate method shouldShowBannerForRemotelyCompletedChallenge:. Implement it on a ChallengeEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type ChallengeListener ¶ added in v0.17.0
type ChallengeListener interface {
}
ChallengeListener is the Go form of the Objective-C protocol GKChallengeListener.
type ChallengeProvider ¶ added in v0.17.0
ChallengeProvider is accepted wherever a GKChallenge (or one of its subclasses) is expected.
type ChallengeState
deprecated
added in
v0.17.0
type ChallengeState int64
The state of a challenge.
Deprecated: since macOS 26.0.
const ( // The challenge isn’t valid because an error occurred. ChallengeStateInvalid ChallengeState = 0 // The player issued a challenge, but the other player hasn’t accepted or refused it. ChallengeStatePending ChallengeState = 1 // The player successfully completed the challenge. ChallengeStateCompleted ChallengeState = 2 // The player declined the challenge. ChallengeStateDeclined ChallengeState = 3 )
func (ChallengeState) String ¶ added in v0.17.0
func (e ChallengeState) String() string
String returns the ChallengeState constant's name, or its numeric form when the value is not a known constant.
type ChallengesViewController ¶ added in v0.17.0
ChallengesViewController is an idiomatic wrapper over the Objective-C class GKChallengesViewController.
func ChallengesViewControllerFromID ¶ added in v0.17.0
func ChallengesViewControllerFromID(id objc.ID) *ChallengesViewController
ChallengesViewControllerFromID adopts an existing Objective-C object as a ChallengesViewController (nil for 0), retaining it and registering a release finalizer.
func NewChallengesViewController ¶ added in v0.17.0
func NewChallengesViewController() *ChallengesViewController
NewChallengesViewController creates a new ChallengesViewController.
func (*ChallengesViewController) Description ¶ added in v0.17.0
func (cvc *ChallengesViewController) Description() string
Description returns the object's -description text.
func (*ChallengesViewController) IsEqual ¶ added in v0.17.0
func (cvc *ChallengesViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*ChallengesViewController) IsKind ¶ added in v0.17.0
func (cvc *ChallengesViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*ChallengesViewController) String ¶ added in v0.17.0
func (cvc *ChallengesViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*ChallengesViewController) WithChallengeDelegate ¶ added in v0.17.0
func (cvc *ChallengesViewController) WithChallengeDelegate(challengeDelegate ChallengesViewControllerDelegate) *ChallengesViewController
WithChallengeDelegate sets the challenge delegate.
type ChallengesViewControllerDelegate ¶ added in v0.17.0
type ChallengesViewControllerDelegate interface {
// ChallengesViewControllerDidFinish wraps the corresponding Objective-C method.
ChallengesViewControllerDidFinish(viewController *ChallengesViewController)
}
ChallengesViewControllerDelegate receives the callbacks of the Objective-C protocol GKChallengesViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ChallengesViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type CloudPlayer ¶ added in v0.17.0
type CloudPlayer struct {
BasePlayer
}
CloudPlayer is an idiomatic wrapper over the Objective-C class GKCloudPlayer.
It embeds BasePlayer, promoting that type's methods.
The object representing the currently signed-in iCloud user.
func CloudPlayerFromID ¶ added in v0.17.0
func CloudPlayerFromID(id objc.ID) *CloudPlayer
CloudPlayerFromID adopts an existing Objective-C object as a CloudPlayer (nil for 0), retaining it and registering a release finalizer.
func GetCurrentSignedInPlayerForContainer ¶ added in v0.17.0
func GetCurrentSignedInPlayerForContainer(ctx context.Context, containerName string) (result *CloudPlayer, err error)
GetCurrentSignedInPlayerForContainer returns player information for the currently signed-in player.
GetCurrentSignedInPlayerForContainer blocks until the operation completes or ctx is cancelled.
func NewCloudPlayer ¶ added in v0.17.0
func NewCloudPlayer() *CloudPlayer
NewCloudPlayer creates a new CloudPlayer.
type ConnectionState ¶ added in v0.17.0
type ConnectionState int64
Possible connection states for a player
const ( // The player is not connected to the game session. ConnectionStateNotConnected ConnectionState = 0 // The player is connected to the game session. ConnectionStateConnected ConnectionState = 1 )
func (ConnectionState) String ¶ added in v0.17.0
func (e ConnectionState) String() string
String returns the ConnectionState constant's name, or its numeric form when the value is not a known constant.
type DialogController ¶ added in v0.17.0
DialogController is an idiomatic wrapper over the Objective-C class GKDialogController.
An object that provides the ability to present the dashboard in macOS games.
func DialogControllerFromID ¶ added in v0.17.0
func DialogControllerFromID(id objc.ID) *DialogController
DialogControllerFromID adopts an existing Objective-C object as a DialogController (nil for 0), retaining it and registering a release finalizer.
func NewDialogController ¶ added in v0.17.0
func NewDialogController() *DialogController
NewDialogController creates a new DialogController.
func SharedDialogController ¶ added in v0.17.0
func SharedDialogController() *DialogController
SharedDialogController returns retrieves the shared instance of the dialog controller.
func (*DialogController) Description ¶ added in v0.17.0
func (dc *DialogController) Description() string
Description returns the object's -description text.
func (*DialogController) Dismiss ¶ added in v0.17.0
func (dc *DialogController) Dismiss(sender obj.Object)
Dismiss dismisses the dashboard.
func (*DialogController) IsEqual ¶ added in v0.17.0
func (dc *DialogController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*DialogController) IsKind ¶ added in v0.17.0
func (dc *DialogController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*DialogController) ParentWindow ¶ added in v0.17.0
func (dc *DialogController) ParentWindow() obj.Object
ParentWindow returns the parent window.
func (*DialogController) PresentViewController ¶ added in v0.17.0
func (dc *DialogController) PresentViewController(viewController obj.Object) bool
PresentViewController presents the dashboard in the window.
func (*DialogController) String ¶ added in v0.17.0
func (dc *DialogController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*DialogController) WithParentWindow ¶ added in v0.17.0
func (dc *DialogController) WithParentWindow(parentWindow obj.Object) *DialogController
WithParentWindow sets the window that displays the dashboard.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type ErrorCode ¶ added in v0.17.0
type ErrorCode int64
Error codes for the GameKit error domain.
const ( ErrorUnknown ErrorCode = 1 ErrorCancelled ErrorCode = 2 ErrorCommunicationsFailure ErrorCode = 3 ErrorUserDenied ErrorCode = 4 ErrorInvalidCredentials ErrorCode = 5 ErrorNotAuthenticated ErrorCode = 6 ErrorAuthenticationInProgress ErrorCode = 7 ErrorInvalidPlayer ErrorCode = 8 ErrorScoreNotSet ErrorCode = 9 ErrorParentalControlsBlocked ErrorCode = 10 ErrorPlayerStatusExceedsMaximumLength ErrorCode = 11 ErrorPlayerStatusInvalid ErrorCode = 12 ErrorMatchRequestInvalid ErrorCode = 13 ErrorUnderage ErrorCode = 14 ErrorGameUnrecognized ErrorCode = 15 ErrorNotSupported ErrorCode = 16 ErrorInvalidParameter ErrorCode = 17 ErrorUnexpectedConnection ErrorCode = 18 // Deprecated: since macOS 26.0. ErrorChallengeInvalid ErrorCode = 19 ErrorTurnBasedMatchDataTooLarge ErrorCode = 20 ErrorTurnBasedTooManySessions ErrorCode = 21 ErrorTurnBasedInvalidParticipant ErrorCode = 22 ErrorTurnBasedInvalidTurn ErrorCode = 23 ErrorTurnBasedInvalidState ErrorCode = 24 ErrorInvitationsDisabled ErrorCode = 25 ErrorPlayerPhotoFailure ErrorCode = 26 ErrorMatchNotConnected ErrorCode = 28 ErrorGameSessionRequestInvalid ErrorCode = 29 ErrorRestrictedToAutomatch ErrorCode = 30 ErrorAPINotAvailable ErrorCode = 31 ErrorNotAuthorized ErrorCode = 32 ErrorConnectionTimeout ErrorCode = 33 ErrorAPIObsolete ErrorCode = 34 ErrorLockdownMode ErrorCode = 36 ErrorAppUnlisted ErrorCode = 37 ErrorDebugMode ErrorCode = 38 ErrorFriendListDescriptionMissing ErrorCode = 100 ErrorFriendListRestricted ErrorCode = 101 ErrorFriendListDenied ErrorCode = 102 ErrorFriendRequestNotAvailable ErrorCode = 103 )
type EvsioEVSIOCCSIndices ¶
type EvsioEVSIOCCSIndices int32
const ( EvsioEVSIOCCSIndicesX EvsioEVSIOCCSIndices = 0 EvsioEVSIOCCSIndicesY EvsioEVSIOCCSIndices = 1 )
func (EvsioEVSIOCCSIndices) String ¶
func (e EvsioEVSIOCCSIndices) String() string
String returns the EvsioEVSIOCCSIndices constant's name, or its numeric form when the value is not a known constant.
type EvsioEVSIOSCSIndices ¶
type EvsioEVSIOSCSIndices int32
const ( EvsioEVSIOSCSIndicesX EvsioEVSIOSCSIndices = 0 EvsioEVSIOSCSIndicesY EvsioEVSIOSCSIndices = 1 )
func (EvsioEVSIOSCSIndices) String ¶
func (e EvsioEVSIOSCSIndices) String() string
String returns the EvsioEVSIOSCSIndices constant's name, or its numeric form when the value is not a known constant.
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type FriendRequestComposeViewController ¶ added in v0.17.0
FriendRequestComposeViewController is an idiomatic wrapper over the Objective-C class GKFriendRequestComposeViewController.
Your game uses the GKFriendRequestComposeViewController class to present a screen that allows the local player to send friend requests to other players.
func FriendRequestComposeViewControllerFromID ¶ added in v0.17.0
func FriendRequestComposeViewControllerFromID(id objc.ID) *FriendRequestComposeViewController
FriendRequestComposeViewControllerFromID adopts an existing Objective-C object as a FriendRequestComposeViewController (nil for 0), retaining it and registering a release finalizer.
func NewFriendRequestComposeViewController ¶ added in v0.17.0
func NewFriendRequestComposeViewController() *FriendRequestComposeViewController
NewFriendRequestComposeViewController creates a new FriendRequestComposeViewController.
func (*FriendRequestComposeViewController) AddRecipientPlayers ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) AddRecipientPlayers(players []*Player)
AddRecipientPlayers adds recipients based on their Game Center player identifiers.
func (*FriendRequestComposeViewController) AddRecipientsWithEmailAddresses ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) AddRecipientsWithEmailAddresses(emailAddresses []string)
AddRecipientsWithEmailAddresses adds recipients based on their email addresses.
func (*FriendRequestComposeViewController) AddRecipientsWithPlayerIDs ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) AddRecipientsWithPlayerIDs(playerIDs []string)
AddRecipientsWithPlayerIDs adds recipients based on their Game Center player identifiers.
func (*FriendRequestComposeViewController) Description ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) Description() string
Description returns the object's -description text.
func (*FriendRequestComposeViewController) IsEqual ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*FriendRequestComposeViewController) IsKind ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*FriendRequestComposeViewController) SetMessage ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) SetMessage(message string)
SetMessage sets the text message included in the friend invitation.
func (*FriendRequestComposeViewController) String ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*FriendRequestComposeViewController) WithComposeViewDelegate ¶ added in v0.17.0
func (frcvc *FriendRequestComposeViewController) WithComposeViewDelegate(composeViewDelegate FriendRequestComposeViewControllerDelegate) *FriendRequestComposeViewController
WithComposeViewDelegate sets the view controller’s delegate
type FriendRequestComposeViewControllerDelegate ¶ added in v0.17.0
type FriendRequestComposeViewControllerDelegate interface {
// FriendRequestComposeViewControllerDidFinish the compose view has finished
FriendRequestComposeViewControllerDidFinish(viewController *FriendRequestComposeViewController)
}
FriendRequestComposeViewControllerDelegate receives the callbacks of the Objective-C protocol GKFriendRequestComposeViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (FriendRequestComposeViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type FriendsAuthorizationStatus ¶ added in v0.17.0
type FriendsAuthorizationStatus int64
Constants that indicate if the local player grants access to their friends list.
const ( // The player hasn’t choosen whether your game may access their friends list. FriendsAuthorizationStatusNotDetermined FriendsAuthorizationStatus = 0 // Access to the player’s list of friends restricted. FriendsAuthorizationStatusRestricted FriendsAuthorizationStatus = 1 // Access to the player’s friends’ data denied. FriendsAuthorizationStatusDenied FriendsAuthorizationStatus = 2 // The player authorized your game to access their list of friends. FriendsAuthorizationStatusAuthorized FriendsAuthorizationStatus = 3 )
func (FriendsAuthorizationStatus) String ¶ added in v0.17.0
func (e FriendsAuthorizationStatus) String() string
String returns the FriendsAuthorizationStatus constant's name, or its numeric form when the value is not a known constant.
type GameActivity ¶ added in v0.17.0
GameActivity is an idiomatic wrapper over the Objective-C class GKGameActivity.
An object that represents a single instance of a game activity for the current game.
func GameActivityFromID ¶ added in v0.17.0
func GameActivityFromID(id objc.ID) *GameActivity
GameActivityFromID adopts an existing Objective-C object as a GameActivity (nil for 0), retaining it and registering a release finalizer.
func NewGameActivityWithDefinition ¶ added in v0.17.0
func NewGameActivityWithDefinition(activityDefinition *GameActivityDefinition) *GameActivity
NewGameActivityWithDefinition creates a game activity with definition.
func StartWithDefinition ¶ added in v0.17.0
func StartWithDefinition(activityDefinition *GameActivityDefinition) (result *GameActivity, err error)
StartWithDefinition creates and starts a game activity with a definition.
func StartWithDefinitionPartyCode ¶ added in v0.17.0
func StartWithDefinitionPartyCode(activityDefinition *GameActivityDefinition, partyCode string) (result *GameActivity, err error)
StartWithDefinitionPartyCode creates and starts a new game activity with a custom party code.
func (*GameActivity) Achievements ¶ added in v0.17.0
func (ga *GameActivity) Achievements() []*Achievement
Achievements returns all achievements that have been associated with this activity. Progress of each achievement will be reported when the activity ends. The order of the returned elements is unspecified.
func (*GameActivity) ActivityDefinition ¶ added in v0.17.0
func (ga *GameActivity) ActivityDefinition() *GameActivityDefinition
ActivityDefinition returns the activity definition that this activity instance is based on.
func (*GameActivity) CreationDate ¶ added in v0.17.0
func (ga *GameActivity) CreationDate() time.Time
CreationDate returns the date when the activity was created.
func (*GameActivity) Description ¶ added in v0.17.0
func (ga *GameActivity) Description() string
Description returns the object's -description text.
func (*GameActivity) Duration ¶ added in v0.17.0
func (ga *GameActivity) Duration() float64
Duration returns the total time elapsed while in active state.
func (*GameActivity) End ¶ added in v0.17.0
func (ga *GameActivity) End()
End ends the game activity if it’s not already ended.
func (*GameActivity) EndDate ¶ added in v0.17.0
func (ga *GameActivity) EndDate() time.Time
EndDate returns the date when the activity was officially ended.
func (*GameActivity) FindMatch ¶ added in v0.17.0
func (ga *GameActivity) FindMatch(ctx context.Context) (result *Match, err error)
FindMatch use information from the activity to find matches for the local player.
FindMatch blocks until the operation completes or ctx is cancelled.
func (*GameActivity) FindPlayersForHostedMatch ¶ added in v0.17.0
func (ga *GameActivity) FindPlayersForHostedMatch(ctx context.Context) (result obj.Object, err error)
FindPlayersForHostedMatch use information from the activity to find server hosted players for the local player.
FindPlayersForHostedMatch blocks until the operation completes or ctx is cancelled.
func (*GameActivity) GetProgressOnAchievement ¶ added in v0.17.0
func (ga *GameActivity) GetProgressOnAchievement(achievement *Achievement) float64
GetProgressOnAchievement get the achievement progress from a specific achievement of the local player if previously set.
func (*GameActivity) GetScoreOnLeaderboard ¶ added in v0.17.0
func (ga *GameActivity) GetScoreOnLeaderboard(leaderboard *Leaderboard) *LeaderboardScore
GetScoreOnLeaderboard get the leaderboard score from a specific leaderboard of the local player if previously set.
func (*GameActivity) Identifier ¶ added in v0.17.0
func (ga *GameActivity) Identifier() string
Identifier returns the identifier of this activity instance.
func (*GameActivity) IsEqual ¶ added in v0.17.0
func (ga *GameActivity) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*GameActivity) IsKind ¶ added in v0.17.0
func (ga *GameActivity) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*GameActivity) LastResumeDate ¶ added in v0.17.0
func (ga *GameActivity) LastResumeDate() time.Time
LastResumeDate returns 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 (*GameActivity) LeaderboardScores ¶ added in v0.17.0
func (ga *GameActivity) LeaderboardScores() []*LeaderboardScore
LeaderboardScores returns all leaderboard scores that have been associated with this activity. Scores will be submitted to the leaderboards when the activity ends. The order of the returned elements is unspecified.
func (*GameActivity) MakeMatchRequest ¶ added in v0.17.0
func (ga *GameActivity) MakeMatchRequest() *MatchRequest
MakeMatchRequest returns makes a match request object with information from the activity, which you can use to find matches for the local player.
func (*GameActivity) PartyCode ¶ added in v0.17.0
func (ga *GameActivity) PartyCode() string
PartyCode returns 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 (*GameActivity) PartyURL ¶ added in v0.17.0
func (ga *GameActivity) PartyURL() string
PartyURL returns if the game supports party code, this is the URL that can be shared among players to join the party.
func (*GameActivity) Pause ¶ added in v0.17.0
func (ga *GameActivity) Pause()
Pause pauses the game activity if it’s not already paused.
func (*GameActivity) Properties ¶ added in v0.17.0
func (ga *GameActivity) Properties() map[string]string
Properties returns 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 (*GameActivity) RemoveAchievements ¶ added in v0.17.0
func (ga *GameActivity) RemoveAchievements(achievements []*Achievement)
RemoveAchievements removes all achievements if they exist.
func (*GameActivity) RemoveScoresFromLeaderboards ¶ added in v0.17.0
func (ga *GameActivity) RemoveScoresFromLeaderboards(leaderboards []*Leaderboard)
RemoveScoresFromLeaderboards removes all scores from leaderboards for a player if exist.
func (*GameActivity) Resume ¶ added in v0.17.0
func (ga *GameActivity) Resume()
Resume resumes the game activity if it was paused.
func (*GameActivity) SetAchievementCompleted ¶ added in v0.17.0
func (ga *GameActivity) SetAchievementCompleted(achievement *Achievement)
SetAchievementCompleted set progress to 100% for an achievement for a player.
func (*GameActivity) SetProgressOnAchievementToPercentComplete ¶ added in v0.17.0
func (ga *GameActivity) SetProgressOnAchievementToPercentComplete(achievement *Achievement, percentComplete float64)
SetProgressOnAchievementToPercentComplete set a progress for an achievement for a player.
func (*GameActivity) SetScoreOnLeaderboardToScore ¶ added in v0.17.0
func (ga *GameActivity) SetScoreOnLeaderboardToScore(leaderboard *Leaderboard, score int)
SetScoreOnLeaderboardToScore set a score of a leaderboard for a player.
func (*GameActivity) SetScoreOnLeaderboardToScoreContext ¶ added in v0.17.0
func (ga *GameActivity) SetScoreOnLeaderboardToScoreContext(leaderboard *Leaderboard, score int, context_ int)
SetScoreOnLeaderboardToScoreContext set a score of a leaderboard with a context for a player.
func (*GameActivity) Start ¶ added in v0.17.0
func (ga *GameActivity) Start()
Start starts the game activity if it’s not already started.
func (*GameActivity) StartDate ¶ added in v0.17.0
func (ga *GameActivity) StartDate() time.Time
StartDate returns the date when the activity was initially started.
func (*GameActivity) State ¶ added in v0.17.0
func (ga *GameActivity) State() GameActivityState
State returns the state of the game activity.
func (*GameActivity) String ¶ added in v0.17.0
func (ga *GameActivity) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*GameActivity) WithProperties ¶ added in v0.17.0
func (ga *GameActivity) WithProperties(properties map[string]string) *GameActivity
WithProperties sets properties that contain additional information about the activity.
type GameActivityDefinition ¶ added in v0.17.0
GameActivityDefinition is an idiomatic wrapper over the Objective-C class GKGameActivityDefinition.
An object that represents the static metadata you define for the activity.
func GameActivityDefinitionFromID ¶ added in v0.17.0
func GameActivityDefinitionFromID(id objc.ID) *GameActivityDefinition
GameActivityDefinitionFromID adopts an existing Objective-C object as a GameActivityDefinition (nil for 0), retaining it and registering a release finalizer.
func NewGameActivityDefinition ¶ added in v0.17.0
func NewGameActivityDefinition() *GameActivityDefinition
NewGameActivityDefinition creates a new GameActivityDefinition.
func (*GameActivityDefinition) DefaultProperties ¶ added in v0.17.0
func (gad *GameActivityDefinition) DefaultProperties() map[string]string
DefaultProperties returns default properties defined by the developer for this type of game activity.
func (*GameActivityDefinition) Description ¶ added in v0.17.0
func (gad *GameActivityDefinition) Description() string
Description returns the object's -description text.
func (*GameActivityDefinition) Details ¶ added in v0.17.0
func (gad *GameActivityDefinition) Details() string
Details returns a more detailed description of the game activity.
func (*GameActivityDefinition) FallbackURL ¶ added in v0.17.0
func (gad *GameActivityDefinition) FallbackURL() string
FallbackURL returns 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 (*GameActivityDefinition) GroupIdentifier ¶ added in v0.17.0
func (gad *GameActivityDefinition) GroupIdentifier() string
GroupIdentifier returns the group identifier for the activity, if one exists.
func (*GameActivityDefinition) Identifier ¶ added in v0.17.0
func (gad *GameActivityDefinition) Identifier() string
Identifier returns the developer defined identifier for a given game activity.
func (*GameActivityDefinition) IsEqual ¶ added in v0.17.0
func (gad *GameActivityDefinition) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*GameActivityDefinition) IsKind ¶ added in v0.17.0
func (gad *GameActivityDefinition) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*GameActivityDefinition) LoadAchievementDescriptions ¶ added in v0.17.0
func (gad *GameActivityDefinition) LoadAchievementDescriptions(ctx context.Context) (result obj.Object, err error)
LoadAchievementDescriptions loads all associated achievements that have defined deep links to this game activity definition.
LoadAchievementDescriptions blocks until the operation completes or ctx is cancelled.
func (*GameActivityDefinition) LoadImageWithCompletionHandler ¶ added in v0.18.0
func (gad *GameActivityDefinition) LoadImageWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
LoadImageWithCompletionHandler asynchronously load the image. Error will be nil on success.
func (*GameActivityDefinition) LoadLeaderboards ¶ added in v0.17.0
func (gad *GameActivityDefinition) LoadLeaderboards(ctx context.Context) (result obj.Object, err error)
LoadLeaderboards loads all associated leaderboards that have defined deep links to this game activity definition.
LoadLeaderboards blocks until the operation completes or ctx is cancelled.
func (*GameActivityDefinition) MaxPlayers ¶ added in v0.17.0
func (gad *GameActivityDefinition) MaxPlayers() *foundation.Number
MaxPlayers returns 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 (*GameActivityDefinition) MinPlayers ¶ added in v0.17.0
func (gad *GameActivityDefinition) MinPlayers() *foundation.Number
MinPlayers returns the minimum number of participants that can join the activity.
func (*GameActivityDefinition) PlayStyle ¶ added in v0.17.0
func (gad *GameActivityDefinition) PlayStyle() GameActivityPlayStyle
PlayStyle returns the play style of the game activity.
func (*GameActivityDefinition) ReleaseState ¶ added in v0.17.0
func (gad *GameActivityDefinition) ReleaseState() ReleaseState
ReleaseState returns the release state of the game activity definition in App Store Connect.
func (*GameActivityDefinition) String ¶ added in v0.17.0
func (gad *GameActivityDefinition) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*GameActivityDefinition) SupportsPartyCode ¶ added in v0.17.0
func (gad *GameActivityDefinition) SupportsPartyCode() bool
SupportsPartyCode reports 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 (*GameActivityDefinition) SupportsUnlimitedPlayers ¶ added in v0.17.0
func (gad *GameActivityDefinition) SupportsUnlimitedPlayers() bool
SupportsUnlimitedPlayers reports whether 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 (*GameActivityDefinition) Title ¶ added in v0.17.0
func (gad *GameActivityDefinition) Title() string
Title returns a short title for the game activity.
type GameActivityListener ¶ added in v0.17.0
type GameActivityListener interface {
}
GameActivityListener is the Go form of the Objective-C protocol GKGameActivityListener.
type GameActivityPlayStyle ¶ added in v0.17.0
type GameActivityPlayStyle int64
Play Style of the game activity. It can be either Asynchronous or Synchronous.
const ( GameActivityPlayStyleUnspecified GameActivityPlayStyle = 0 GameActivityPlayStyleSynchronous GameActivityPlayStyle = 1 GameActivityPlayStyleAsynchronous GameActivityPlayStyle = 2 )
func (GameActivityPlayStyle) String ¶ added in v0.17.0
func (e GameActivityPlayStyle) String() string
String returns the GameActivityPlayStyle constant's name, or its numeric form when the value is not a known constant.
type GameActivityState ¶ added in v0.17.0
type GameActivityState uint64
const ( // The game activity is initialized but has not started. GameActivityStateInitialized GameActivityState = 0 // The game activity is active. GameActivityStateActive GameActivityState = 1 // The game activity is paused. GameActivityStatePaused GameActivityState = 2 // The game activity has ended. This is a terminal state. GameActivityStateEnded GameActivityState = 4 )
func (GameActivityState) String ¶ added in v0.17.0
func (e GameActivityState) String() string
String returns the GameActivityState constant's name, or its numeric form when the value is not a known constant.
type GameCenterControllerDelegate ¶ added in v0.17.0
type GameCenterControllerDelegate interface {
// GameCenterViewControllerDidFinish wraps the corresponding Objective-C method.
GameCenterViewControllerDidFinish(gameCenterViewController *GameCenterViewController)
}
GameCenterControllerDelegate receives the callbacks of the Objective-C protocol GKGameCenterControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (GameCenterControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type GameCenterViewController ¶ added in v0.17.0
GameCenterViewController is an idiomatic wrapper over the Objective-C class GKGameCenterViewController.
GameCenterViewController is an abstract base — you do not construct it directly. Construct one of AchievementViewController, LeaderboardViewController and pass it where a GameCenterViewController is accepted.
The dashboard that allows players to access their Game Center data in your game.
func GameCenterViewControllerFromID ¶ added in v0.17.0
func GameCenterViewControllerFromID(id objc.ID) *GameCenterViewController
GameCenterViewControllerFromID adopts an existing Objective-C object as a GameCenterViewController (nil for 0), retaining it and registering a release finalizer.
func NewGameCenterViewControllerWithAchievementID ¶ added in v0.17.0
func NewGameCenterViewControllerWithAchievementID(achievementID string) *GameCenterViewController
NewGameCenterViewControllerWithAchievementID creates a view controller that presents an achievement.
func NewGameCenterViewControllerWithLeaderboardIDPlayerScopeTimeScope ¶ added in v0.17.0
func NewGameCenterViewControllerWithLeaderboardIDPlayerScopeTimeScope(leaderboardID string, playerScope LeaderboardPlayerScope, timeScope LeaderboardTimeScope) *GameCenterViewController
NewGameCenterViewControllerWithLeaderboardIDPlayerScopeTimeScope creates a view controller that presents a leaderboard with data from the specified players and time period.
func NewGameCenterViewControllerWithLeaderboardPlayerScope ¶ added in v0.17.0
func NewGameCenterViewControllerWithLeaderboardPlayerScope(leaderboard *Leaderboard, playerScope LeaderboardPlayerScope) *GameCenterViewController
NewGameCenterViewControllerWithLeaderboardPlayerScope creates a view controller that presents a leaderboard with data for the specified players.
func NewGameCenterViewControllerWithLeaderboardSetID ¶ added in v0.17.0
func NewGameCenterViewControllerWithLeaderboardSetID(leaderboardSetID string) *GameCenterViewController
NewGameCenterViewControllerWithLeaderboardSetID creates a view controller that presents a leaderboard set.
func NewGameCenterViewControllerWithPlayer ¶ added in v0.17.0
func NewGameCenterViewControllerWithPlayer(player *Player) *GameCenterViewController
NewGameCenterViewControllerWithPlayer creates a view controller that presents a player’s Game Center profile.
func NewGameCenterViewControllerWithState ¶ added in v0.17.0
func NewGameCenterViewControllerWithState(state GameCenterViewControllerState) *GameCenterViewController
NewGameCenterViewControllerWithState creates a view controller that presents the specified Game Center content.
func (*GameCenterViewController) Description ¶ added in v0.17.0
func (gcvc *GameCenterViewController) Description() string
Description returns the object's -description text.
func (*GameCenterViewController) IsEqual ¶ added in v0.17.0
func (gcvc *GameCenterViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*GameCenterViewController) IsKind ¶ added in v0.17.0
func (gcvc *GameCenterViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*GameCenterViewController) LeaderboardCategory ¶ added in v0.17.0
func (gcvc *GameCenterViewController) LeaderboardCategory() string
LeaderboardCategory returns the leaderboard category.
func (*GameCenterViewController) LeaderboardIdentifier ¶ added in v0.17.0
func (gcvc *GameCenterViewController) LeaderboardIdentifier() string
LeaderboardIdentifier returns the leaderboard identifier.
func (*GameCenterViewController) LeaderboardTimeScope ¶ added in v0.17.0
func (gcvc *GameCenterViewController) LeaderboardTimeScope() LeaderboardTimeScope
LeaderboardTimeScope returns the leaderboard time scope.
func (*GameCenterViewController) String ¶ added in v0.17.0
func (gcvc *GameCenterViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*GameCenterViewController) ViewState ¶ added in v0.17.0
func (gcvc *GameCenterViewController) ViewState() GameCenterViewControllerState
ViewState returns the view state.
func (*GameCenterViewController) WithGameCenterDelegate ¶ added in v0.17.0
func (gcvc *GameCenterViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *GameCenterViewController
WithGameCenterDelegate sets the view controller’s delegate.
func (*GameCenterViewController) WithLeaderboardCategory ¶ added in v0.17.0
func (gcvc *GameCenterViewController) WithLeaderboardCategory(leaderboardCategory string) *GameCenterViewController
WithLeaderboardCategory sets the leaderboard category.
func (*GameCenterViewController) WithLeaderboardIdentifier ¶ added in v0.17.0
func (gcvc *GameCenterViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *GameCenterViewController
WithLeaderboardIdentifier sets the leaderboard identifier.
func (*GameCenterViewController) WithLeaderboardTimeScope ¶ added in v0.17.0
func (gcvc *GameCenterViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *GameCenterViewController
WithLeaderboardTimeScope sets the leaderboard time scope.
func (*GameCenterViewController) WithViewState ¶ added in v0.17.0
func (gcvc *GameCenterViewController) WithViewState(viewState GameCenterViewControllerState) *GameCenterViewController
WithViewState sets the view state.
type GameCenterViewControllerProvider ¶ added in v0.17.0
type GameCenterViewControllerProvider interface {
objref.Object
// contains filtered or unexported methods
}
GameCenterViewControllerProvider is accepted wherever a GKGameCenterViewController (or one of its subclasses) is expected.
type GameCenterViewControllerState ¶ added in v0.17.0
type GameCenterViewControllerState int64
The type of content for the view controller to present.
const ( // The view controller should present the default screen. // // Deprecated: since macOS 26.0. GameCenterViewControllerStateDefault GameCenterViewControllerState = -1 // The view controller should present leaderboard sets or leaderboards if there are no sets. GameCenterViewControllerStateLeaderboards GameCenterViewControllerState = 0 // The view controller should present a list of achievements. GameCenterViewControllerStateAchievements GameCenterViewControllerState = 1 // The view controller should present a list of challenges. // // Deprecated: since macOS 26.0. GameCenterViewControllerStateChallenges GameCenterViewControllerState = 2 // The view controller should present the local player’s profile. GameCenterViewControllerStateLocalPlayerProfile GameCenterViewControllerState = 3 // The view controller should present the dashboard. GameCenterViewControllerStateDashboard GameCenterViewControllerState = 4 // The view controller should present the friends list. GameCenterViewControllerStateLocalPlayerFriendsList GameCenterViewControllerState = 5 )
func (GameCenterViewControllerState) String ¶ added in v0.17.0
func (e GameCenterViewControllerState) String() string
String returns the GameCenterViewControllerState constant's name, or its numeric form when the value is not a known constant.
type GameSession ¶ added in v0.17.0
GameSession is an idiomatic wrapper over the Objective-C class GKGameSession.
A game session you can use to save game data, invite other players, and create turn-based and real-time game apps.
func CreateSessionInContainerWithTitleMaxConnectedPlayers ¶ added in v0.17.0
func CreateSessionInContainerWithTitleMaxConnectedPlayers(ctx context.Context, containerName string, title string, maxPlayers int) (result *GameSession, err error)
CreateSessionInContainerWithTitleMaxConnectedPlayers creates a new game session inside of an iCloud container.
CreateSessionInContainerWithTitleMaxConnectedPlayers blocks until the operation completes or ctx is cancelled.
func GameSessionFromID ¶ added in v0.17.0
func GameSessionFromID(id objc.ID) *GameSession
GameSessionFromID adopts an existing Objective-C object as a GameSession (nil for 0), retaining it and registering a release finalizer.
func LoadSessionWithIdentifier ¶ added in v0.17.0
func LoadSessionWithIdentifier(ctx context.Context, identifier string) (result *GameSession, err error)
LoadSessionWithIdentifier loads a specific game session.
LoadSessionWithIdentifier blocks until the operation completes or ctx is cancelled.
func NewGameSession ¶ added in v0.17.0
func NewGameSession() *GameSession
NewGameSession creates a new GameSession.
func (*GameSession) BadgedPlayers ¶ added in v0.17.0
func (gs *GameSession) BadgedPlayers() []*CloudPlayer
BadgedPlayers returns the badged players.
BadgedPlayers returns the collection as a Go slice.
func (*GameSession) ClearBadgeForPlayers ¶ added in v0.17.0
func (gs *GameSession) ClearBadgeForPlayers(ctx context.Context, players []*CloudPlayer) error
ClearBadgeForPlayers clears the badge from the designated players.
ClearBadgeForPlayers blocks until the operation completes or ctx is cancelled.
func (*GameSession) Description ¶ added in v0.17.0
func (gs *GameSession) Description() string
Description returns the object's -description text.
func (*GameSession) GetShareURL ¶ added in v0.17.0
GetShareURL retrieves the URL used to share a game session.
GetShareURL blocks until the operation completes or ctx is cancelled.
func (*GameSession) Identifier ¶ added in v0.17.0
func (gs *GameSession) Identifier() string
Identifier returns the identifier.
func (*GameSession) IsEqual ¶ added in v0.17.0
func (gs *GameSession) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*GameSession) IsKind ¶ added in v0.17.0
func (gs *GameSession) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*GameSession) LastModifiedDate ¶ added in v0.17.0
func (gs *GameSession) LastModifiedDate() time.Time
LastModifiedDate returns the last modified date.
func (*GameSession) LastModifiedPlayer ¶ added in v0.17.0
func (gs *GameSession) LastModifiedPlayer() *CloudPlayer
LastModifiedPlayer returns the last modified player.
func (*GameSession) LoadData ¶ added in v0.17.0
LoadData retrieves the game data from the current game session.
LoadData blocks until the operation completes or ctx is cancelled.
func (*GameSession) MaxNumberOfConnectedPlayers ¶ added in v0.17.0
func (gs *GameSession) MaxNumberOfConnectedPlayers() int
MaxNumberOfConnectedPlayers returns the max number of connected players.
func (*GameSession) Owner ¶ added in v0.17.0
func (gs *GameSession) Owner() *CloudPlayer
Owner returns the owner.
func (*GameSession) Players ¶ added in v0.17.0
func (gs *GameSession) Players() []*CloudPlayer
Players returns the players.
Players returns the collection as a Go slice.
func (*GameSession) PlayersWithConnectionState ¶ added in v0.17.0
func (gs *GameSession) PlayersWithConnectionState(state ConnectionState) []*CloudPlayer
PlayersWithConnectionState retrieves a list of players with the specified connection state.
func (*GameSession) SaveData ¶ added in v0.17.0
SaveData saves the current game session data.
SaveData blocks until the operation completes or ctx is cancelled.
func (*GameSession) SendDataWithTransportType ¶ added in v0.17.0
func (gs *GameSession) SendDataWithTransportType(ctx context.Context, data []byte, transport TransportType) error
SendDataWithTransportType sends the indicated data to all connected players.
SendDataWithTransportType blocks until the operation completes or ctx is cancelled.
func (*GameSession) SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayers ¶ added in v0.17.0
func (gs *GameSession) SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayers(ctx context.Context, key string, arguments []string, data []byte, players []*CloudPlayer, badgePlayers bool) error
SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayers sends a message to players in a game session.
SendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayers blocks until the operation completes or ctx is cancelled.
func (*GameSession) SetConnectionState ¶ added in v0.17.0
func (gs *GameSession) SetConnectionState(ctx context.Context, state ConnectionState) error
SetConnectionState sets the connection state for the player.
SetConnectionState blocks until the operation completes or ctx is cancelled.
func (*GameSession) String ¶ added in v0.17.0
func (gs *GameSession) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*GameSession) Title ¶ added in v0.17.0
func (gs *GameSession) Title() string
Title returns the title.
type GameSessionErrorCode
deprecated
added in
v0.17.0
type GameSessionErrorCode int64
Error codes for the game session domain.
Deprecated: GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead.
const ( // Deprecated: GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead. GameSessionErrorUnknown GameSessionErrorCode = 1 // Deprecated: GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead. GameSessionErrorNotAuthenticated GameSessionErrorCode = 2 GameSessionErrorSessionConflict GameSessionErrorCode = 3 GameSessionErrorConnectionCancelledByUser GameSessionErrorCode = 5 GameSessionErrorConnectionFailed GameSessionErrorCode = 6 GameSessionErrorSessionHasMaxConnectedPlayers GameSessionErrorCode = 7 GameSessionErrorSendDataNotConnected GameSessionErrorCode = 8 GameSessionErrorSendDataNoRecipients GameSessionErrorCode = 9 GameSessionErrorSendDataNotReachable GameSessionErrorCode = 10 GameSessionErrorSendRateLimitReached GameSessionErrorCode = 11 GameSessionErrorBadContainer GameSessionErrorCode = 12 GameSessionErrorCloudQuotaExceeded GameSessionErrorCode = 13 GameSessionErrorNetworkFailure GameSessionErrorCode = 14 GameSessionErrorCloudDriveDisabled GameSessionErrorCode = 15 GameSessionErrorInvalidSession GameSessionErrorCode = 16 )
func (GameSessionErrorCode) String ¶ added in v0.17.0
func (e GameSessionErrorCode) String() string
String returns the GameSessionErrorCode constant's name, or its numeric form when the value is not a known constant.
type GameSessionEventListener ¶ added in v0.17.0
type GameSessionEventListener interface {
}
GameSessionEventListener is the Go form of the Objective-C protocol GKGameSessionEventListener.
type HIDReportCommandType ¶
type HIDReportCommandType int32
Type of the report command for DriverKit driver
const ( KIOHIDReportCommandSetReport HIDReportCommandType = 0 KIOHIDReportCommandGetReport HIDReportCommandType = 1 )
func (HIDReportCommandType) String ¶
func (e HIDReportCommandType) String() string
String returns the HIDReportCommandType constant's name, or its numeric form when the value is not a known constant.
type IOHIDButtonModes ¶
type IOHIDButtonModes int32
const ( KIOHIDButtonMode_BothLeftClicks IOHIDButtonModes = 0 KIOHIDButtonMode_ReverseLeftRightClicks IOHIDButtonModes = 1 KIOHIDButtonMode_EnableRightClick IOHIDButtonModes = 2 )
func (IOHIDButtonModes) String ¶
func (e IOHIDButtonModes) String() string
String returns the IOHIDButtonModes constant's name, or its numeric form when the value is not a known constant.
type IOHIDElementCommitDirection ¶
type IOHIDElementCommitDirection int32
Commit direction passed in to the commit() function of an IOHIDElement.
const ( KIOHIDElementCommitDirectionIn IOHIDElementCommitDirection = 0 KIOHIDElementCommitDirectionOut IOHIDElementCommitDirection = 1 )
func (IOHIDElementCommitDirection) String ¶
func (e IOHIDElementCommitDirection) String() string
String returns the IOHIDElementCommitDirection constant's name, or its numeric form when the value is not a known constant.
type Invite ¶ added in v0.17.0
Invite is an idiomatic wrapper over the Objective-C class GKInvite.
An invitation to join a match sent to the local player from another player.
func InviteFromID ¶ added in v0.17.0
InviteFromID adopts an existing Objective-C object as a Invite (nil for 0), retaining it and registering a release finalizer.
func (*Invite) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Invite) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Invite) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Invite) PlayerAttributes ¶ added in v0.17.0
PlayerAttributes returns player attributes from inviter's match request
func (*Invite) PlayerGroup ¶ added in v0.17.0
PlayerGroup returns player group from inviter's match request
type InviteEventListener ¶ added in v0.17.0
type InviteEventListener interface {
}
InviteEventListener is the Go form of the Objective-C protocol GKInviteEventListener.
type InviteRecipientResponse ¶ added in v0.17.0
type InviteRecipientResponse int64
A player’s response to an invitation to join a match.
const ( // A response when the player accepts the invitation. InviteRecipientResponseAccepted InviteRecipientResponse = 0 // A response when the player rejects the invitation. InviteRecipientResponseDeclined InviteRecipientResponse = 1 // A response when the system fails to deliver the invitation to the player. InviteRecipientResponseFailed InviteRecipientResponse = 2 // A response when the player isn’t running a compatible version of the game. InviteRecipientResponseIncompatible InviteRecipientResponse = 3 // A response when the system can’t contact the player. InviteRecipientResponseUnableToConnect InviteRecipientResponse = 4 // A response when the invitation times out because the player doesn’t answer it. InviteRecipientResponseNoAnswer InviteRecipientResponse = 5 // The player accepted the invitation. // // Deprecated: since macOS 15.4. InviteeResponseAccepted InviteRecipientResponse = 0 // The player rejected the invitation. // // Deprecated: since macOS 15.4. InviteeResponseDeclined InviteRecipientResponse = 1 // The invitation was unable to be delivered. // // Deprecated: since macOS 15.4. InviteeResponseFailed InviteRecipientResponse = 2 // The invitee isn’t running a compatible version of your game. // // Deprecated: since macOS 15.4. InviteeResponseIncompatible InviteRecipientResponse = 3 // The invitee couldn’t be contacted. // // Deprecated: since macOS 15.4. InviteeResponseUnableToConnect InviteRecipientResponse = 4 // The invitation timed out without an answer. // // Deprecated: since macOS 15.4. InviteeResponseNoAnswer InviteRecipientResponse = 5 )
func (InviteRecipientResponse) String ¶ added in v0.17.0
func (e InviteRecipientResponse) String() string
String returns the InviteRecipientResponse constant's name, or its numeric form when the value is not a known constant.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type Leaderboard ¶ added in v0.17.0
Leaderboard is an idiomatic wrapper over the Objective-C class GKLeaderboard.
A leaderboard for a game that Game Center stores.
func LeaderboardFromID ¶ added in v0.17.0
func LeaderboardFromID(id objc.ID) *Leaderboard
LeaderboardFromID adopts an existing Objective-C object as a Leaderboard (nil for 0), retaining it and registering a release finalizer.
func NewLeaderboard ¶ added in v0.17.0
func NewLeaderboard() *Leaderboard
NewLeaderboard creates a new Leaderboard.
func NewLeaderboardWithPlayerIDs ¶ added in v0.17.0
func NewLeaderboardWithPlayerIDs(playerIDs []string) *Leaderboard
NewLeaderboardWithPlayerIDs creates a new Leaderboard.
func NewLeaderboardWithPlayers ¶ added in v0.17.0
func NewLeaderboardWithPlayers(players []*Player) *Leaderboard
NewLeaderboardWithPlayers 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.
func (*Leaderboard) ActivityIdentifier ¶ added in v0.17.0
func (l *Leaderboard) ActivityIdentifier() string
ActivityIdentifier returns the identifier of the game activity associated with this leaderboard, as configured by the developer in App Store Connect.
func (*Leaderboard) ActivityProperties ¶ added in v0.17.0
func (l *Leaderboard) ActivityProperties() map[string]string
ActivityProperties returns the properties when associating this leaderboard with a game activity, as configured by the developer in App Store Connect.
func (*Leaderboard) BaseLeaderboardID ¶ added in v0.17.0
func (l *Leaderboard) BaseLeaderboardID() string
BaseLeaderboardID returns leaderboard ID defined in App Store Connect that this instance is associated with
func (*Leaderboard) Category ¶ added in v0.17.0
func (l *Leaderboard) Category() string
Category returns the category.
func (*Leaderboard) Description ¶ added in v0.17.0
func (l *Leaderboard) Description() string
Description returns the object's -description text.
func (*Leaderboard) Duration ¶ added in v0.17.0
func (l *Leaderboard) Duration() float64
Duration returns duration from startDate during which this leaderboard instance accepts score submissions (only applicable to recurring leaderboards)
func (*Leaderboard) GroupIdentifier ¶ added in v0.17.0
func (l *Leaderboard) GroupIdentifier() string
GroupIdentifier set when leaderboards have been designated a game group; set when loadLeaderboardsWithCompletionHandler has been called for leaderboards that support game groups
func (*Leaderboard) Identifier ¶ added in v0.17.0
func (l *Leaderboard) Identifier() string
Identifier returns leaderboardID. If nil, fetch the aggregate leaderboard.
func (*Leaderboard) IsEqual ¶ added in v0.17.0
func (l *Leaderboard) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Leaderboard) IsHidden ¶ added in v0.17.0
func (l *Leaderboard) IsHidden() bool
IsHidden reports whether the current leaderboard isn't visible in Game Center views. You can still submit scores to a hidden leaderboard.
func (*Leaderboard) IsKind ¶ added in v0.17.0
func (l *Leaderboard) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Leaderboard) IsLoading ¶ added in v0.17.0
func (l *Leaderboard) IsLoading() bool
IsLoading reports whether this property is true if the leaderboard is currently loading
func (*Leaderboard) LeaderboardDescription ¶ added in v0.17.0
func (l *Leaderboard) LeaderboardDescription() string
LeaderboardDescription returns the description of this Leaderboard as configured by the developer in App Store Connect.
func (*Leaderboard) LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler ¶ added in v0.18.0
func (l *Leaderboard) LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler(playerScope LeaderboardPlayerScope, timeScope LeaderboardTimeScope, range_ foundation.NSRange, completionHandler func(unsafe.Pointer, obj.Object, int, unsafe.Pointer))
LoadEntriesForPlayerScopeTimeScopeRangeCompletionHandler returns the scores for the local player and other players for the specified type of player, time period, and ranks.
func (*Leaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler ¶ added in v0.18.0
func (l *Leaderboard) LoadEntriesForPlayersTimeScopeCompletionHandler(players []*Player, timeScope LeaderboardTimeScope, completionHandler func(unsafe.Pointer, obj.Object, unsafe.Pointer))
LoadEntriesForPlayersTimeScopeCompletionHandler returns the scores for the local player and other players for the specified time period.
func (*Leaderboard) LoadImage ¶ added in v0.17.0
LoadImage loads the image for the leaderboard.
LoadImage blocks until the operation completes or ctx is cancelled.
func (*Leaderboard) LoadPreviousOccurrenceWithCompletionHandler ¶ added in v0.18.0
func (l *Leaderboard) LoadPreviousOccurrenceWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
LoadPreviousOccurrenceWithCompletionHandler loads the previous recurring leaderboard occurrence that the player submits a score to.
func (*Leaderboard) LoadScores ¶ added in v0.17.0
LoadScores load the scores for this leader board asynchronously. Error will be nil on success. Possible reasons for error: 1. Communications problem 2. Unauthenticated player
LoadScores blocks until the operation completes or ctx is cancelled.
func (*Leaderboard) LocalPlayerScore ¶ added in v0.17.0
func (l *Leaderboard) LocalPlayerScore() *Score
LocalPlayerScore returns the local player's score
func (*Leaderboard) MaxRange ¶ added in v0.17.0
func (l *Leaderboard) MaxRange() int
MaxRange returns the maxRange which represents the size of the leaderboard is not valid until loadScores: has completed.
func (*Leaderboard) NextStartDate ¶ added in v0.17.0
func (l *Leaderboard) NextStartDate() time.Time
NextStartDate returns date and time the next instance will start accepting score submissions (only applicable to recurring leaderboards)
func (*Leaderboard) PlayerScope ¶ added in v0.17.0
func (l *Leaderboard) PlayerScope() LeaderboardPlayerScope
PlayerScope returns filter on friends. Does not apply to leaderboard initialized with players.
func (*Leaderboard) Range ¶ added in v0.17.0
func (l *Leaderboard) Range() foundation.NSRange
Range returns 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.
func (*Leaderboard) ReleaseState ¶ added in v0.17.0
func (l *Leaderboard) ReleaseState() ReleaseState
ReleaseState returns the release state of the leaderboard in App Store Connect.
func (*Leaderboard) Scores ¶ added in v0.17.0
func (l *Leaderboard) Scores() []*Score
Scores returns scores are not valid until loadScores: has completed.
Scores returns the collection as a Go slice.
func (*Leaderboard) StartDate ¶ added in v0.17.0
func (l *Leaderboard) StartDate() time.Time
StartDate returns date and time this instance started accepting score submissions (only applicable to recurring leaderboards)
func (*Leaderboard) String ¶ added in v0.17.0
func (l *Leaderboard) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Leaderboard) SubmitScoreContextPlayer ¶ added in v0.17.0
func (l *Leaderboard) SubmitScoreContextPlayer(ctx context.Context, score int, context_ int, player *Player) error
SubmitScoreContextPlayer submits a score to the leaderboard.
SubmitScoreContextPlayer blocks until the operation completes or ctx is cancelled.
func (*Leaderboard) TimeScope ¶ added in v0.17.0
func (l *Leaderboard) TimeScope() LeaderboardTimeScope
TimeScope returns the time scope.
func (*Leaderboard) Title ¶ added in v0.17.0
func (l *Leaderboard) Title() string
Title returns localized title
func (*Leaderboard) Type ¶ added in v0.17.0
func (l *Leaderboard) Type() LeaderboardType
Type returns type of leaderboard
func (*Leaderboard) WithCategory ¶ added in v0.17.0
func (l *Leaderboard) WithCategory(category string) *Leaderboard
WithCategory sets the category.
func (*Leaderboard) WithIdentifier ¶ added in v0.17.0
func (l *Leaderboard) WithIdentifier(identifier string) *Leaderboard
WithIdentifier sets leaderboardID. If nil, fetch the aggregate leaderboard.
func (*Leaderboard) WithPlayerScope ¶ added in v0.17.0
func (l *Leaderboard) WithPlayerScope(playerScope LeaderboardPlayerScope) *Leaderboard
WithPlayerScope sets filter on friends. Does not apply to leaderboard initialized with players.
func (*Leaderboard) WithRange ¶ added in v0.17.0
func (l *Leaderboard) WithRange(range_ foundation.NSRange) *Leaderboard
WithRange sets 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.
func (*Leaderboard) WithTimeScope ¶ added in v0.17.0
func (l *Leaderboard) WithTimeScope(timeScope LeaderboardTimeScope) *Leaderboard
WithTimeScope sets the time scope.
type LeaderboardEntry ¶ added in v0.17.0
LeaderboardEntry is an idiomatic wrapper over the Objective-C class GKLeaderboardEntry.
Information about a single score by a player on a leaderboard.
func LeaderboardEntryFromID ¶ added in v0.17.0
func LeaderboardEntryFromID(id objc.ID) *LeaderboardEntry
LeaderboardEntryFromID adopts an existing Objective-C object as a LeaderboardEntry (nil for 0), retaining it and registering a release finalizer.
func NewLeaderboardEntry ¶ added in v0.17.0
func NewLeaderboardEntry() *LeaderboardEntry
NewLeaderboardEntry creates a new LeaderboardEntry.
func (*LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletion ¶ added in v0.18.0
func (le *LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletion wraps the corresponding Objective-C method.
func (*LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletionHandler ¶ added in v0.18.0
func (le *LeaderboardEntry) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletionHandler wraps the corresponding Objective-C method.
func (*LeaderboardEntry) Context ¶ added in v0.17.0
func (le *LeaderboardEntry) Context() int
Context returns the context.
func (*LeaderboardEntry) Date ¶ added in v0.17.0
func (le *LeaderboardEntry) Date() time.Time
Date returns the date.
func (*LeaderboardEntry) Description ¶ added in v0.17.0
func (le *LeaderboardEntry) Description() string
Description returns the object's -description text.
func (*LeaderboardEntry) FormattedScore ¶ added in v0.17.0
func (le *LeaderboardEntry) FormattedScore() string
FormattedScore returns the formatted score.
func (*LeaderboardEntry) IsEqual ¶ added in v0.17.0
func (le *LeaderboardEntry) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*LeaderboardEntry) IsKind ¶ added in v0.17.0
func (le *LeaderboardEntry) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*LeaderboardEntry) Player ¶ added in v0.17.0
func (le *LeaderboardEntry) Player() *Player
Player returns the player.
func (*LeaderboardEntry) Rank ¶ added in v0.17.0
func (le *LeaderboardEntry) Rank() int
Rank returns the rank.
func (*LeaderboardEntry) Score ¶ added in v0.17.0
func (le *LeaderboardEntry) Score() int
Score returns the score.
func (*LeaderboardEntry) String ¶ added in v0.17.0
func (le *LeaderboardEntry) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type LeaderboardPlayerScope ¶ added in v0.17.0
type LeaderboardPlayerScope int64
Specifies the type of players for filtering data.
const ( LeaderboardPlayerScopeGlobal LeaderboardPlayerScope = 0 LeaderboardPlayerScopeFriendsOnly LeaderboardPlayerScope = 1 )
func (LeaderboardPlayerScope) String ¶ added in v0.17.0
func (e LeaderboardPlayerScope) String() string
String returns the LeaderboardPlayerScope constant's name, or its numeric form when the value is not a known constant.
type LeaderboardScore ¶ added in v0.17.0
LeaderboardScore is an idiomatic wrapper over the Objective-C class GKLeaderboardScore.
Information about a player’s score on a leaderboard.
func LeaderboardScoreFromID ¶ added in v0.17.0
func LeaderboardScoreFromID(id objc.ID) *LeaderboardScore
LeaderboardScoreFromID adopts an existing Objective-C object as a LeaderboardScore (nil for 0), retaining it and registering a release finalizer.
func NewLeaderboardScore ¶ added in v0.17.0
func NewLeaderboardScore() *LeaderboardScore
NewLeaderboardScore creates a new LeaderboardScore.
func (*LeaderboardScore) Context ¶ added in v0.17.0
func (ls *LeaderboardScore) Context() int
Context returns an integer value that your game uses.
func (*LeaderboardScore) Description ¶ added in v0.17.0
func (ls *LeaderboardScore) Description() string
Description returns the object's -description text.
func (*LeaderboardScore) IsEqual ¶ added in v0.17.0
func (ls *LeaderboardScore) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*LeaderboardScore) IsKind ¶ added in v0.17.0
func (ls *LeaderboardScore) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*LeaderboardScore) LeaderboardID ¶ added in v0.17.0
func (ls *LeaderboardScore) LeaderboardID() string
LeaderboardID returns the ID that Game Center uses for the leaderboard.
func (*LeaderboardScore) Player ¶ added in v0.17.0
func (ls *LeaderboardScore) Player() *Player
Player returns the player who earns the score.
func (*LeaderboardScore) String ¶ added in v0.17.0
func (ls *LeaderboardScore) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*LeaderboardScore) Value ¶ added in v0.17.0
func (ls *LeaderboardScore) Value() int
Value returns the score that the player earns.
func (*LeaderboardScore) WithContext ¶ added in v0.17.0
func (ls *LeaderboardScore) WithContext(context_ int) *LeaderboardScore
WithContext sets an integer value that your game uses.
func (*LeaderboardScore) WithLeaderboardID ¶ added in v0.17.0
func (ls *LeaderboardScore) WithLeaderboardID(leaderboardID string) *LeaderboardScore
WithLeaderboardID sets the ID that Game Center uses for the leaderboard.
func (*LeaderboardScore) WithPlayer ¶ added in v0.17.0
func (ls *LeaderboardScore) WithPlayer(player PlayerProvider) *LeaderboardScore
WithPlayer sets the player who earns the score.
func (*LeaderboardScore) WithValue ¶ added in v0.17.0
func (ls *LeaderboardScore) WithValue(value int) *LeaderboardScore
WithValue sets the score that the player earns.
type LeaderboardSet ¶ added in v0.17.0
LeaderboardSet is an idiomatic wrapper over the Objective-C class GKLeaderboardSet.
Organizes leaderboards into logical and coherent groups.
func LeaderboardSetFromID ¶ added in v0.17.0
func LeaderboardSetFromID(id objc.ID) *LeaderboardSet
LeaderboardSetFromID adopts an existing Objective-C object as a LeaderboardSet (nil for 0), retaining it and registering a release finalizer.
func NewLeaderboardSet ¶ added in v0.17.0
func NewLeaderboardSet() *LeaderboardSet
NewLeaderboardSet creates a new LeaderboardSet.
func (*LeaderboardSet) Description ¶ added in v0.17.0
func (ls *LeaderboardSet) Description() string
Description returns the object's -description text.
func (*LeaderboardSet) GroupIdentifier ¶ added in v0.17.0
func (ls *LeaderboardSet) GroupIdentifier() string
GroupIdentifier set when leaderboardSets have been designated a game group; set when loadLeaderboardSetsWithCompletionHandler has been called for leaderboards that support game groups
func (*LeaderboardSet) Identifier ¶ added in v0.17.0
func (ls *LeaderboardSet) Identifier() string
Identifier returns leaderboard set.
func (*LeaderboardSet) IsEqual ¶ added in v0.17.0
func (ls *LeaderboardSet) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*LeaderboardSet) IsKind ¶ added in v0.17.0
func (ls *LeaderboardSet) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*LeaderboardSet) LoadImage ¶ added in v0.17.0
LoadImage loads the localized image that you associate with the leaderboard set.
LoadImage blocks until the operation completes or ctx is cancelled.
func (*LeaderboardSet) LoadLeaderboards ¶ added in v0.17.0
LoadLeaderboards loads all of the leaderboards for the current leaderboard set.
LoadLeaderboards blocks until the operation completes or ctx is cancelled.
func (*LeaderboardSet) LoadLeaderboardsWithHandler ¶ added in v0.17.0
func (ls *LeaderboardSet) LoadLeaderboardsWithHandler(ctx context.Context) (result obj.Object, err error)
LoadLeaderboardsWithHandler loads the leaderboards in the leaderboard set.
LoadLeaderboardsWithHandler blocks until the operation completes or ctx is cancelled.
func (*LeaderboardSet) String ¶ added in v0.17.0
func (ls *LeaderboardSet) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*LeaderboardSet) Title ¶ added in v0.17.0
func (ls *LeaderboardSet) Title() string
Title returns localized set title.
func (*LeaderboardSet) WithIdentifier ¶ added in v0.17.0
func (ls *LeaderboardSet) WithIdentifier(identifier string) *LeaderboardSet
WithIdentifier sets the identifier for the leaderboard set.
type LeaderboardTimeScope ¶ added in v0.17.0
type LeaderboardTimeScope int64
Specifies the time period for filtering data.
const ( LeaderboardTimeScopeToday LeaderboardTimeScope = 0 LeaderboardTimeScopeWeek LeaderboardTimeScope = 1 LeaderboardTimeScopeAllTime LeaderboardTimeScope = 2 )
func (LeaderboardTimeScope) String ¶ added in v0.17.0
func (e LeaderboardTimeScope) String() string
String returns the LeaderboardTimeScope constant's name, or its numeric form when the value is not a known constant.
type LeaderboardType ¶ added in v0.17.0
type LeaderboardType int64
Specifies whether a leaderboard is recurring.
const ( LeaderboardTypeClassic LeaderboardType = 0 LeaderboardTypeRecurring LeaderboardType = 1 )
func (LeaderboardType) String ¶ added in v0.17.0
func (e LeaderboardType) String() string
String returns the LeaderboardType constant's name, or its numeric form when the value is not a known constant.
type LeaderboardViewController ¶ added in v0.17.0
type LeaderboardViewController struct {
GameCenterViewController
}
LeaderboardViewController is an idiomatic wrapper over the Objective-C class GKLeaderboardViewController.
It embeds GameCenterViewController, promoting that type's methods.
The GKLeaderboardViewController class provides a standard user interface that displays leaderboard scores to the player. If the GKGameCenterViewController class is available, you should use it instead.
func LeaderboardViewControllerFromID ¶ added in v0.17.0
func LeaderboardViewControllerFromID(id objc.ID) *LeaderboardViewController
LeaderboardViewControllerFromID adopts an existing Objective-C object as a LeaderboardViewController (nil for 0), retaining it and registering a release finalizer.
func NewLeaderboardViewController ¶ added in v0.17.0
func NewLeaderboardViewController() *LeaderboardViewController
NewLeaderboardViewController creates a new LeaderboardViewController.
func (*LeaderboardViewController) Category ¶ added in v0.17.0
func (lvc *LeaderboardViewController) Category() string
Category returns the category.
func (*LeaderboardViewController) TimeScope ¶ added in v0.17.0
func (lvc *LeaderboardViewController) TimeScope() LeaderboardTimeScope
TimeScope returns the time scope.
func (*LeaderboardViewController) WithCategory ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithCategory(category string) *LeaderboardViewController
WithCategory sets the named leaderboard that is displayed by the view controller.
func (*LeaderboardViewController) WithGameCenterDelegate ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithGameCenterDelegate(gameCenterDelegate GameCenterControllerDelegate) *LeaderboardViewController
WithGameCenterDelegate sets the view controller’s delegate.
func (*LeaderboardViewController) WithLeaderboardCategory ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithLeaderboardCategory(leaderboardCategory string) *LeaderboardViewController
WithLeaderboardCategory sets the leaderboard category.
func (*LeaderboardViewController) WithLeaderboardDelegate ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithLeaderboardDelegate(leaderboardDelegate LeaderboardViewControllerDelegate) *LeaderboardViewController
WithLeaderboardDelegate sets the view controller’s delegate.
func (*LeaderboardViewController) WithLeaderboardIdentifier ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithLeaderboardIdentifier(leaderboardIdentifier string) *LeaderboardViewController
WithLeaderboardIdentifier sets the leaderboard identifier.
func (*LeaderboardViewController) WithLeaderboardTimeScope ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithLeaderboardTimeScope(leaderboardTimeScope LeaderboardTimeScope) *LeaderboardViewController
WithLeaderboardTimeScope sets the leaderboard time scope.
func (*LeaderboardViewController) WithTimeScope ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithTimeScope(timeScope LeaderboardTimeScope) *LeaderboardViewController
WithTimeScope sets a time filter used to restrict which scores are displayed to the player.
func (*LeaderboardViewController) WithViewState ¶ added in v0.17.0
func (lvc *LeaderboardViewController) WithViewState(viewState GameCenterViewControllerState) *LeaderboardViewController
WithViewState sets the view state.
type LeaderboardViewControllerDelegate ¶ added in v0.17.0
type LeaderboardViewControllerDelegate interface {
// LeaderboardViewControllerDidFinish the leaderboard view has finished
LeaderboardViewControllerDidFinish(viewController *LeaderboardViewController)
}
LeaderboardViewControllerDelegate receives the callbacks of the Objective-C protocol GKLeaderboardViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (LeaderboardViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type LocalPlayer ¶ added in v0.17.0
type LocalPlayer struct {
Player
}
LocalPlayer is an idiomatic wrapper over the Objective-C class GKLocalPlayer.
It embeds Player, promoting that type's methods.
The local player who signs in to Game Center on the device running the game.
func GKLocalPlayerLocalPlayer ¶
func GKLocalPlayerLocalPlayer() *LocalPlayer
GKLocalPlayerLocalPlayer returns the gk local player local player.
func Local ¶ added in v0.17.0
func Local() *LocalPlayer
Local returns 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 LocalPlayerFromID ¶ added in v0.17.0
func LocalPlayerFromID(id objc.ID) *LocalPlayer
LocalPlayerFromID adopts an existing Objective-C object as a LocalPlayer (nil for 0), retaining it and registering a release finalizer.
func NewLocalPlayer ¶ added in v0.17.0
func NewLocalPlayer() *LocalPlayer
NewLocalPlayer creates a new LocalPlayer.
func (*LocalPlayer) Authenticate ¶ added in v0.17.0
func (lp *LocalPlayer) Authenticate(ctx context.Context) error
Authenticate wraps the corresponding Objective-C method.
Authenticate blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) DeleteSavedGamesWithName ¶ added in v0.17.0
func (lp *LocalPlayer) DeleteSavedGamesWithName(ctx context.Context, name string) error
DeleteSavedGamesWithName deletes saved games with the specified filename.
DeleteSavedGamesWithName blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) FetchItemsForIdentityVerificationSignature ¶ added in v0.18.0
func (lp *LocalPlayer) FetchItemsForIdentityVerificationSignature(completionHandler func(obj.Object, obj.Object, obj.Object, uint64, unsafe.Pointer))
FetchItemsForIdentityVerificationSignature generates a signature that you can use to authenticate the local player on your own server.
func (*LocalPlayer) FetchSavedGames ¶ added in v0.17.0
FetchSavedGames retrieves all available saved games.
FetchSavedGames blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) Friends ¶ added in v0.17.0
func (lp *LocalPlayer) Friends() []string
Friends returns the friends.
Friends returns the collection as a Go slice.
func (*LocalPlayer) GenerateIdentityVerificationSignatureWithCompletionHandler ¶ added in v0.18.0
func (lp *LocalPlayer) GenerateIdentityVerificationSignatureWithCompletionHandler(completionHandler func(obj.Object, obj.Object, obj.Object, uint64, unsafe.Pointer))
GenerateIdentityVerificationSignatureWithCompletionHandler generates a signature allowing 3rd party server to authenticate the GKLocalPlayer Possible reasons for error: 1. Communications problem 2. Unauthenticated player
func (*LocalPlayer) IsAuthenticated ¶ added in v0.17.0
func (lp *LocalPlayer) IsAuthenticated() bool
IsAuthenticated reports whether authentication state
func (*LocalPlayer) IsMultiplayerGamingRestricted ¶ added in v0.17.0
func (lp *LocalPlayer) IsMultiplayerGamingRestricted() bool
IsMultiplayerGamingRestricted reports whether a Boolean value that declares whether or not multiplayer gaming is restricted on this device.
func (*LocalPlayer) IsPersonalizedCommunicationRestricted ¶ added in v0.17.0
func (lp *LocalPlayer) IsPersonalizedCommunicationRestricted() bool
IsPersonalizedCommunicationRestricted reports whether 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 (*LocalPlayer) IsPresentingFriendRequestViewController ¶ added in v0.17.0
func (lp *LocalPlayer) IsPresentingFriendRequestViewController() bool
IsPresentingFriendRequestViewController reports whether observable property that becomes true when the friend request view controller is displayed. It becomes false when it is dismissed
func (*LocalPlayer) IsUnderage ¶ added in v0.17.0
func (lp *LocalPlayer) IsUnderage() bool
IsUnderage reports whether indicates if a player is under age
func (*LocalPlayer) LoadChallengableFriends ¶ added in v0.17.0
LoadChallengableFriends loads players to whom the local player can issue a challenge.
LoadChallengableFriends blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadDefaultLeaderboardCategoryID ¶ added in v0.17.0
func (lp *LocalPlayer) LoadDefaultLeaderboardCategoryID(ctx context.Context) (result string, err error)
LoadDefaultLeaderboardCategoryID loads default leaderboard category ID.
LoadDefaultLeaderboardCategoryID blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadDefaultLeaderboardIdentifier ¶ added in v0.17.0
func (lp *LocalPlayer) LoadDefaultLeaderboardIdentifier(ctx context.Context) (result string, err error)
LoadDefaultLeaderboardIdentifier loads the identifier for the local player’s default leaderboard.
LoadDefaultLeaderboardIdentifier blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadFriendPlayers ¶ added in v0.17.0
LoadFriendPlayers loads friend players.
LoadFriendPlayers blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadFriends ¶ added in v0.17.0
LoadFriends this method is obsolete. It will never be invoked and its implementation does nothing**
LoadFriends blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadFriendsAuthorizationStatus ¶ added in v0.18.0
func (lp *LocalPlayer) LoadFriendsAuthorizationStatus(completionHandler func(FriendsAuthorizationStatus, unsafe.Pointer))
LoadFriendsAuthorizationStatus returns whether the player authorizes your game to access their friends list.
func (*LocalPlayer) LoadFriendsWithIdentifiers ¶ added in v0.17.0
func (lp *LocalPlayer) LoadFriendsWithIdentifiers(ctx context.Context, identifiers []string) (result obj.Object, err error)
LoadFriendsWithIdentifiers loads the player’s friends list, scoped by the identifiers, if the player and their friends grant access.
LoadFriendsWithIdentifiers blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) LoadRecentPlayers ¶ added in v0.17.0
LoadRecentPlayers loads players from the friends list or players that recently participated in a game with the local player.
LoadRecentPlayers blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) PresentFriendRequestCreatorFromWindow ¶ added in v0.17.0
func (lp *LocalPlayer) PresentFriendRequestCreatorFromWindow(window obj.Object) error
PresentFriendRequestCreatorFromWindow opens the Messages app with a sheet for the player to request friends.
func (*LocalPlayer) ResolveConflictingSavedGamesWithData ¶ added in v0.17.0
func (lp *LocalPlayer) ResolveConflictingSavedGamesWithData(ctx context.Context, conflictingSavedGames []*SavedGame, data []byte) (result obj.Object, err error)
ResolveConflictingSavedGamesWithData replaces duplicate saved games that use the same filename with one file containing the specified game data.
ResolveConflictingSavedGamesWithData blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) SaveGameDataWithName ¶ added in v0.17.0
func (lp *LocalPlayer) SaveGameDataWithName(ctx context.Context, data []byte, name string) (result *SavedGame, err error)
SaveGameDataWithName saves game data with the specified name.
SaveGameDataWithName blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) SetDefaultLeaderboardCategoryID ¶ added in v0.17.0
func (lp *LocalPlayer) SetDefaultLeaderboardCategoryID(ctx context.Context, categoryID string) error
SetDefaultLeaderboardCategoryID wraps the corresponding Objective-C method.
SetDefaultLeaderboardCategoryID blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) SetDefaultLeaderboardIdentifier ¶ added in v0.17.0
func (lp *LocalPlayer) SetDefaultLeaderboardIdentifier(ctx context.Context, leaderboardIdentifier string) error
SetDefaultLeaderboardIdentifier sets the local player’s default leaderboard.
SetDefaultLeaderboardIdentifier blocks until the operation completes or ctx is cancelled.
func (*LocalPlayer) UnregisterAllListeners ¶ added in v0.17.0
func (lp *LocalPlayer) UnregisterAllListeners()
UnregisterAllListeners unregisters all listeners in your game.
func (*LocalPlayer) WithAuthenticateHandler ¶ added in v0.18.0
func (lp *LocalPlayer) WithAuthenticateHandler(authenticateHandler func(obj.Object, unsafe.Pointer)) *LocalPlayer
WithAuthenticateHandler sets a handler that GameKit calls while initializing the local player.
type LocalPlayerListener ¶ added in v0.17.0
type LocalPlayerListener interface {
}
LocalPlayerListener is the Go form of the Objective-C protocol GKLocalPlayerListener.
type MDLabelDomain ¶
type MDLabelDomain int32
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
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type Match ¶ added in v0.17.0
Match is an idiomatic wrapper over the Objective-C class GKMatch.
A peer-to-peer network between a group of players that sign into Game Center.
func MatchFromID ¶ added in v0.17.0
MatchFromID adopts an existing Objective-C object as a Match (nil for 0), retaining it and registering a release finalizer.
func (*Match) ChooseBestHostPlayer ¶ added in v0.17.0
ChooseBestHostPlayer determines the best player in the game to act as the server for a client-server match.
ChooseBestHostPlayer blocks until the operation completes or ctx is cancelled.
func (*Match) ChooseBestHostingPlayer ¶ added in v0.17.0
ChooseBestHostingPlayer determines the best player in the game to act as the server for a client-server topology.
ChooseBestHostingPlayer blocks until the operation completes or ctx is cancelled.
func (*Match) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Match) Disconnect ¶ added in v0.17.0
func (m *Match) Disconnect()
Disconnect disconnects the local player from the match.
func (*Match) ExpectedPlayerCount ¶ added in v0.17.0
ExpectedPlayerCount returns the expected player count.
func (*Match) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Match) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Match) PlayerIDs ¶ added in v0.17.0
PlayerIDs returns the player i ds.
PlayerIDs returns the collection as a Go slice.
func (*Match) PlayerProperties ¶ added in v0.17.0
PlayerProperties returns the player properties.
func (*Match) Players ¶ added in v0.17.0
Players returns the players.
Players returns the collection as a Go slice.
func (*Match) Properties ¶ added in v0.18.0
Properties returns the properties.
func (*Match) Rematch ¶ added in v0.17.0
Rematch creates a new match with the players from an existing match.
Rematch blocks until the operation completes or ctx is cancelled.
func (*Match) SendDataToAllPlayersWithDataMode ¶ added in v0.17.0
func (m *Match) SendDataToAllPlayersWithDataMode(data []byte, mode MatchSendDataMode) error
SendDataToAllPlayersWithDataMode transmits data to all players connected to the match.
func (*Match) SendDataToPlayersDataMode ¶ added in v0.17.0
func (m *Match) SendDataToPlayersDataMode(data []byte, players []*Player, mode MatchSendDataMode) error
SendDataToPlayersDataMode transmits data to one or more players connected to the match.
func (*Match) SendDataToPlayersWithDataMode ¶ added in v0.17.0
func (m *Match) SendDataToPlayersWithDataMode(data []byte, playerIDs []string, mode MatchSendDataMode) error
SendDataToPlayersWithDataMode transmits data to a list of connected players.
func (*Match) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Match) VoiceChatWithName ¶ added in v0.17.0
VoiceChatWithName joins the local player to a voice channel.
func (*Match) WithDelegate ¶ added in v0.17.0
func (m *Match) WithDelegate(delegate MatchDelegate) *Match
WithDelegate sets the delegate that handles communication between players in a match.
type MatchDelegate ¶ added in v0.17.0
type MatchDelegate interface {
}
MatchDelegate receives the callbacks of the Objective-C protocol GKMatchDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (MatchDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type MatchDelegateMatchDidFailWithErrorHandler ¶ added in v0.17.0
type MatchDelegateMatchDidFailWithErrorHandler interface {
MatchDidFailWithError(match *Match, err error)
}
MatchDelegateMatchDidFailWithErrorHandler is the optional GKMatchDelegate method match:didFailWithError:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchDidReceiveDataForRecipientFromRemotePlayerHandler ¶ added in v0.17.0
type MatchDelegateMatchDidReceiveDataForRecipientFromRemotePlayerHandler interface {
MatchDidReceiveDataForRecipientFromRemotePlayer(match *Match, data []byte, recipient *Player, player *Player)
}
MatchDelegateMatchDidReceiveDataForRecipientFromRemotePlayerHandler is the optional GKMatchDelegate method match:didReceiveData:forRecipient:fromRemotePlayer:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchDidReceiveDataFromPlayerHandler ¶ added in v0.17.0
type MatchDelegateMatchDidReceiveDataFromPlayerHandler interface {
MatchDidReceiveDataFromPlayer(match *Match, data []byte, playerID string)
}
MatchDelegateMatchDidReceiveDataFromPlayerHandler is the optional GKMatchDelegate method match:didReceiveData:fromPlayer:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchDidReceiveDataFromRemotePlayerHandler ¶ added in v0.17.0
type MatchDelegateMatchDidReceiveDataFromRemotePlayerHandler interface {
MatchDidReceiveDataFromRemotePlayer(match *Match, data []byte, player *Player)
}
MatchDelegateMatchDidReceiveDataFromRemotePlayerHandler is the optional GKMatchDelegate method match:didReceiveData:fromRemotePlayer:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchPlayerDidChangeConnectionStateHandler ¶ added in v0.17.0
type MatchDelegateMatchPlayerDidChangeConnectionStateHandler interface {
MatchPlayerDidChangeConnectionState(match *Match, player *Player, state PlayerConnectionState)
}
MatchDelegateMatchPlayerDidChangeConnectionStateHandler is the optional GKMatchDelegate method match:player:didChangeConnectionState:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchPlayerDidChangeStateHandler ¶ added in v0.17.0
type MatchDelegateMatchPlayerDidChangeStateHandler interface {
MatchPlayerDidChangeState(match *Match, playerID string, state PlayerConnectionState)
}
MatchDelegateMatchPlayerDidChangeStateHandler is the optional GKMatchDelegate method match:player:didChangeState:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchShouldReinviteDisconnectedPlayerHandler ¶ added in v0.17.0
type MatchDelegateMatchShouldReinviteDisconnectedPlayerHandler interface {
MatchShouldReinviteDisconnectedPlayer(match *Match, player *Player) bool
}
MatchDelegateMatchShouldReinviteDisconnectedPlayerHandler is the optional GKMatchDelegate method match:shouldReinviteDisconnectedPlayer:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchDelegateMatchShouldReinvitePlayerHandler ¶ added in v0.17.0
type MatchDelegateMatchShouldReinvitePlayerHandler interface {
MatchShouldReinvitePlayer(match *Match, playerID string) bool
}
MatchDelegateMatchShouldReinvitePlayerHandler is the optional GKMatchDelegate method match:shouldReinvitePlayer:. Implement it on a MatchDelegate value to receive that callback; a value without it is simply never sent one.
type MatchRequest ¶ added in v0.17.0
MatchRequest is an idiomatic wrapper over the Objective-C class GKMatchRequest.
An object that encapsulates the parameters to create a real-time or turn-based match.
func MatchRequestFromID ¶ added in v0.17.0
func MatchRequestFromID(id objc.ID) *MatchRequest
MatchRequestFromID adopts an existing Objective-C object as a MatchRequest (nil for 0), retaining it and registering a release finalizer.
func NewMatchRequest ¶ added in v0.17.0
func NewMatchRequest() *MatchRequest
NewMatchRequest creates a new MatchRequest.
func (*MatchRequest) DefaultNumberOfPlayers ¶ added in v0.17.0
func (mr *MatchRequest) DefaultNumberOfPlayers() int
DefaultNumberOfPlayers returns 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 (*MatchRequest) Description ¶ added in v0.17.0
func (mr *MatchRequest) Description() string
Description returns the object's -description text.
func (*MatchRequest) InviteMessage ¶ added in v0.17.0
func (mr *MatchRequest) InviteMessage() string
InviteMessage returns message sent to invited players, may be modified if using GKMatchmakerViewController Will return nil if the player is underage or restricted.
func (*MatchRequest) IsEqual ¶ added in v0.17.0
func (mr *MatchRequest) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*MatchRequest) IsKind ¶ added in v0.17.0
func (mr *MatchRequest) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*MatchRequest) MaxPlayers ¶ added in v0.17.0
func (mr *MatchRequest) MaxPlayers() int
MaxPlayers returns maximum number of players for the match
func (*MatchRequest) MinPlayers ¶ added in v0.17.0
func (mr *MatchRequest) MinPlayers() int
MinPlayers returns minimum number of players for the match
func (*MatchRequest) PlayerAttributes ¶ added in v0.17.0
func (mr *MatchRequest) PlayerAttributes() uint32
PlayerAttributes returns 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 (*MatchRequest) PlayerGroup ¶ added in v0.17.0
func (mr *MatchRequest) PlayerGroup() int
PlayerGroup returns the player group identifier. Matchmaking will only take place between players in the same group.
func (*MatchRequest) PlayersToInvite ¶ added in v0.17.0
func (mr *MatchRequest) PlayersToInvite() []string
PlayersToInvite returns the players to invite.
PlayersToInvite returns the collection as a Go slice.
func (*MatchRequest) Properties ¶ added in v0.18.0
func (mr *MatchRequest) Properties() unsafe.Pointer
Properties returns the match properties, if rule-based matchmaking is used.
func (*MatchRequest) QueueName ¶ added in v0.17.0
func (mr *MatchRequest) QueueName() string
QueueName returns the name of the queue, if rule-based matchmaking is used.
func (*MatchRequest) RecipientProperties ¶ added in v0.17.0
func (mr *MatchRequest) RecipientProperties() obj.Object
RecipientProperties returns the recipient specific match properties, if rule-based matchmaking is used when inviting players.
func (*MatchRequest) Recipients ¶ added in v0.17.0
func (mr *MatchRequest) Recipients() []*Player
Recipients returns array of GKPlayers to invite, or nil if none. This array can also include local guest players.
Recipients returns the collection as a Go slice.
func (*MatchRequest) RestrictToAutomatch ¶ added in v0.17.0
func (mr *MatchRequest) RestrictToAutomatch() bool
RestrictToAutomatch reports whether a match will be created only using automatch. If true, 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 false.
func (*MatchRequest) String ¶ added in v0.17.0
func (mr *MatchRequest) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*MatchRequest) WithDefaultNumberOfPlayers ¶ added in v0.17.0
func (mr *MatchRequest) WithDefaultNumberOfPlayers(defaultNumberOfPlayers int) *MatchRequest
WithDefaultNumberOfPlayers sets the default number of players for the match.
func (*MatchRequest) WithInviteMessage ¶ added in v0.17.0
func (mr *MatchRequest) WithInviteMessage(inviteMessage string) *MatchRequest
WithInviteMessage sets the message sent to other players when the local player invites them to join a match.
func (*MatchRequest) WithInviteeResponseHandler ¶ added in v0.18.0
func (mr *MatchRequest) WithInviteeResponseHandler(inviteeResponseHandler func(obj.Object, InviteRecipientResponse)) *MatchRequest
WithInviteeResponseHandler sets handles when a player responds to an invitation.
func (*MatchRequest) WithMaxPlayers ¶ added in v0.17.0
func (mr *MatchRequest) WithMaxPlayers(maxPlayers int) *MatchRequest
WithMaxPlayers sets the maximum number of players that can join the match.
func (*MatchRequest) WithMinPlayers ¶ added in v0.17.0
func (mr *MatchRequest) WithMinPlayers(minPlayers int) *MatchRequest
WithMinPlayers sets the minimum number of players that can join the match.
func (*MatchRequest) WithPlayerAttributes ¶ added in v0.17.0
func (mr *MatchRequest) WithPlayerAttributes(playerAttributes uint32) *MatchRequest
WithPlayerAttributes sets a mask that specifies the role that the local player would like to play in the game.
func (*MatchRequest) WithPlayerGroup ¶ added in v0.17.0
func (mr *MatchRequest) WithPlayerGroup(playerGroup int) *MatchRequest
WithPlayerGroup sets a number identifying a subset of players invited to join a match.
func (*MatchRequest) WithPlayersToInvite ¶ added in v0.17.0
func (mr *MatchRequest) WithPlayersToInvite(items ...obj.Object) *MatchRequest
WithPlayersToInvite sets a list of player identifiers for players to invite to the match.
func (*MatchRequest) WithProperties ¶ added in v0.17.0
func (mr *MatchRequest) WithProperties(properties unsafe.Pointer) *MatchRequest
WithProperties sets the criteria for the local player that Game Center uses to find other players when using matchmaking rules.
func (*MatchRequest) WithQueueName ¶ added in v0.17.0
func (mr *MatchRequest) WithQueueName(queueName string) *MatchRequest
WithQueueName sets the name of the queue that Game Center places the match request in.
func (*MatchRequest) WithRecipientProperties ¶ added in v0.17.0
func (mr *MatchRequest) WithRecipientProperties(recipientProperties obj.Object) *MatchRequest
WithRecipientProperties sets the criteria for recipients of the match request that Game Center uses to find other players when using matchmaking rules.
func (*MatchRequest) WithRecipientResponseHandler ¶ added in v0.18.0
func (mr *MatchRequest) WithRecipientResponseHandler(recipientResponseHandler func(obj.Object, InviteRecipientResponse)) *MatchRequest
WithRecipientResponseHandler sets a method that handles when a player responds to an invitation to join a match.
func (*MatchRequest) WithRecipients ¶ added in v0.17.0
func (mr *MatchRequest) WithRecipients(items ...PlayerProvider) *MatchRequest
WithRecipients sets the players to invite to the match.
func (*MatchRequest) WithRestrictToAutomatch ¶ added in v0.17.0
func (mr *MatchRequest) WithRestrictToAutomatch(restrictToAutomatch bool) *MatchRequest
WithRestrictToAutomatch sets a Boolean value that determines whether a game uses automatch to find players or the local player invites players.
type MatchSendDataMode ¶ added in v0.17.0
type MatchSendDataMode int64
The mechanism used to transmit data to other players.
const ( MatchSendDataReliable MatchSendDataMode = 0 MatchSendDataUnreliable MatchSendDataMode = 1 )
func (MatchSendDataMode) String ¶ added in v0.17.0
func (e MatchSendDataMode) String() string
String returns the MatchSendDataMode constant's name, or its numeric form when the value is not a known constant.
type MatchType ¶ added in v0.17.0
type MatchType uint64
The kind of match managed by Game Center.
const ( // A peer-to-peer match hosted by Game Center. // // Deprecated: since macOS 10.10. MatchTypePeerToPeer MatchType = 0 // A match hosted on your private server. // // Deprecated: since macOS 10.10. MatchTypeHosted MatchType = 1 // A turn-based match hosted by Game Center. MatchTypeTurnBased MatchType = 2 )
type MatchedPlayers ¶ added in v0.17.0
MatchedPlayers is an idiomatic wrapper over the Objective-C class GKMatchedPlayers.
An object that represents matchmaking results, including the players that join the match and their properties that matchmaking rules uses.
func MatchedPlayersFromID ¶ added in v0.17.0
func MatchedPlayersFromID(id objc.ID) *MatchedPlayers
MatchedPlayersFromID adopts an existing Objective-C object as a MatchedPlayers (nil for 0), retaining it and registering a release finalizer.
func NewMatchedPlayers ¶ added in v0.17.0
func NewMatchedPlayers() *MatchedPlayers
NewMatchedPlayers creates a new MatchedPlayers.
func (*MatchedPlayers) Description ¶ added in v0.17.0
func (mp *MatchedPlayers) Description() string
Description returns the object's -description text.
func (*MatchedPlayers) IsEqual ¶ added in v0.17.0
func (mp *MatchedPlayers) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*MatchedPlayers) IsKind ¶ added in v0.17.0
func (mp *MatchedPlayers) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*MatchedPlayers) PlayerProperties ¶ added in v0.17.0
func (mp *MatchedPlayers) PlayerProperties() obj.Object
PlayerProperties returns the player properties.
func (*MatchedPlayers) Players ¶ added in v0.17.0
func (mp *MatchedPlayers) Players() []*Player
Players returns the players.
Players returns the collection as a Go slice.
func (*MatchedPlayers) Properties ¶ added in v0.18.0
func (mp *MatchedPlayers) Properties() unsafe.Pointer
Properties returns the properties.
func (*MatchedPlayers) String ¶ added in v0.17.0
func (mp *MatchedPlayers) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type Matchmaker ¶ added in v0.17.0
Matchmaker is an idiomatic wrapper over the Objective-C class GKMatchmaker.
An object that creates matches with other players without presenting an interface to the players.
func MatchmakerFromID ¶ added in v0.17.0
func MatchmakerFromID(id objc.ID) *Matchmaker
MatchmakerFromID adopts an existing Objective-C object as a Matchmaker (nil for 0), retaining it and registering a release finalizer.
func NewMatchmaker ¶ added in v0.17.0
func NewMatchmaker() *Matchmaker
NewMatchmaker creates a new Matchmaker.
func SharedMatchmaker ¶ added in v0.17.0
func SharedMatchmaker() *Matchmaker
SharedMatchmaker returns the singleton matchmaker instance.
func (*Matchmaker) AddPlayersToMatchMatchRequest ¶ added in v0.17.0
func (m *Matchmaker) AddPlayersToMatchMatchRequest(ctx context.Context, match *Match, matchRequest *MatchRequest) error
AddPlayersToMatchMatchRequest invites additional players to an existing match.
AddPlayersToMatchMatchRequest blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) Cancel ¶ added in v0.17.0
func (m *Matchmaker) Cancel()
Cancel cancels a matchmaking request.
func (*Matchmaker) CancelInviteToPlayer ¶ added in v0.17.0
func (m *Matchmaker) CancelInviteToPlayer(playerID string)
CancelInviteToPlayer * This method is obsolete. It will never be invoked and its implementation does nothing**
func (*Matchmaker) CancelPendingInviteToPlayer ¶ added in v0.17.0
func (m *Matchmaker) CancelPendingInviteToPlayer(player *Player)
CancelPendingInviteToPlayer cancels a pending invitation to another player.
func (*Matchmaker) Description ¶ added in v0.17.0
func (m *Matchmaker) Description() string
Description returns the object's -description text.
func (*Matchmaker) FindMatchForRequest ¶ added in v0.17.0
func (m *Matchmaker) FindMatchForRequest(ctx context.Context, request *MatchRequest) (result *Match, err error)
FindMatchForRequest initiates a request to find players for a peer-to-peer match.
FindMatchForRequest blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) FindMatchedPlayers ¶ added in v0.17.0
func (m *Matchmaker) FindMatchedPlayers(ctx context.Context, request *MatchRequest) (result *MatchedPlayers, err error)
FindMatchedPlayers initiates a request to find players for a hosted match that uses matchmaking rules.
FindMatchedPlayers blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) FindPlayersForHostedMatchRequest ¶ added in v0.17.0
func (m *Matchmaker) FindPlayersForHostedMatchRequest(ctx context.Context, request *MatchRequest) (result obj.Object, err error)
FindPlayersForHostedMatchRequest initiates a request to find players for a hosted match.
FindPlayersForHostedMatchRequest blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) FindPlayersForHostedRequest ¶ added in v0.17.0
func (m *Matchmaker) FindPlayersForHostedRequest(ctx context.Context, request *MatchRequest) (result obj.Object, err error)
FindPlayersForHostedRequest initiates a request to find players for a hosted match.
FindPlayersForHostedRequest blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) FinishMatchmakingForMatch ¶ added in v0.17.0
func (m *Matchmaker) FinishMatchmakingForMatch(match *Match)
FinishMatchmakingForMatch informs the server when programmatic matchmaking finishes.
func (*Matchmaker) IsEqual ¶ added in v0.17.0
func (m *Matchmaker) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Matchmaker) IsKind ¶ added in v0.17.0
func (m *Matchmaker) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Matchmaker) MatchForInvite ¶ added in v0.17.0
MatchForInvite creates a match from an invitation that the local player accepts.
MatchForInvite blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) QueryActivityWithCompletionHandler ¶ added in v0.18.0
func (m *Matchmaker) QueryActivityWithCompletionHandler(completionHandler func(int, unsafe.Pointer))
QueryActivityWithCompletionHandler finds the number of players, across player groups, who recently requested a match.
func (*Matchmaker) QueryPlayerGroupActivityWithCompletionHandler ¶ added in v0.18.0
func (m *Matchmaker) QueryPlayerGroupActivityWithCompletionHandler(playerGroup int, completionHandler func(int, unsafe.Pointer))
QueryPlayerGroupActivityWithCompletionHandler finds the number of players in a player group who recently requested a match.
func (*Matchmaker) QueryQueueActivityWithCompletionHandler ¶ added in v0.18.0
func (m *Matchmaker) QueryQueueActivityWithCompletionHandler(queueName string, completionHandler func(int, unsafe.Pointer))
QueryQueueActivityWithCompletionHandler finds the number of players in a specific queue who recently requested a match.
func (*Matchmaker) StartBrowsingForNearbyPlayersWithHandler ¶ added in v0.17.0
func (m *Matchmaker) StartBrowsingForNearbyPlayersWithHandler(reachableHandler func(obj.Object, bool))
StartBrowsingForNearbyPlayersWithHandler finds nearby players through Bluetooth or WiFi on the same subnet.
func (*Matchmaker) StartBrowsingForNearbyPlayersWithReachableHandler ¶ added in v0.17.0
func (m *Matchmaker) StartBrowsingForNearbyPlayersWithReachableHandler(reachableHandler func(obj.Object, bool))
StartBrowsingForNearbyPlayersWithReachableHandler * This method is obsolete. It will never be invoked and its implementation does nothing**
func (*Matchmaker) StartGroupActivityWithPlayerHandler ¶ added in v0.17.0
func (m *Matchmaker) StartGroupActivityWithPlayerHandler(ctx context.Context) (result *Player, err error)
StartGroupActivityWithPlayerHandler begins a SharePlay activity for your game when a FaceTime call is active.
StartGroupActivityWithPlayerHandler blocks until the operation completes or ctx is cancelled.
func (*Matchmaker) StopBrowsingForNearbyPlayers ¶ added in v0.17.0
func (m *Matchmaker) StopBrowsingForNearbyPlayers()
StopBrowsingForNearbyPlayers stops finding nearby players.
func (*Matchmaker) StopGroupActivity ¶ added in v0.17.0
func (m *Matchmaker) StopGroupActivity()
StopGroupActivity ends a SharePlay activity for the entire group, which the local player activates.
func (*Matchmaker) String ¶ added in v0.17.0
func (m *Matchmaker) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Matchmaker) WithInviteHandler ¶ added in v0.17.0
func (m *Matchmaker) WithInviteHandler(inviteHandler func(obj.Object, obj.Object)) *Matchmaker
WithInviteHandler sets the invite handler.
type MatchmakerViewController ¶ added in v0.17.0
MatchmakerViewController is an idiomatic wrapper over the Objective-C class GKMatchmakerViewController.
An interface that allows a player to invite other players to a real-time game and automatch to fill any empty slots.
func MatchmakerViewControllerFromID ¶ added in v0.17.0
func MatchmakerViewControllerFromID(id objc.ID) *MatchmakerViewController
MatchmakerViewControllerFromID adopts an existing Objective-C object as a MatchmakerViewController (nil for 0), retaining it and registering a release finalizer.
func NewMatchmakerViewControllerWithInvite ¶ added in v0.17.0
func NewMatchmakerViewControllerWithInvite(invite *Invite) *MatchmakerViewController
NewMatchmakerViewControllerWithInvite creates a matchmaker view controller to present to a player who accepts an invitation.
func NewMatchmakerViewControllerWithMatchRequest ¶ added in v0.17.0
func NewMatchmakerViewControllerWithMatchRequest(request *MatchRequest) *MatchmakerViewController
NewMatchmakerViewControllerWithMatchRequest creates a matchmaker view controller for the local player to start inviting other players.
func (*MatchmakerViewController) AddPlayersToMatch ¶ added in v0.17.0
func (mvc *MatchmakerViewController) AddPlayersToMatch(match *Match)
AddPlayersToMatch invites additional players to join an existing match.
func (*MatchmakerViewController) CanStartWithMinimumPlayers ¶ added in v0.17.0
func (mvc *MatchmakerViewController) CanStartWithMinimumPlayers() bool
CanStartWithMinimumPlayers reports whether 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 false, and the multiplayer match can only proceed after all players are connected. If the value is set to true, 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 (*MatchmakerViewController) DefaultInvitationMessage ¶ added in v0.17.0
func (mvc *MatchmakerViewController) DefaultInvitationMessage() string
DefaultInvitationMessage returns deprecated, set the message on the match request instead
func (*MatchmakerViewController) Description ¶ added in v0.17.0
func (mvc *MatchmakerViewController) Description() string
Description returns the object's -description text.
func (*MatchmakerViewController) IsEqual ¶ added in v0.17.0
func (mvc *MatchmakerViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*MatchmakerViewController) IsHosted ¶ added in v0.17.0
func (mvc *MatchmakerViewController) IsHosted() bool
IsHosted reports whether set to true 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 (*MatchmakerViewController) IsKind ¶ added in v0.17.0
func (mvc *MatchmakerViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*MatchmakerViewController) MatchRequest ¶ added in v0.17.0
func (mvc *MatchmakerViewController) MatchRequest() *MatchRequest
MatchRequest returns the match request.
func (*MatchmakerViewController) MatchmakingMode ¶ added in v0.17.0
func (mvc *MatchmakerViewController) MatchmakingMode() MatchmakingMode
MatchmakingMode returns 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 (*MatchmakerViewController) SetHostedPlayerConnected ¶ added in v0.17.0
func (mvc *MatchmakerViewController) SetHostedPlayerConnected(playerID string, connected bool)
SetHostedPlayerConnected updates a player’s status on the view to show that the player has connected or disconnected from your server.
func (*MatchmakerViewController) SetHostedPlayerDidConnect ¶ added in v0.17.0
func (mvc *MatchmakerViewController) SetHostedPlayerDidConnect(player *Player, connected bool)
SetHostedPlayerDidConnect updates the connection status of a player in a hosted game.
func (*MatchmakerViewController) String ¶ added in v0.17.0
func (mvc *MatchmakerViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*MatchmakerViewController) WithCanStartWithMinimumPlayers ¶ added in v0.17.0
func (mvc *MatchmakerViewController) WithCanStartWithMinimumPlayers(canStartWithMinimumPlayers bool) *MatchmakerViewController
WithCanStartWithMinimumPlayers sets a Boolean value that indicates whether your game can start after a minimum number of players join a match.
func (*MatchmakerViewController) WithDefaultInvitationMessage ¶ added in v0.17.0
func (mvc *MatchmakerViewController) WithDefaultInvitationMessage(defaultInvitationMessage string) *MatchmakerViewController
WithDefaultInvitationMessage sets the default invitation message sent to a player.
func (*MatchmakerViewController) WithHosted ¶ added in v0.17.0
func (mvc *MatchmakerViewController) WithHosted(hosted bool) *MatchmakerViewController
WithHosted sets a Boolean value that indicates whether the match is hosted or peer-to-peer.
func (*MatchmakerViewController) WithMatchmakerDelegate ¶ added in v0.17.0
func (mvc *MatchmakerViewController) WithMatchmakerDelegate(matchmakerDelegate MatchmakerViewControllerDelegate) *MatchmakerViewController
WithMatchmakerDelegate sets the object that handles matchmaker view controller changes.
func (*MatchmakerViewController) WithMatchmakingMode ¶ added in v0.17.0
func (mvc *MatchmakerViewController) WithMatchmakingMode(matchmakingMode MatchmakingMode) *MatchmakerViewController
WithMatchmakingMode sets the mode that a multiplayer game uses to find players.
type MatchmakerViewControllerDelegate ¶ added in v0.17.0
type MatchmakerViewControllerDelegate interface {
// MatchmakerViewControllerWasCancelled the user has cancelled matchmaking
MatchmakerViewControllerWasCancelled(viewController *MatchmakerViewController)
// MatchmakerViewControllerDidFailWithError matchmaking has failed with an error
MatchmakerViewControllerDidFailWithError(viewController *MatchmakerViewController, err error)
}
MatchmakerViewControllerDelegate receives the callbacks of the Objective-C protocol GKMatchmakerViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (MatchmakerViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindHostedPlayersHandler ¶ added in v0.17.0
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindHostedPlayersHandler interface {
MatchmakerViewControllerDidFindHostedPlayers(viewController *MatchmakerViewController, players obj.Object)
}
MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindHostedPlayersHandler is the optional GKMatchmakerViewControllerDelegate method matchmakerViewController:didFindHostedPlayers:. Implement it on a MatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindMatchHandler ¶ added in v0.17.0
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindMatchHandler interface {
MatchmakerViewControllerDidFindMatch(viewController *MatchmakerViewController, match *Match)
}
MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindMatchHandler is the optional GKMatchmakerViewControllerDelegate method matchmakerViewController:didFindMatch:. Implement it on a MatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindPlayersHandler ¶ added in v0.17.0
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindPlayersHandler interface {
MatchmakerViewControllerDidFindPlayers(viewController *MatchmakerViewController, playerIDs obj.Object)
}
MatchmakerViewControllerDelegateMatchmakerViewControllerDidFindPlayersHandler is the optional GKMatchmakerViewControllerDelegate method matchmakerViewController:didFindPlayers:. Implement it on a MatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidReceiveAcceptFromHostedPlayerHandler ¶ added in v0.17.0
type MatchmakerViewControllerDelegateMatchmakerViewControllerDidReceiveAcceptFromHostedPlayerHandler interface {
MatchmakerViewControllerDidReceiveAcceptFromHostedPlayer(viewController *MatchmakerViewController, playerID string)
}
MatchmakerViewControllerDelegateMatchmakerViewControllerDidReceiveAcceptFromHostedPlayerHandler is the optional GKMatchmakerViewControllerDelegate method matchmakerViewController:didReceiveAcceptFromHostedPlayer:. Implement it on a MatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type MatchmakerViewControllerDelegateMatchmakerViewControllerHostedPlayerDidAcceptHandler ¶ added in v0.17.0
type MatchmakerViewControllerDelegateMatchmakerViewControllerHostedPlayerDidAcceptHandler interface {
MatchmakerViewControllerHostedPlayerDidAccept(viewController *MatchmakerViewController, player *Player)
}
MatchmakerViewControllerDelegateMatchmakerViewControllerHostedPlayerDidAcceptHandler is the optional GKMatchmakerViewControllerDelegate method matchmakerViewController:hostedPlayerDidAccept:. Implement it on a MatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type MatchmakingMode ¶ added in v0.17.0
type MatchmakingMode int64
Possible modes that a multiplayer game uses to find matches.
const ( // The default matchmaking mode. MatchmakingModeDefault MatchmakingMode = 0 // A mode that matches the local player only with nearby players. MatchmakingModeNearbyOnly MatchmakingMode = 1 // A mode that matches the local player only with players who are also actively looking for a match. MatchmakingModeAutomatchOnly MatchmakingMode = 2 // A mode that matches the local player only with players who they invite, and doesn’t use automatch to fill empty slots. MatchmakingModeInviteOnly MatchmakingMode = 3 )
func (MatchmakingMode) String ¶ added in v0.17.0
func (e MatchmakingMode) String() string
String returns the MatchmakingMode constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type NXMouseButton ¶
type NXMouseButton int32
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.
type NotificationBanner ¶ added in v0.17.0
NotificationBanner is an idiomatic wrapper over the Objective-C class GKNotificationBanner.
A Game Center-style banner that displays a message to the local player.
func NewNotificationBanner ¶ added in v0.17.0
func NewNotificationBanner() *NotificationBanner
NewNotificationBanner creates a new NotificationBanner.
func NotificationBannerFromID ¶ added in v0.17.0
func NotificationBannerFromID(id objc.ID) *NotificationBanner
NotificationBannerFromID adopts an existing Objective-C object as a NotificationBanner (nil for 0), retaining it and registering a release finalizer.
func (*NotificationBanner) Description ¶ added in v0.17.0
func (nb *NotificationBanner) Description() string
Description returns the object's -description text.
func (*NotificationBanner) IsEqual ¶ added in v0.17.0
func (nb *NotificationBanner) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*NotificationBanner) IsKind ¶ added in v0.17.0
func (nb *NotificationBanner) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*NotificationBanner) String ¶ added in v0.17.0
func (nb *NotificationBanner) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type OSUnfairLockFlags ¶ added in v0.17.0
type OSUnfairLockFlags uint32
Bitmask — values may be combined with |.
const ( OSUnfairLockFlagsNone OSUnfairLockFlags = 0 OSUnfairLockFlagsAdaptiveSpin OSUnfairLockFlags = 262144 )
func (OSUnfairLockFlags) String ¶ added in v0.17.0
func (e OSUnfairLockFlags) String() string
String returns the OSUnfairLockFlags constant's name, or its numeric form when the value is not a known constant.
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int32
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.
type PeerConnectionState
deprecated
added in
v0.17.0
type PeerConnectionState int32
The state of a peer known to the session.
Deprecated: No longer supported
const ( // A peer not connected to the session, but one that the session can connect to. PeerStateAvailable PeerConnectionState = 0 PeerStateUnavailable PeerConnectionState = 1 // A peer connected to the session. PeerStateConnected PeerConnectionState = 2 // A peer that disconnected from the session. PeerStateDisconnected PeerConnectionState = 3 // A peer attempting to connect to the session. PeerStateConnecting PeerConnectionState = 4 PeerStateConnectedRelay PeerConnectionState = 5 )
func (PeerConnectionState) String ¶ added in v0.17.0
func (e PeerConnectionState) String() string
String returns the PeerConnectionState constant's name, or its numeric form when the value is not a known constant.
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type Player ¶ added in v0.17.0
type Player struct {
BasePlayer
}
Player is an idiomatic wrapper over the Objective-C class GKPlayer.
Player is an abstract base — you do not construct it directly. Construct one of LocalPlayer and pass it where a Player is accepted.
A remote player who the local player running your game can invite and communicate with through Game Center.
func AnonymousGuestPlayerWithIdentifier ¶ added in v0.17.0
AnonymousGuestPlayerWithIdentifier creates a guest player with the specified identifier.
func PlayerFromID ¶ added in v0.17.0
PlayerFromID adopts an existing Objective-C object as a Player (nil for 0), retaining it and registering a release finalizer.
func (*Player) Alias ¶ added in v0.17.0
Alias returns 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 (*Player) GamePlayerID ¶ added in v0.17.0
GamePlayerID returns this is the player's unique and persistent ID that is scoped to this application.
func (*Player) GuestIdentifier ¶ added in v0.17.0
GuestIdentifier returns the guest identifier.
func (*Player) IsInvitable ¶ added in v0.17.0
IsInvitable reports whether the object is invitable.
func (*Player) LoadPhotoForSize ¶ added in v0.17.0
func (p *Player) LoadPhotoForSize(ctx context.Context, size PhotoSize) (result obj.Object, err error)
LoadPhotoForSize loads a photo of the player from Game Center.
LoadPhotoForSize blocks until the operation completes or ctx is cancelled.
func (*Player) ScopedIDsArePersistent ¶ added in v0.17.0
ScopedIDsArePersistent reports whether returns a Boolean value depending on whether the player identifiers are persistent across game instances or unique to the game instance.
func (*Player) TeamPlayerID ¶ added in v0.17.0
TeamPlayerID returns this is the player's unique and persistent ID that is scoped to the Apple Store Connect Team identifier of this application.
type PlayerConnectionState ¶ added in v0.17.0
type PlayerConnectionState int64
The possible states of a connection to a match.
const ( // An undetermined state in which the player can’t receive data. PlayerStateUnknown PlayerConnectionState = 0 // A state in which a player connects to the match and can receive data. PlayerStateConnected PlayerConnectionState = 1 // A state in which a player disconnects from the match and can’t receive data. PlayerStateDisconnected PlayerConnectionState = 2 )
func (PlayerConnectionState) String ¶ added in v0.17.0
func (e PlayerConnectionState) String() string
String returns the PlayerConnectionState constant's name, or its numeric form when the value is not a known constant.
type PlayerProvider ¶ added in v0.17.0
PlayerProvider is accepted wherever a GKPlayer (or one of its subclasses) is expected.
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type ReleaseState ¶ added in v0.17.0
type ReleaseState uint64
Describes the release state of an App Store Connect resource, such as an Achievement or Leaderboard. Bitmask — values may be combined with |.
const ( // The system can’t determine the release state of the resource. ReleaseStateUnknown ReleaseState = 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). ReleaseStateReleased ReleaseState = 1 // The resource has been created in App Store Connect but isn’t yet associated with a released version of an App. ReleaseStatePrereleased ReleaseState = 2 )
func (ReleaseState) String ¶ added in v0.17.0
func (e ReleaseState) String() string
String returns the ReleaseState constant's name, or its numeric form when the value is not a known constant.
type SavedGame ¶ added in v0.17.0
SavedGame is an idiomatic wrapper over the Objective-C class GKSavedGame.
An object that represents a file containing saved game data.
func NewSavedGame ¶ added in v0.17.0
func NewSavedGame() *SavedGame
NewSavedGame creates a new SavedGame.
func SavedGameFromID ¶ added in v0.17.0
SavedGameFromID adopts an existing Objective-C object as a SavedGame (nil for 0), retaining it and registering a release finalizer.
func (*SavedGame) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*SavedGame) DeviceName ¶ added in v0.17.0
DeviceName returns the device name.
func (*SavedGame) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*SavedGame) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*SavedGame) LoadData ¶ added in v0.17.0
LoadData loads the game data from the file.
LoadData blocks until the operation completes or ctx is cancelled.
func (*SavedGame) ModificationDate ¶ added in v0.17.0
ModificationDate returns the modification date.
type SavedGameListener ¶ added in v0.17.0
type SavedGameListener interface {
}
SavedGameListener is the Go form of the Objective-C protocol GKSavedGameListener.
type Score ¶ added in v0.17.0
Score is an idiomatic wrapper over the Objective-C class GKScore.
An object containing information for a score that was earned by the player.
func NewScoreWithCategory ¶ added in v0.17.0
NewScoreWithCategory returns an initialized score object.
func NewScoreWithLeaderboardIdentifier ¶ added in v0.17.0
NewScoreWithLeaderboardIdentifier returns an initialized score object using the local player and the current date.
func NewScoreWithLeaderboardIdentifierForPlayer ¶ added in v0.17.0
NewScoreWithLeaderboardIdentifierForPlayer returns an initialized score object for the specified leaderboard and player.
func NewScoreWithLeaderboardIdentifierPlayer ¶ added in v0.17.0
NewScoreWithLeaderboardIdentifierPlayer returns an initialized score object for the specified leaderboard and player.
func ScoreFromID ¶ added in v0.17.0
ScoreFromID adopts an existing Objective-C object as a Score (nil for 0), retaining it and registering a release finalizer.
func (*Score) ChallengeComposeControllerWithMessagePlayersCompletion ¶ added in v0.18.0
func (s *Score) ChallengeComposeControllerWithMessagePlayersCompletion(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletion provides a challenge compose view controller with preselected player identifiers and a preformatted, player-editable message.
func (*Score) ChallengeComposeControllerWithMessagePlayersCompletionHandler ¶ added in v0.18.0
func (s *Score) ChallengeComposeControllerWithMessagePlayersCompletionHandler(message string, players []*Player, completionHandler func(obj.Object, bool, obj.Object)) obj.Object
ChallengeComposeControllerWithMessagePlayersCompletionHandler provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message.
func (*Score) Context ¶ added in v0.17.0
Context returns 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.
func (*Score) Date ¶ added in v0.17.0
Date returns the date this score was recorded. A newly initialized, unsubmitted GKScore records the current date at init time.
func (*Score) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Score) FormattedValue ¶ added in v0.17.0
FormattedValue returns the score formatted as a string, localized with a label
func (*Score) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Score) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Score) IssueChallengeToPlayersMessage ¶ added in v0.17.0
IssueChallengeToPlayersMessage issues a score challenge to a set of players.
func (*Score) LeaderboardIdentifier ¶ added in v0.17.0
LeaderboardIdentifier returns leaderboard identifier (required)
func (*Score) Rank ¶ added in v0.17.0
Rank returns the rank of the player within the leaderboard, only valid when returned from GKLeaderboard
func (*Score) ReportScore ¶ added in v0.17.0
ReportScore reports a score to Game Center.
ReportScore blocks until the operation completes or ctx is cancelled.
func (*Score) ShouldSetDefaultLeaderboard ¶ added in v0.17.0
ShouldSetDefaultLeaderboard reports whether 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
func (*Score) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Score) WithCategory ¶ added in v0.17.0
WithCategory sets the leaderboard that this score belongs to.
func (*Score) WithContext ¶ added in v0.17.0
WithContext sets an integer value used by your game.
func (*Score) WithLeaderboardIdentifier ¶ added in v0.17.0
WithLeaderboardIdentifier sets the identifier for the leaderboard.
func (*Score) WithShouldSetDefaultLeaderboard ¶ added in v0.17.0
WithShouldSetDefaultLeaderboard sets a Boolean value that indicates whether this score should also update the default leaderboard.
type ScoreChallenge ¶ added in v0.17.0
type ScoreChallenge struct {
Challenge
}
ScoreChallenge is an idiomatic wrapper over the Objective-C class GKScoreChallenge.
It embeds Challenge, promoting that type's methods.
A type of challenge where a player must beat the leaderboard score of another player.
func NewScoreChallenge ¶ added in v0.17.0
func NewScoreChallenge() *ScoreChallenge
NewScoreChallenge creates a new ScoreChallenge.
func ScoreChallengeFromID ¶ added in v0.17.0
func ScoreChallengeFromID(id objc.ID) *ScoreChallenge
ScoreChallengeFromID adopts an existing Objective-C object as a ScoreChallenge (nil for 0), retaining it and registering a release finalizer.
func (*ScoreChallenge) LeaderboardEntry ¶ added in v0.17.0
func (sc *ScoreChallenge) LeaderboardEntry() *LeaderboardEntry
LeaderboardEntry returns the leaderboard entry to meet to satisfy this challenge
func (*ScoreChallenge) Score ¶ added in v0.17.0
func (sc *ScoreChallenge) Score() *Score
Score returns the score to meet to satisfy this challenge
type SendDataMode
deprecated
added in
v0.17.0
type SendDataMode int32
The mechanism used to transmit data to other peers.
Deprecated: No longer supported
const ( // The data is sent continuously until it is successfully received by the intended recipients or the connection times out. SendDataReliable SendDataMode = 0 // The data is sent once and is not sent again if a transmission error occurred. SendDataUnreliable SendDataMode = 1 )
func (SendDataMode) String ¶ added in v0.17.0
func (e SendDataMode) String() string
String returns the SendDataMode constant's name, or its numeric form when the value is not a known constant.
type Session ¶ added in v0.17.0
Session is an idiomatic wrapper over the Objective-C class GKSession.
A GKSession object provides the ability to discover and connect to nearby iOS devices using Bluetooth or Wi-fi.
func NewSessionWithSessionIDDisplayNameSessionMode ¶ added in v0.17.0
func NewSessionWithSessionIDDisplayNameSessionMode(sessionID string, name string, mode SessionMode) *Session
NewSessionWithSessionIDDisplayNameSessionMode initializes and returns a newly allocated session.
func SessionFromID ¶ added in v0.17.0
SessionFromID adopts an existing Objective-C object as a Session (nil for 0), retaining it and registering a release finalizer.
func (*Session) AcceptConnectionFromPeer ¶ added in v0.17.0
AcceptConnectionFromPeer called by the delegate to accept a connection request received from a remote peer.
func (*Session) CancelConnectToPeer ¶ added in v0.17.0
CancelConnectToPeer cancels a pending request to connect to another iOS device.
func (*Session) ConnectToPeerWithTimeout ¶ added in v0.17.0
ConnectToPeerWithTimeout creates a connection to another iOS device.
func (*Session) DenyConnectionFromPeer ¶ added in v0.17.0
DenyConnectionFromPeer called by the delegate to reject a connection request received from a remote peer.
func (*Session) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Session) DisconnectFromAllPeers ¶ added in v0.17.0
func (s *Session) DisconnectFromAllPeers()
DisconnectFromAllPeers disconnects the session from all connected peers.
func (*Session) DisconnectPeerFromAllPeers ¶ added in v0.17.0
DisconnectPeerFromAllPeers disconnects a connected peer from all peers connected to the session.
func (*Session) DisconnectTimeout ¶ added in v0.17.0
DisconnectTimeout returns the timeout for disconnecting a peer if it appears that the peer has lost connection to the game network
func (*Session) DisplayName ¶ added in v0.17.0
DisplayName returns the display name.
func (*Session) DisplayNameForPeer ¶ added in v0.17.0
DisplayNameForPeer returns a user-readable name for a peer.
func (*Session) IsAvailable ¶ added in v0.17.0
IsAvailable reports whether 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 (*Session) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Session) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Session) PeersWithConnectionState ¶ added in v0.17.0
func (s *Session) PeersWithConnectionState(state PeerConnectionState) obj.Object
PeersWithConnectionState returns a list of peers in the specified connection state.
func (*Session) SendDataToAllPeersWithDataMode ¶ added in v0.17.0
func (s *Session) SendDataToAllPeersWithDataMode(data []byte, mode SendDataMode) error
SendDataToAllPeersWithDataMode transmits a collection of bytes to all connected peers.
func (*Session) SendDataToPeersWithDataMode ¶ added in v0.17.0
func (s *Session) SendDataToPeersWithDataMode(data []byte, peers obj.Object, mode SendDataMode) error
SendDataToPeersWithDataMode transmits a collection of bytes to a list of connected peers.
func (*Session) SessionMode ¶ added in v0.17.0
func (s *Session) SessionMode() SessionMode
SessionMode returns the session mode.
func (*Session) SetDataReceiveHandlerWithContext ¶ added in v0.17.0
SetDataReceiveHandlerWithContext sets the object that handles data received from other peers connected to the session.
func (*Session) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Session) WithAvailable ¶ added in v0.17.0
WithAvailable sets a Boolean value that determines whether or not the session wants to connect to new peers.
func (*Session) WithDelegate ¶ added in v0.17.0
func (s *Session) WithDelegate(delegate SessionDelegate) *Session
WithDelegate sets the delegate of the session object.
func (*Session) WithDisconnectTimeout ¶ added in v0.17.0
WithDisconnectTimeout sets a time interval that expresses how long the session waits before it disconnects a nonresponsive peer.
type SessionDelegate ¶ added in v0.17.0
type SessionDelegate interface {
}
SessionDelegate receives the callbacks of the Objective-C protocol GKSessionDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (SessionDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type SessionDelegateSessionConnectionWithPeerFailedWithErrorHandler ¶ added in v0.17.0
type SessionDelegateSessionConnectionWithPeerFailedWithErrorHandler interface {
SessionConnectionWithPeerFailedWithError(session *Session, peerID string, err error)
}
SessionDelegateSessionConnectionWithPeerFailedWithErrorHandler is the optional GKSessionDelegate method session:connectionWithPeerFailed:withError:. Implement it on a SessionDelegate value to receive that callback; a value without it is simply never sent one.
type SessionDelegateSessionDidFailWithErrorHandler ¶ added in v0.17.0
type SessionDelegateSessionDidFailWithErrorHandler interface {
SessionDidFailWithError(session *Session, err error)
}
SessionDelegateSessionDidFailWithErrorHandler is the optional GKSessionDelegate method session:didFailWithError:. Implement it on a SessionDelegate value to receive that callback; a value without it is simply never sent one.
type SessionDelegateSessionDidReceiveConnectionRequestFromPeerHandler ¶ added in v0.17.0
type SessionDelegateSessionDidReceiveConnectionRequestFromPeerHandler interface {
SessionDidReceiveConnectionRequestFromPeer(session *Session, peerID string)
}
SessionDelegateSessionDidReceiveConnectionRequestFromPeerHandler is the optional GKSessionDelegate method session:didReceiveConnectionRequestFromPeer:. Implement it on a SessionDelegate value to receive that callback; a value without it is simply never sent one.
type SessionDelegateSessionPeerDidChangeStateHandler ¶ added in v0.17.0
type SessionDelegateSessionPeerDidChangeStateHandler interface {
SessionPeerDidChangeState(session *Session, peerID string, state PeerConnectionState)
}
SessionDelegateSessionPeerDidChangeStateHandler is the optional GKSessionDelegate method session:peer:didChangeState:. Implement it on a SessionDelegate value to receive that callback; a value without it is simply never sent one.
type SessionMode
deprecated
added in
v0.17.0
type SessionMode int32
Modes that determine how a session interacts with other peers.
Deprecated: No longer supported
const ( // A server advertises itself to local devices using its sessionID property. SessionModeServer SessionMode = 0 // A client searches for servers advertising the same sessionID property. SessionModeClient SessionMode = 1 // A peer advertises like a server and searches like a client. SessionModePeer SessionMode = 2 )
func (SessionMode) String ¶ added in v0.17.0
func (e SessionMode) String() string
String returns the SessionMode constant's name, or its numeric form when the value is not a known constant.
type TransportType ¶ added in v0.17.0
type TransportType int64
The mechanism used to send messages to other players in a game session.
const ( // The data is sent once and is not sent again if a transmission error occurs. TransportTypeUnreliable TransportType = 0 // The data is sent continuously until it is successfully received by the intended recipients or the connection times out. TransportTypeReliable TransportType = 1 )
func (TransportType) String ¶ added in v0.17.0
func (e TransportType) String() string
String returns the TransportType constant's name, or its numeric form when the value is not a known constant.
type TurnBasedEventHandler ¶ added in v0.17.0
TurnBasedEventHandler is an idiomatic wrapper over the Objective-C class GKTurnBasedEventHandler.
The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches. To use it, call the sharedTurnBasedEventHandler class method to get the singleton instance and assign an object that implements the GKTurnBasedEventHandlerDelegate protocol to its delegate property. All methods are called on the main thread.
func NewTurnBasedEventHandler ¶ added in v0.17.0
func NewTurnBasedEventHandler() *TurnBasedEventHandler
NewTurnBasedEventHandler creates a new TurnBasedEventHandler.
func SharedTurnBasedEventHandler ¶ added in v0.17.0
func SharedTurnBasedEventHandler() *TurnBasedEventHandler
SharedTurnBasedEventHandler returns the shared instance of the event handler.
func TurnBasedEventHandlerFromID ¶ added in v0.17.0
func TurnBasedEventHandlerFromID(id objc.ID) *TurnBasedEventHandler
TurnBasedEventHandlerFromID adopts an existing Objective-C object as a TurnBasedEventHandler (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedEventHandler) Delegate ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) Delegate() *foundation.Object
Delegate returns the delegate.
func (*TurnBasedEventHandler) Description ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) Description() string
Description returns the object's -description text.
func (*TurnBasedEventHandler) IsEqual ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedEventHandler) IsKind ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedEventHandler) String ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TurnBasedEventHandler) WithDelegate ¶ added in v0.17.0
func (tbeh *TurnBasedEventHandler) WithDelegate(delegate obj.Object) *TurnBasedEventHandler
WithDelegate sets the delegate for the event handler.
type TurnBasedEventHandlerDelegate ¶ added in v0.17.0
type TurnBasedEventHandlerDelegate interface {
// HandleInviteFromGameCenter wraps the corresponding Objective-C method.
HandleInviteFromGameCenter(playersToInvite obj.Object)
// HandleTurnEventForMatchDidBecomeActive wraps the corresponding Objective-C method.
HandleTurnEventForMatchDidBecomeActive(match *TurnBasedMatch, didBecomeActive bool)
}
TurnBasedEventHandlerDelegate receives the callbacks of the Objective-C protocol GKTurnBasedEventHandlerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (TurnBasedEventHandlerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type TurnBasedEventHandlerDelegateHandleMatchEndedHandler ¶ added in v0.17.0
type TurnBasedEventHandlerDelegateHandleMatchEndedHandler interface {
HandleMatchEnded(match *TurnBasedMatch)
}
TurnBasedEventHandlerDelegateHandleMatchEndedHandler is the optional GKTurnBasedEventHandlerDelegate method handleMatchEnded:. Implement it on a TurnBasedEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type TurnBasedEventHandlerDelegateHandleTurnEventForMatchHandler ¶ added in v0.17.0
type TurnBasedEventHandlerDelegateHandleTurnEventForMatchHandler interface {
HandleTurnEventForMatch(match *TurnBasedMatch)
}
TurnBasedEventHandlerDelegateHandleTurnEventForMatchHandler is the optional GKTurnBasedEventHandlerDelegate method handleTurnEventForMatch:. Implement it on a TurnBasedEventHandlerDelegate value to receive that callback; a value without it is simply never sent one.
type TurnBasedEventListener ¶ added in v0.17.0
type TurnBasedEventListener interface {
}
TurnBasedEventListener is the Go form of the Objective-C protocol GKTurnBasedEventListener.
type TurnBasedExchange ¶ added in v0.17.0
TurnBasedExchange is an idiomatic wrapper over the Objective-C class GKTurnBasedExchange.
Exchange request information that participants send in a turn-based match.
func NewTurnBasedExchange ¶ added in v0.17.0
func NewTurnBasedExchange() *TurnBasedExchange
NewTurnBasedExchange creates a new TurnBasedExchange.
func TurnBasedExchangeFromID ¶ added in v0.17.0
func TurnBasedExchangeFromID(id objc.ID) *TurnBasedExchange
TurnBasedExchangeFromID adopts an existing Objective-C object as a TurnBasedExchange (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedExchange) CancelWithLocalizableMessageKeyArguments ¶ added in v0.17.0
func (tbe *TurnBasedExchange) CancelWithLocalizableMessageKeyArguments(ctx context.Context, key string, arguments []string) error
CancelWithLocalizableMessageKeyArguments cancels an exchange request.
CancelWithLocalizableMessageKeyArguments blocks until the operation completes or ctx is cancelled.
func (*TurnBasedExchange) CompletionDate ¶ added in v0.17.0
func (tbe *TurnBasedExchange) CompletionDate() time.Time
CompletionDate returns the completion date.
func (*TurnBasedExchange) Data ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Data() []byte
Data returns the data.
func (*TurnBasedExchange) Description ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Description() string
Description returns the object's -description text.
func (*TurnBasedExchange) ExchangeID ¶ added in v0.17.0
func (tbe *TurnBasedExchange) ExchangeID() string
ExchangeID returns the exchange ID.
func (*TurnBasedExchange) IsEqual ¶ added in v0.17.0
func (tbe *TurnBasedExchange) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedExchange) IsKind ¶ added in v0.17.0
func (tbe *TurnBasedExchange) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedExchange) Message ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Message() string
Message returns the message.
func (*TurnBasedExchange) Recipients ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Recipients() []*TurnBasedParticipant
Recipients returns the recipients.
Recipients returns the collection as a Go slice.
func (*TurnBasedExchange) Replies ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Replies() []*TurnBasedExchangeReply
Replies returns the replies.
Replies returns the collection as a Go slice.
func (*TurnBasedExchange) ReplyWithLocalizableMessageKeyArgumentsData ¶ added in v0.17.0
func (tbe *TurnBasedExchange) ReplyWithLocalizableMessageKeyArgumentsData(ctx context.Context, key string, arguments []string, data []byte) error
ReplyWithLocalizableMessageKeyArgumentsData replies to an exchange request on behalf of a recipient.
ReplyWithLocalizableMessageKeyArgumentsData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedExchange) SendDate ¶ added in v0.17.0
func (tbe *TurnBasedExchange) SendDate() time.Time
SendDate returns the send date.
func (*TurnBasedExchange) Sender ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Sender() *TurnBasedParticipant
Sender returns the sender.
func (*TurnBasedExchange) Status ¶ added in v0.17.0
func (tbe *TurnBasedExchange) Status() TurnBasedExchangeStatus
Status returns the status.
func (*TurnBasedExchange) String ¶ added in v0.17.0
func (tbe *TurnBasedExchange) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TurnBasedExchange) TimeoutDate ¶ added in v0.17.0
func (tbe *TurnBasedExchange) TimeoutDate() time.Time
TimeoutDate returns the timeout date.
type TurnBasedExchangeReply ¶ added in v0.17.0
TurnBasedExchangeReply is an idiomatic wrapper over the Objective-C class GKTurnBasedExchangeReply.
Details about a recipient’s response to an exchange request.
func NewTurnBasedExchangeReply ¶ added in v0.17.0
func NewTurnBasedExchangeReply() *TurnBasedExchangeReply
NewTurnBasedExchangeReply creates a new TurnBasedExchangeReply.
func TurnBasedExchangeReplyFromID ¶ added in v0.17.0
func TurnBasedExchangeReplyFromID(id objc.ID) *TurnBasedExchangeReply
TurnBasedExchangeReplyFromID adopts an existing Objective-C object as a TurnBasedExchangeReply (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedExchangeReply) Data ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) Data() []byte
Data returns the data.
func (*TurnBasedExchangeReply) Description ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) Description() string
Description returns the object's -description text.
func (*TurnBasedExchangeReply) IsEqual ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedExchangeReply) IsKind ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedExchangeReply) Message ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) Message() string
Message returns the message.
func (*TurnBasedExchangeReply) Recipient ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) Recipient() *TurnBasedParticipant
Recipient returns the recipient.
func (*TurnBasedExchangeReply) ReplyDate ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) ReplyDate() time.Time
ReplyDate returns the reply date.
func (*TurnBasedExchangeReply) String ¶ added in v0.17.0
func (tber *TurnBasedExchangeReply) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type TurnBasedExchangeStatus ¶ added in v0.17.0
type TurnBasedExchangeStatus int8
The status of an exchange or reply.
const ( // The state of the exchange request is unknown. TurnBasedExchangeStatusUnknown TurnBasedExchangeStatus = 0 // GameKit sent the exchange request to recipients but not all recipients replied. TurnBasedExchangeStatusActive TurnBasedExchangeStatus = 1 // All recipients of the exchange request replied. TurnBasedExchangeStatusComplete TurnBasedExchangeStatus = 2 // The current participant saved the exchange request. TurnBasedExchangeStatusResolved TurnBasedExchangeStatus = 3 // The sender canceled the exchange request. TurnBasedExchangeStatusCanceled TurnBasedExchangeStatus = 4 )
func (TurnBasedExchangeStatus) String ¶ added in v0.17.0
func (e TurnBasedExchangeStatus) String() string
String returns the TurnBasedExchangeStatus constant's name, or its numeric form when the value is not a known constant.
type TurnBasedMatch ¶ added in v0.17.0
TurnBasedMatch is an idiomatic wrapper over the Objective-C class GKTurnBasedMatch.
An object that encapsulates the match data for games where players take turns.
func FindMatchForRequest ¶ added in v0.17.0
func FindMatchForRequest(ctx context.Context, request *MatchRequest) (result *TurnBasedMatch, err error)
FindMatchForRequest creates a new match or finds an existing match that needs a player.
FindMatchForRequest blocks until the operation completes or ctx is cancelled.
func LoadMatchWithID ¶ added in v0.17.0
func LoadMatchWithID(ctx context.Context, matchID string) (result *TurnBasedMatch, err error)
LoadMatchWithID loads a specific match with the specified identifier.
LoadMatchWithID blocks until the operation completes or ctx is cancelled.
func NewTurnBasedMatch ¶ added in v0.17.0
func NewTurnBasedMatch() *TurnBasedMatch
NewTurnBasedMatch creates a new TurnBasedMatch.
func TurnBasedMatchFromID ¶ added in v0.17.0
func TurnBasedMatchFromID(id objc.ID) *TurnBasedMatch
TurnBasedMatchFromID adopts an existing Objective-C object as a TurnBasedMatch (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedMatch) AcceptInvite ¶ added in v0.17.0
func (tbm *TurnBasedMatch) AcceptInvite(ctx context.Context) (result *TurnBasedMatch, err error)
AcceptInvite accepts an invitation for the local player to join a turn-based match.
AcceptInvite blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) ActiveExchanges ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ActiveExchanges() []*TurnBasedExchange
ActiveExchanges returns the active exchanges.
ActiveExchanges returns the collection as a Go slice.
func (*TurnBasedMatch) CompletedExchanges ¶ added in v0.17.0
func (tbm *TurnBasedMatch) CompletedExchanges() []*TurnBasedExchange
CompletedExchanges returns the completed exchanges.
CompletedExchanges returns the collection as a Go slice.
func (*TurnBasedMatch) CreationDate ¶ added in v0.17.0
func (tbm *TurnBasedMatch) CreationDate() time.Time
CreationDate returns the creation date.
func (*TurnBasedMatch) CurrentParticipant ¶ added in v0.17.0
func (tbm *TurnBasedMatch) CurrentParticipant() *TurnBasedParticipant
CurrentParticipant returns the current participant.
func (*TurnBasedMatch) DeclineInvite ¶ added in v0.17.0
func (tbm *TurnBasedMatch) DeclineInvite(ctx context.Context) error
DeclineInvite declines an invitation for the local player to join a turn-based match.
DeclineInvite blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) Description ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Description() string
Description returns the object's -description text.
func (*TurnBasedMatch) EndMatchInTurnWithMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchData(ctx context.Context, matchData []byte) error
EndMatchInTurnWithMatchData ends the match.
EndMatchInTurnWithMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievements ¶ added in v0.17.0
func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchDataLeaderboardScoresAchievements(ctx context.Context, matchData []byte, scores []*LeaderboardScore, achievements obj.Object) error
EndMatchInTurnWithMatchDataLeaderboardScoresAchievements ends the match while submitting scores and achievements for all of the participants.
EndMatchInTurnWithMatchDataLeaderboardScoresAchievements blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievements ¶ added in v0.17.0
func (tbm *TurnBasedMatch) EndMatchInTurnWithMatchDataScoresAchievements(ctx context.Context, matchData []byte, scores []*Score, achievements []*Achievement) error
EndMatchInTurnWithMatchDataScoresAchievements ends the match while submitting all of the scores and achievements.
EndMatchInTurnWithMatchDataScoresAchievements blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) EndTurnWithNextParticipantMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) EndTurnWithNextParticipantMatchData(ctx context.Context, nextParticipant *TurnBasedParticipant, matchData []byte) error
EndTurnWithNextParticipantMatchData updates the data stored on Game Center for the current match.
EndTurnWithNextParticipantMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) EndTurnWithNextParticipantsTurnTimeoutMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) EndTurnWithNextParticipantsTurnTimeoutMatchData(ctx context.Context, nextParticipants []*TurnBasedParticipant, timeout float64, matchData []byte) error
EndTurnWithNextParticipantsTurnTimeoutMatchData passes the turn from the current participant to the next participant.
EndTurnWithNextParticipantsTurnTimeoutMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) ExchangeDataMaximumSize ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ExchangeDataMaximumSize() int
ExchangeDataMaximumSize returns the exchange data maximum size.
func (*TurnBasedMatch) ExchangeMaxInitiatedExchangesPerPlayer ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ExchangeMaxInitiatedExchangesPerPlayer() int
ExchangeMaxInitiatedExchangesPerPlayer returns the exchange max initiated exchanges per player.
func (*TurnBasedMatch) Exchanges ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Exchanges() []*TurnBasedExchange
Exchanges returns the exchanges.
Exchanges returns the collection as a Go slice.
func (*TurnBasedMatch) IsEqual ¶ added in v0.17.0
func (tbm *TurnBasedMatch) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedMatch) IsKind ¶ added in v0.17.0
func (tbm *TurnBasedMatch) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedMatch) LoadMatchDataWithCompletionHandler ¶ added in v0.18.0
func (tbm *TurnBasedMatch) LoadMatchDataWithCompletionHandler(completionHandler func(unsafe.Pointer, unsafe.Pointer))
LoadMatchDataWithCompletionHandler fetches your game-specific data that you store in Game Center when ending a turn, saving a turn, or leaving a match.
func (*TurnBasedMatch) MatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) MatchData() []byte
MatchData returns the match data.
func (*TurnBasedMatch) MatchDataMaximumSize ¶ added in v0.17.0
func (tbm *TurnBasedMatch) MatchDataMaximumSize() int
MatchDataMaximumSize returns the match data maximum size.
func (*TurnBasedMatch) MatchID ¶ added in v0.17.0
func (tbm *TurnBasedMatch) MatchID() string
MatchID returns the match ID.
func (*TurnBasedMatch) Message ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Message() string
Message returns the message.
func (*TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantMatchData(ctx context.Context, matchOutcome TurnBasedMatchOutcome, nextParticipant *TurnBasedParticipant, matchData []byte) error
ParticipantQuitInTurnWithOutcomeNextParticipantMatchData resigns the current player from the match without ending the match.
ParticipantQuitInTurnWithOutcomeNextParticipantMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchData(ctx context.Context, matchOutcome TurnBasedMatchOutcome, nextParticipants []*TurnBasedParticipant, timeout float64, matchData []byte) error
ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchData forfeits the match on behalf of the local player when it’s their turn.
ParticipantQuitInTurnWithOutcomeNextParticipantsTurnTimeoutMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) ParticipantQuitOutOfTurnWithOutcome ¶ added in v0.17.0
func (tbm *TurnBasedMatch) ParticipantQuitOutOfTurnWithOutcome(ctx context.Context, matchOutcome TurnBasedMatchOutcome) error
ParticipantQuitOutOfTurnWithOutcome forfeits the match on behalf of the local player when it’s not their turn.
ParticipantQuitOutOfTurnWithOutcome blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) Participants ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Participants() []*TurnBasedParticipant
Participants returns the participants.
Participants returns the collection as a Go slice.
func (*TurnBasedMatch) Rematch ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Rematch(ctx context.Context) (result *TurnBasedMatch, err error)
Rematch creates a new turn-based match with the same participants from an existing match.
Rematch blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) Remove ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Remove(ctx context.Context) error
Remove removes a match from Game Center that the local player participants in.
Remove blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) SaveCurrentTurnWithMatchData ¶ added in v0.17.0
func (tbm *TurnBasedMatch) SaveCurrentTurnWithMatchData(ctx context.Context, matchData []byte) error
SaveCurrentTurnWithMatchData saves your match data in Game Center without ending the turn.
SaveCurrentTurnWithMatchData blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) SaveMergedMatchDataWithResolvedExchanges ¶ added in v0.17.0
func (tbm *TurnBasedMatch) SaveMergedMatchDataWithResolvedExchanges(ctx context.Context, matchData []byte, exchanges []*TurnBasedExchange) error
SaveMergedMatchDataWithResolvedExchanges saves match data for completed exchanges without ending the turn.
SaveMergedMatchDataWithResolvedExchanges blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeout ¶ added in v0.17.0
func (tbm *TurnBasedMatch) SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeout(ctx context.Context, participants []*TurnBasedParticipant, data []byte, key string, arguments []string, timeout float64) (result *TurnBasedExchange, err error)
SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeout sends an exchange request that contains your game data to one or more participants.
SendExchangeToParticipantsDataLocalizableMessageKeyArgumentsTimeout blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArguments ¶ added in v0.17.0
func (tbm *TurnBasedMatch) SendReminderToParticipantsLocalizableMessageKeyArguments(ctx context.Context, participants []*TurnBasedParticipant, key string, arguments []string) error
SendReminderToParticipantsLocalizableMessageKeyArguments sends a reminder from one participant to a specific set of other participants.
SendReminderToParticipantsLocalizableMessageKeyArguments blocks until the operation completes or ctx is cancelled.
func (*TurnBasedMatch) SetLocalizableMessageWithKeyArguments ¶ added in v0.17.0
func (tbm *TurnBasedMatch) SetLocalizableMessageWithKeyArguments(key string, arguments []string)
SetLocalizableMessageWithKeyArguments sends a localized message from the current participant to all other participants when you end a turn, forfeit a match, or end a match.
func (*TurnBasedMatch) Status ¶ added in v0.17.0
func (tbm *TurnBasedMatch) Status() TurnBasedMatchStatus
Status returns the status.
func (*TurnBasedMatch) String ¶ added in v0.17.0
func (tbm *TurnBasedMatch) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TurnBasedMatch) WithMessage ¶ added in v0.17.0
func (tbm *TurnBasedMatch) WithMessage(message string) *TurnBasedMatch
WithMessage sets a message from the current participant to all other participants when you end a turn, forfeit a match, or end a match.
type TurnBasedMatchOutcome ¶ added in v0.17.0
type TurnBasedMatchOutcome int64
The state of a participant when they forfeit a match or when a match ends.
const ( TurnBasedMatchOutcomeNone TurnBasedMatchOutcome = 0 TurnBasedMatchOutcomeQuit TurnBasedMatchOutcome = 1 TurnBasedMatchOutcomeWon TurnBasedMatchOutcome = 2 TurnBasedMatchOutcomeLost TurnBasedMatchOutcome = 3 TurnBasedMatchOutcomeTied TurnBasedMatchOutcome = 4 TurnBasedMatchOutcomeTimeExpired TurnBasedMatchOutcome = 5 TurnBasedMatchOutcomeFirst TurnBasedMatchOutcome = 6 TurnBasedMatchOutcomeSecond TurnBasedMatchOutcome = 7 TurnBasedMatchOutcomeThird TurnBasedMatchOutcome = 8 TurnBasedMatchOutcomeFourth TurnBasedMatchOutcome = 9 TurnBasedMatchOutcomeCustomRange TurnBasedMatchOutcome = 16711680 )
func (TurnBasedMatchOutcome) String ¶ added in v0.17.0
func (e TurnBasedMatchOutcome) String() string
String returns the TurnBasedMatchOutcome constant's name, or its numeric form when the value is not a known constant.
type TurnBasedMatchStatus ¶ added in v0.17.0
type TurnBasedMatchStatus int64
The states of a match from when it’s created to when it ends.
const ( TurnBasedMatchStatusUnknown TurnBasedMatchStatus = 0 TurnBasedMatchStatusOpen TurnBasedMatchStatus = 1 TurnBasedMatchStatusEnded TurnBasedMatchStatus = 2 TurnBasedMatchStatusMatching TurnBasedMatchStatus = 3 )
func (TurnBasedMatchStatus) String ¶ added in v0.17.0
func (e TurnBasedMatchStatus) String() string
String returns the TurnBasedMatchStatus constant's name, or its numeric form when the value is not a known constant.
type TurnBasedMatchmakerViewController ¶ added in v0.17.0
TurnBasedMatchmakerViewController is an idiomatic wrapper over the Objective-C class GKTurnBasedMatchmakerViewController.
An interface that allows a player to invite other players to a turn-based match and automatch to fill any empty slots.
func NewTurnBasedMatchmakerViewControllerWithMatchRequest ¶ added in v0.17.0
func NewTurnBasedMatchmakerViewControllerWithMatchRequest(request *MatchRequest) *TurnBasedMatchmakerViewController
NewTurnBasedMatchmakerViewControllerWithMatchRequest creates a matchmaker view controller for the local player to start inviting other players to a turn-based game.
func TurnBasedMatchmakerViewControllerFromID ¶ added in v0.17.0
func TurnBasedMatchmakerViewControllerFromID(id objc.ID) *TurnBasedMatchmakerViewController
TurnBasedMatchmakerViewControllerFromID adopts an existing Objective-C object as a TurnBasedMatchmakerViewController (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedMatchmakerViewController) Description ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) Description() string
Description returns the object's -description text.
func (*TurnBasedMatchmakerViewController) IsEqual ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedMatchmakerViewController) IsKind ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedMatchmakerViewController) MatchmakingMode ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) MatchmakingMode() MatchmakingMode
MatchmakingMode returns the matchmaking mode.
func (*TurnBasedMatchmakerViewController) ShowExistingMatches ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) ShowExistingMatches() bool
ShowExistingMatches wraps the corresponding Objective-C method.
func (*TurnBasedMatchmakerViewController) String ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TurnBasedMatchmakerViewController) WithMatchmakingMode ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) WithMatchmakingMode(matchmakingMode MatchmakingMode) *TurnBasedMatchmakerViewController
WithMatchmakingMode sets the mode that a multiplayer game uses to find players.
func (*TurnBasedMatchmakerViewController) WithShowExistingMatches ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) WithShowExistingMatches(showExistingMatches bool) *TurnBasedMatchmakerViewController
WithShowExistingMatches sets a Boolean value that determines whether the view controller shows existing matches.
func (*TurnBasedMatchmakerViewController) WithTurnBasedMatchmakerDelegate ¶ added in v0.17.0
func (tbmvc *TurnBasedMatchmakerViewController) WithTurnBasedMatchmakerDelegate(turnBasedMatchmakerDelegate TurnBasedMatchmakerViewControllerDelegate) *TurnBasedMatchmakerViewController
WithTurnBasedMatchmakerDelegate sets the object that handles turn-based matchmaker view controller changes.
type TurnBasedMatchmakerViewControllerDelegate ¶ added in v0.17.0
type TurnBasedMatchmakerViewControllerDelegate interface {
// TurnBasedMatchmakerViewControllerWasCancelled the user has cancelled
TurnBasedMatchmakerViewControllerWasCancelled(viewController *TurnBasedMatchmakerViewController)
// TurnBasedMatchmakerViewControllerDidFailWithError matchmaking has failed with an error
TurnBasedMatchmakerViewControllerDidFailWithError(viewController *TurnBasedMatchmakerViewController, err error)
}
TurnBasedMatchmakerViewControllerDelegate receives the callbacks of the Objective-C protocol GKTurnBasedMatchmakerViewControllerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (TurnBasedMatchmakerViewControllerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerDidFindMatchHandler ¶ added in v0.17.0
type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerDidFindMatchHandler interface {
TurnBasedMatchmakerViewControllerDidFindMatch(viewController *TurnBasedMatchmakerViewController, match *TurnBasedMatch)
}
TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerDidFindMatchHandler is the optional GKTurnBasedMatchmakerViewControllerDelegate method turnBasedMatchmakerViewController:didFindMatch:. Implement it on a TurnBasedMatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerPlayerQuitForMatchHandler ¶ added in v0.17.0
type TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerPlayerQuitForMatchHandler interface {
TurnBasedMatchmakerViewControllerPlayerQuitForMatch(viewController *TurnBasedMatchmakerViewController, match *TurnBasedMatch)
}
TurnBasedMatchmakerViewControllerDelegateTurnBasedMatchmakerViewControllerPlayerQuitForMatchHandler is the optional GKTurnBasedMatchmakerViewControllerDelegate method turnBasedMatchmakerViewController:playerQuitForMatch:. Implement it on a TurnBasedMatchmakerViewControllerDelegate value to receive that callback; a value without it is simply never sent one.
type TurnBasedParticipant ¶ added in v0.17.0
TurnBasedParticipant is an idiomatic wrapper over the Objective-C class GKTurnBasedParticipant.
A participant in a turn-based match.
func NewTurnBasedParticipant ¶ added in v0.17.0
func NewTurnBasedParticipant() *TurnBasedParticipant
NewTurnBasedParticipant creates a new TurnBasedParticipant.
func TurnBasedParticipantFromID ¶ added in v0.17.0
func TurnBasedParticipantFromID(id objc.ID) *TurnBasedParticipant
TurnBasedParticipantFromID adopts an existing Objective-C object as a TurnBasedParticipant (nil for 0), retaining it and registering a release finalizer.
func (*TurnBasedParticipant) Description ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) Description() string
Description returns the object's -description text.
func (*TurnBasedParticipant) IsEqual ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*TurnBasedParticipant) IsKind ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*TurnBasedParticipant) LastTurnDate ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) LastTurnDate() time.Time
LastTurnDate returns the last turn date.
func (*TurnBasedParticipant) MatchOutcome ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) MatchOutcome() TurnBasedMatchOutcome
MatchOutcome returns the match outcome.
func (*TurnBasedParticipant) Player ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) Player() *Player
Player returns the player.
func (*TurnBasedParticipant) PlayerID ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) PlayerID() string
PlayerID returns the player ID.
func (*TurnBasedParticipant) Status ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) Status() TurnBasedParticipantStatus
Status returns the status.
func (*TurnBasedParticipant) String ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*TurnBasedParticipant) TimeoutDate ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) TimeoutDate() time.Time
TimeoutDate returns the timeout date.
func (*TurnBasedParticipant) WithMatchOutcome ¶ added in v0.17.0
func (tbp *TurnBasedParticipant) WithMatchOutcome(matchOutcome TurnBasedMatchOutcome) *TurnBasedParticipant
WithMatchOutcome sets the conclusion or results of a participant in a match.
type TurnBasedParticipantStatus ¶ added in v0.17.0
type TurnBasedParticipantStatus int64
The state the participant is in during the match.
const ( TurnBasedParticipantStatusUnknown TurnBasedParticipantStatus = 0 TurnBasedParticipantStatusInvited TurnBasedParticipantStatus = 1 TurnBasedParticipantStatusDeclined TurnBasedParticipantStatus = 2 TurnBasedParticipantStatusMatching TurnBasedParticipantStatus = 3 TurnBasedParticipantStatusActive TurnBasedParticipantStatus = 4 TurnBasedParticipantStatusDone TurnBasedParticipantStatus = 5 )
func (TurnBasedParticipantStatus) String ¶ added in v0.17.0
func (e TurnBasedParticipantStatus) String() string
String returns the TurnBasedParticipantStatus constant's name, or its numeric form when the value is not a known constant.
type ViewController ¶ added in v0.17.0
type ViewController interface {
}
ViewController is the Go form of the Objective-C protocol GKViewController.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type VoiceChat ¶ added in v0.17.0
VoiceChat is an idiomatic wrapper over the Objective-C class GKVoiceChat.
A voice channel that allows players to speak with each other in a multiplayer game.
func NewVoiceChat ¶ added in v0.17.0
func NewVoiceChat() *VoiceChat
NewVoiceChat creates a new VoiceChat.
func VoiceChatFromID ¶ added in v0.17.0
VoiceChatFromID adopts an existing Objective-C object as a VoiceChat (nil for 0), retaining it and registering a release finalizer.
func (*VoiceChat) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*VoiceChat) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*VoiceChat) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*VoiceChat) PlayerIDs ¶ added in v0.17.0
PlayerIDs returns * This property is obsolete. **
PlayerIDs returns the collection as a Go slice.
func (*VoiceChat) Players ¶ added in v0.17.0
Players returns the players.
Players returns the collection as a Go slice.
func (*VoiceChat) SetMuteForPlayer ¶ added in v0.17.0
SetMuteForPlayer mutes a player in a voice chat.
func (*VoiceChat) SetPlayerMuted ¶ added in v0.17.0
SetPlayerMuted mutes a player in the chat, including the local player.
func (*VoiceChat) Start ¶ added in v0.17.0
func (vc *VoiceChat) Start()
Start starts communication with other players in a channel.
func (*VoiceChat) Stop ¶ added in v0.17.0
func (vc *VoiceChat) Stop()
Stop ends communication with other players in a channel.
func (*VoiceChat) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*VoiceChat) WithActive ¶ added in v0.17.0
WithActive sets a Boolean value that indicates whether the channel is sampling the microphone.
func (*VoiceChat) WithPlayerStateUpdateHandler ¶ added in v0.18.0
func (vc *VoiceChat) WithPlayerStateUpdateHandler(playerStateUpdateHandler func(obj.Object, VoiceChatPlayerState)) *VoiceChat
WithPlayerStateUpdateHandler sets handles when a player in the chat changes state.
func (*VoiceChat) WithPlayerVoiceChatStateDidChangeHandler ¶ added in v0.18.0
func (vc *VoiceChat) WithPlayerVoiceChatStateDidChangeHandler(playerVoiceChatStateDidChangeHandler func(obj.Object, VoiceChatPlayerState)) *VoiceChat
WithPlayerVoiceChatStateDidChangeHandler sets a method that handles when a player’s voice chat changes state.
func (*VoiceChat) WithVolume ¶ added in v0.17.0
WithVolume sets the volume level for the channel.
type VoiceChatClient ¶ added in v0.17.0
type VoiceChatClient interface {
VoiceChatServiceSendDataToParticipantID(voiceChatService obj.Object, data []byte, participantID string)
ParticipantID() string
}
VoiceChatClient is the Go form of the Objective-C protocol GKVoiceChatClient.
type VoiceChatPlayerState
deprecated
added in
v0.17.0
type VoiceChatPlayerState int64
The state of a player in a voice chat.
Deprecated: No longer supported
const ( VoiceChatPlayerConnected VoiceChatPlayerState = 0 VoiceChatPlayerDisconnected VoiceChatPlayerState = 1 VoiceChatPlayerSpeaking VoiceChatPlayerState = 2 VoiceChatPlayerSilent VoiceChatPlayerState = 3 VoiceChatPlayerConnecting VoiceChatPlayerState = 4 )
func (VoiceChatPlayerState) String ¶ added in v0.17.0
func (e VoiceChatPlayerState) String() string
String returns the VoiceChatPlayerState constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- GKAccessPoint_generated.go
- GKAchievementChallenge_generated.go
- GKAchievementDescription_generated.go
- GKAchievementViewControllerDelegate_delegate_generated.go
- GKAchievementViewController_generated.go
- GKAchievement_generated.go
- GKBasePlayer_generated.go
- GKChallengeDefinition_generated.go
- GKChallengeEventHandlerDelegate_delegate_generated.go
- GKChallengeEventHandler_generated.go
- GKChallenge_generated.go
- GKChallengesViewControllerDelegate_delegate_generated.go
- GKChallengesViewController_generated.go
- GKCloudPlayer_generated.go
- GKDialogController_generated.go
- GKFriendRequestComposeViewControllerDelegate_delegate_generated.go
- GKFriendRequestComposeViewController_generated.go
- GKGameActivityDefinition_generated.go
- GKGameActivity_generated.go
- GKGameCenterControllerDelegate_delegate_generated.go
- GKGameCenterViewController_generated.go
- GKGameSession_generated.go
- GKInvite_generated.go
- GKLeaderboardEntry_generated.go
- GKLeaderboardScore_generated.go
- GKLeaderboardSet_generated.go
- GKLeaderboardViewControllerDelegate_delegate_generated.go
- GKLeaderboardViewController_generated.go
- GKLeaderboard_generated.go
- GKLocalPlayer_generated.go
- GKMatchDelegate_delegate_generated.go
- GKMatchRequest_generated.go
- GKMatch_generated.go
- GKMatchedPlayers_generated.go
- GKMatchmakerViewControllerDelegate_delegate_generated.go
- GKMatchmakerViewController_generated.go
- GKMatchmaker_generated.go
- GKNotificationBanner_generated.go
- GKPlayer_generated.go
- GKSavedGame_generated.go
- GKScoreChallenge_generated.go
- GKScore_generated.go
- GKSessionDelegate_delegate_generated.go
- GKSession_generated.go
- GKTurnBasedEventHandlerDelegate_delegate_generated.go
- GKTurnBasedEventHandler_generated.go
- GKTurnBasedExchangeReply_generated.go
- GKTurnBasedExchange_generated.go
- GKTurnBasedMatch_generated.go
- GKTurnBasedMatchmakerViewControllerDelegate_delegate_generated.go
- GKTurnBasedMatchmakerViewController_generated.go
- GKTurnBasedParticipant_generated.go
- GKVoiceChat_generated.go
- doc.go
- gamekit_classmethods_generated.go
- gamekit_constants_generated.go
- gamekit_enums_generated.go
- gamekit_errors_generated.go
- gamekit_protocols_generated.go
- gamekit_providers_generated.go
- gamekit_runtime_generated.go