GKInvite Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/GameKit.framework
Availability
Available in OS X v10.8 and later.
Companion guide
Declared in
GKMatchmaker.h

Overview

A GKInvite object represents a matchmaking invitation sent by another player to the local player. Your game never directly creates GKInvite objects. Instead, these objects are created by Game Kit and delivered to your game’s matchmaking event handler. See GKMatchmaker Class Reference.

The properties of the invitation object describe the match the local player is being invited to join.

Tasks

Reading Invitation Properties

Properties

hosted

A Boolean value that states whether the game is hosted on your servers. (read-only)

@property(readonly, getter=isHosted, nonatomic) BOOL hosted
Discussion

If the value of the hosted property is YES, this is a match hosted on your own server. If the value is NO, this is a peer-to-peer match using Game Center. The default is NO.

Availability
  • Available in OS X v10.8 and later.
Declared In
GKMatchmaker.h

inviter

The identifier for the player who sent the invitation. (read-only)

@property(readonly, retain, nonatomic) NSString *inviter
Availability
  • Available in OS X v10.8 and later.
Declared In
GKMatchmaker.h

playerAttributes

The player attributes for the match. (read-only)

@property(readonly, nonatomic) uint32_t playerAttributes
Discussion

The value of this property matches the playerAttributes property of the original match request used to create the match.

Availability
  • Available in OS X v10.9 and later.
Declared In
GKMatchmaker.h

playerGroup

The player group for the match. (read-only)

@property(readonly, nonatomic) NSUInteger playerGroup
Discussion

The value of this property matches the playerGroup property of the original match request used to create the match.

Availability
  • Available in OS X v10.9 and later.
Declared In
GKMatchmaker.h