iOS Developer Library

Developer

GameKit Framework Reference GKInvite Class Reference

Options
Deployment Target:

On This Page
Language:

GKInvite

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 GameKit 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.

Inheritance


Conforms To


Import Statement


Swift

import GameKit

Objective-C

@import GameKit;

Availability


Available in iOS 4.1 and later.
  • hosted hosted Property

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

    Declaration

    Swift

    var hosted: Bool { get }

    Objective-C

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

    Discussion

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

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in iOS 4.0 and later.

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

    Declaration

    Swift

    var playerAttributes: UInt32 { get }

    Objective-C

    @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.

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in iOS 6.0 and later.

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

    Declaration

    Swift

    var playerGroup: Int { get }

    Objective-C

    @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.

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in iOS 6.0 and later.

  • sender sender Property

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

    Declaration

    Swift

    var sender: GKPlayer! { get }

    Objective-C

    @property(readonly, retain, nonatomic) GKPlayer *sender

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in iOS 8.0 and later.

  • inviter inviter (iOS 8.0) Property

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

    Declaration

    Swift

    var inviter: String! { get }

    Objective-C

    @property(readonly, retain, nonatomic) NSString *inviter

    Import Statement

    Objective-C

    @import GameKit;

    Swift

    import GameKit

    Availability

    Available in iOS 4.1 and later.

    Deprecated in iOS 8.0.