Documentation Archive Developer
Search

GameKit Changes for Swift

GameKit

Removed GKPeerConnectionState [struct]
Removed GKPeerConnectionState.init(_: UInt32)
Removed GKPeerConnectionState.value
Removed GKScore.setValue(_: Int64)
Removed GKScore.value() -> Int64
Removed GKSendDataMode [struct]
Removed GKSendDataMode.init(_: UInt32)
Removed GKSendDataMode.value
Removed GKSessionMode [struct]
Removed GKSessionMode.init(_: UInt32)
Removed GKSessionMode.value
Removed GKPeerStateAvailable
Removed GKPeerStateConnected
Removed GKPeerStateConnecting
Removed GKPeerStateDisconnected
Removed GKPeerStateUnavailable
Removed GKSendDataReliable
Removed GKSendDataUnreliable
Removed GKSessionCancelledError
Removed GKSessionCannotEnableError
Removed GKSessionConnectionClosedError
Removed GKSessionConnectionFailedError
Removed GKSessionConnectivityError
Removed GKSessionDataTooBigError
Removed GKSessionDeclinedError
Removed GKSessionInProgressError
Removed GKSessionInternalError
Removed GKSessionInvalidParameterError
Removed GKSessionModeClient
Removed GKSessionModePeer
Removed GKSessionModeServer
Removed GKSessionNotConnectedError
Removed GKSessionPeerNotFoundError
Removed GKSessionSystemError
Removed GKSessionTimedOutError
Removed GKSessionTransportError
Removed GKSessionUnknownError
Removed GKTurnBasedExchangeStatus
Removed GKTurnBasedExchangeStatusActive
Removed GKTurnBasedExchangeStatusCanceled
Removed GKTurnBasedExchangeStatusComplete
Removed GKTurnBasedExchangeStatusResolved
Removed GKTurnBasedExchangeStatusUnknown
Removed GKVoiceChatServiceAudioUnavailableError
Removed GKVoiceChatServiceClientMissingRequiredMethodsError
Removed GKVoiceChatServiceInternalError
Removed GKVoiceChatServiceInvalidCallIDError
Removed GKVoiceChatServiceInvalidParameterError
Removed GKVoiceChatServiceMethodCurrentlyInvalidError
Removed GKVoiceChatServiceNetworkConfigurationError
Removed GKVoiceChatServiceNoRemotePacketsError
Removed GKVoiceChatServiceOutOfMemoryError
Removed GKVoiceChatServiceRemoteParticipantBusyError
Removed GKVoiceChatServiceRemoteParticipantCancelledError
Removed GKVoiceChatServiceRemoteParticipantDeclinedInviteError
Removed GKVoiceChatServiceRemoteParticipantHangupError
Removed GKVoiceChatServiceRemoteParticipantResponseInvalidError
Removed GKVoiceChatServiceUnableToConnectError
Removed GKVoiceChatServiceUninitializedClientError
Removed GKVoiceChatServiceUnsupportedRemoteVersionError
Modified GKAchievement
Declaration
From
class GKAchievement : NSObject, NSCoding, NSSecureCoding {
    class func loadAchievementsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    class func resetAchievementsWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    init!(identifier identifier: String!)
    init!(identifier identifier: String!, player player: GKPlayer!)
    class func reportAchievements(_ achievements: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
    var identifier: String!
    var percentComplete: Double
    var completed: Bool { get }
    @NSCopying var lastReportedDate: NSDate! { get }
    var showsCompletionBanner: Bool
    var player: GKPlayer! { get }
}
extension GKAchievement {
    func reportAchievementWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    init!(identifier identifier: String!, forPlayer playerID: String!)
    var hidden: Bool { get }
    var playerID: String! { get }
}
extension GKAchievement {
    func challengeComposeControllerWithMessage(_ message: String!, players players: [AnyObject]!, completionHandler completionHandler: GKChallengeComposeCompletionBlock!) -> NSViewController!
    func selectChallengeablePlayers(_ players: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    class func reportAchievements(_ achievements: [AnyObject]!, withEligibleChallenges challenges: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
}
extension GKAchievement {
    func selectChallengeablePlayerIDs(_ playerIDs: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func issueChallengeToPlayers(_ playerIDs: [AnyObject]!, message message: String!)
}
To
class GKAchievement : NSObject, NSCoding, NSSecureCoding {
    class func loadAchievementsWithCompletionHandler(_ completionHandler: (([GKAchievement]?, NSError?) -> Void)?)
    class func resetAchievementsWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    init(identifier identifier: String?)
    init(identifier identifier: String?, player player: GKPlayer)
    class func reportAchievements(_ achievements: [GKAchievement], withCompletionHandler completionHandler: ((NSError?) -> Void)?)
    var identifier: String?
    var percentComplete: Double
    var completed: Bool { get }
    @NSCopying var lastReportedDate: NSDate { get }
    var showsCompletionBanner: Bool
    var player: GKPlayer { get }
}
extension GKAchievement {
    func reportAchievementWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    init(identifier identifier: String?, forPlayer playerID: String)
    var hidden: Bool { get }
    var playerID: String { get }
}
extension GKAchievement {
    func challengeComposeControllerWithMessage(_ message: String?, players players: [GKPlayer], completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> NSViewController
    func selectChallengeablePlayers(_ players: [GKPlayer], withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)
    class func reportAchievements(_ achievements: [GKAchievement], withEligibleChallenges challenges: [GKChallenge], withCompletionHandler completionHandler: ((NSError?) -> Void)?)
}
extension GKAchievement {
    func selectChallengeablePlayerIDs(_ playerIDs: [String]?, withCompletionHandler completionHandler: (([String]?, NSError?) -> Void)?)
    func issueChallengeToPlayers(_ playerIDs: [String]?, message message: String?)
}

Declaration
From
func challengeComposeControllerWithMessage(_ message: String!, players players: [AnyObject]!, completionHandler completionHandler: GKChallengeComposeCompletionBlock!) -> NSViewController!
To
func challengeComposeControllerWithMessage(_ message: String?, players players: [GKPlayer], completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> NSViewController

Declaration
From
var identifier: String!
To
var identifier: String?

Declaration
From
init!(identifier identifier: String!)
To
init(identifier identifier: String?)

Declaration
From
init!(identifier identifier: String!, player player: GKPlayer!)
To
init(identifier identifier: String?, player player: GKPlayer)

Declaration
From
func issueChallengeToPlayers(_ playerIDs: [AnyObject]!, message message: String!)
To
func issueChallengeToPlayers(_ playerIDs: [String]?, message message: String?)

Declaration
From
@NSCopying var lastReportedDate: NSDate! { get }
To
@NSCopying var lastReportedDate: NSDate { get }

Declaration
From
class func loadAchievementsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadAchievementsWithCompletionHandler(_ completionHandler: (([GKAchievement]?, NSError?) -> Void)?)

Declaration
From
var player: GKPlayer! { get }
To
var player: GKPlayer { get }

Declaration
From
class func reportAchievements(_ achievements: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
class func reportAchievements(_ achievements: [GKAchievement], withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
class func reportAchievements(_ achievements: [AnyObject]!, withEligibleChallenges challenges: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
class func reportAchievements(_ achievements: [GKAchievement], withEligibleChallenges challenges: [GKChallenge], withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func reportAchievementWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
To
func reportAchievementWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)

Declaration
From
class func resetAchievementsWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
To
class func resetAchievementsWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)

Declaration
From
func selectChallengeablePlayerIDs(_ playerIDs: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func selectChallengeablePlayerIDs(_ playerIDs: [String]?, withCompletionHandler completionHandler: (([String]?, NSError?) -> Void)?)

Declaration
From
func selectChallengeablePlayers(_ players: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func selectChallengeablePlayers(_ players: [GKPlayer], withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)

Declaration
From
class GKAchievementChallenge : GKChallenge {
    var achievement: GKAchievement! { get }
}
To
class GKAchievementChallenge : GKChallenge {
    var achievement: GKAchievement? { get }
}

Declaration
From
var achievement: GKAchievement! { get }
To
var achievement: GKAchievement? { get }

Declaration
From
class GKAchievementDescription : NSObject, NSCoding, NSSecureCoding {
    class func loadAchievementDescriptionsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    var identifier: String! { get }
    var groupIdentifier: String! { get }
    var title: String! { get }
    var achievedDescription: String! { get }
    var unachievedDescription: String! { get }
    var maximumPoints: Int { get }
    var hidden: Bool { get }
    var replayable: Bool { get }
}
extension GKAchievementDescription {
    var image: NSImage! { get }
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
    class func incompleteAchievementImage() -> NSImage!
    class func placeholderCompletedAchievementImage() -> NSImage!
}
To
class GKAchievementDescription : NSObject, NSCoding, NSSecureCoding {
    class func loadAchievementDescriptionsWithCompletionHandler(_ completionHandler: (([GKAchievementDescription]?, NSError?) -> Void)?)
    var identifier: String? { get }
    var groupIdentifier: String? { get }
    var title: String? { get }
    var achievedDescription: String? { get }
    var unachievedDescription: String? { get }
    var maximumPoints: Int { get }
    var hidden: Bool { get }
    var replayable: Bool { get }
}
extension GKAchievementDescription {
    var image: NSImage? { get }
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)
    class func incompleteAchievementImage() -> NSImage
    class func placeholderCompletedAchievementImage() -> NSImage
}

Declaration
From
var achievedDescription: String! { get }
To
var achievedDescription: String? { get }

Declaration
From
var groupIdentifier: String! { get }
To
var groupIdentifier: String? { get }

Declaration
From
var identifier: String! { get }
To
var identifier: String? { get }

Declaration
From
var image: NSImage! { get }
To
var image: NSImage? { get }

Declaration
From
class func incompleteAchievementImage() -> NSImage!
To
class func incompleteAchievementImage() -> NSImage

Declaration
From
class func loadAchievementDescriptionsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadAchievementDescriptionsWithCompletionHandler(_ completionHandler: (([GKAchievementDescription]?, NSError?) -> Void)?)

Declaration
From
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
To
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)

Declaration
From
class func placeholderCompletedAchievementImage() -> NSImage!
To
class func placeholderCompletedAchievementImage() -> NSImage

Declaration
From
var title: String! { get }
To
var title: String? { get }

Declaration
From
var unachievedDescription: String! { get }
To
var unachievedDescription: String? { get }

Deprecation
From--
ToOS X 10.10

Modified GKChallenge
Declaration
From
class GKChallenge : NSObject, NSCoding, NSSecureCoding {
    class func loadReceivedChallengesWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func decline()
    var issuingPlayerID: String! { get }
    var receivingPlayerID: String! { get }
    @NSCopying var issuingPlayer: GKPlayer! { get }
    @NSCopying var receivingPlayer: GKPlayer! { get }
    var state: GKChallengeState { get }
    var issueDate: NSDate! { get }
    var completionDate: NSDate! { get }
    var message: String! { get }
}
To
class GKChallenge : NSObject, NSCoding, NSSecureCoding {
    class func loadReceivedChallengesWithCompletionHandler(_ completionHandler: (([GKChallenge]?, NSError?) -> Void)?)
    func decline()
    var issuingPlayerID: String? { get }
    var receivingPlayerID: String? { get }
    @NSCopying var issuingPlayer: GKPlayer? { get }
    @NSCopying var receivingPlayer: GKPlayer? { get }
    var state: GKChallengeState { get }
    var issueDate: NSDate { get }
    var completionDate: NSDate? { get }
    var message: String? { get }
}

Declaration
From
var completionDate: NSDate! { get }
To
var completionDate: NSDate? { get }

Declaration
From
var issueDate: NSDate! { get }
To
var issueDate: NSDate { get }

Declaration
From
@NSCopying var issuingPlayer: GKPlayer! { get }
To
@NSCopying var issuingPlayer: GKPlayer? { get }

Declaration
From
var issuingPlayerID: String! { get }
To
var issuingPlayerID: String? { get }

Declaration
From
class func loadReceivedChallengesWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadReceivedChallengesWithCompletionHandler(_ completionHandler: (([GKChallenge]?, NSError?) -> Void)?)

Declaration
From
var message: String! { get }
To
var message: String? { get }

Declaration
From
@NSCopying var receivingPlayer: GKPlayer! { get }
To
@NSCopying var receivingPlayer: GKPlayer? { get }

Declaration
From
var receivingPlayerID: String! { get }
To
var receivingPlayerID: String? { get }

Declaration
From
class GKChallengeEventHandler : NSObject {
    init!() -> GKChallengeEventHandler
    class func challengeEventHandler() -> GKChallengeEventHandler!
    unowned(unsafe) var delegate: GKChallengeEventHandlerDelegate!
}
To
class GKChallengeEventHandler : NSObject {
     init!()
    class func challengeEventHandler() -> GKChallengeEventHandler!
    unowned(unsafe) var delegate: GKChallengeEventHandlerDelegate!
}

Declaration
From
protocol GKChallengeListener : NSObjectProtocol {
    optional func player(_ player: GKPlayer!, wantsToPlayChallenge challenge: GKChallenge!)
    optional func player(_ player: GKPlayer!, didReceiveChallenge challenge: GKChallenge!)
    optional func player(_ player: GKPlayer!, didCompleteChallenge challenge: GKChallenge!, issuedByFriend friendPlayer: GKPlayer!)
    optional func player(_ player: GKPlayer!, issuedChallengeWasCompleted challenge: GKChallenge!, byFriend friendPlayer: GKPlayer!)
}
To
protocol GKChallengeListener : NSObjectProtocol {
    optional func player(_ player: GKPlayer, wantsToPlayChallenge challenge: GKChallenge)
    optional func player(_ player: GKPlayer, didReceiveChallenge challenge: GKChallenge)
    optional func player(_ player: GKPlayer, didCompleteChallenge challenge: GKChallenge, issuedByFriend friendPlayer: GKPlayer)
    optional func player(_ player: GKPlayer, issuedChallengeWasCompleted challenge: GKChallenge, byFriend friendPlayer: GKPlayer)
}

Declaration
From
optional func player(_ player: GKPlayer!, didCompleteChallenge challenge: GKChallenge!, issuedByFriend friendPlayer: GKPlayer!)
To
optional func player(_ player: GKPlayer, didCompleteChallenge challenge: GKChallenge, issuedByFriend friendPlayer: GKPlayer)

Declaration
From
optional func player(_ player: GKPlayer!, didReceiveChallenge challenge: GKChallenge!)
To
optional func player(_ player: GKPlayer, didReceiveChallenge challenge: GKChallenge)

Declaration
From
optional func player(_ player: GKPlayer!, issuedChallengeWasCompleted challenge: GKChallenge!, byFriend friendPlayer: GKPlayer!)
To
optional func player(_ player: GKPlayer, issuedChallengeWasCompleted challenge: GKChallenge, byFriend friendPlayer: GKPlayer)

Declaration
From
optional func player(_ player: GKPlayer!, wantsToPlayChallenge challenge: GKChallenge!)
To
optional func player(_ player: GKPlayer, wantsToPlayChallenge challenge: GKChallenge)

Raw Value Type
From--
ToInt

Introduction
FromOS X 10.10
ToOS X 10.8

Declaration
From
class GKDialogController : NSResponder {
    @IBOutlet unowned(unsafe) var parentWindow: NSWindow!
    func presentViewController(_ viewController: NSViewController!) -> Bool
    @IBAction func dismiss(_ sender: AnyObject!)
}
extension GKDialogController {
    class func sharedDialogController() -> GKDialogController!
}
To
class GKDialogController : NSResponder {
    @IBOutlet unowned(unsafe) var parentWindow: NSWindow?
    func presentViewController(_ viewController: NSViewController) -> Bool
    @IBAction func dismiss(_ sender: AnyObject)
}
extension GKDialogController {
    class func sharedDialogController() -> GKDialogController
}

Declaration
From
@IBAction func dismiss(_ sender: AnyObject!)
To
@IBAction func dismiss(_ sender: AnyObject)

Declaration
From
@IBOutlet unowned(unsafe) var parentWindow: NSWindow!
To
@IBOutlet unowned(unsafe) var parentWindow: NSWindow?

Declaration
From
func presentViewController(_ viewController: NSViewController!) -> Bool
To
func presentViewController(_ viewController: NSViewController) -> Bool

Declaration
From
class func sharedDialogController() -> GKDialogController!
To
class func sharedDialogController() -> GKDialogController

DeclarationProtocolsRaw Value Type
From
enum GKErrorCode : Int {
    case Unknown
    case Cancelled
    case CommunicationsFailure
    case UserDenied
    case InvalidCredentials
    case NotAuthenticated
    case AuthenticationInProgress
    case InvalidPlayer
    case ScoreNotSet
    case ParentalControlsBlocked
    case PlayerStatusExceedsMaximumLength
    case PlayerStatusInvalid
    case MatchRequestInvalid
    case Underage
    case GameUnrecognized
    case NotSupported
    case InvalidParameter
    case UnexpectedConnection
    case ChallengeInvalid
    case TurnBasedMatchDataTooLarge
    case TurnBasedTooManySessions
    case TurnBasedInvalidParticipant
    case TurnBasedInvalidTurn
    case TurnBasedInvalidState
    case InvitationsDisabled
    case PlayerPhotoFailure
    case UbiquityContainerUnavailable
}
Equatable, Hashable, RawRepresentable--
To
enum GKErrorCode : Int {
    case Unknown
    case Cancelled
    case CommunicationsFailure
    case UserDenied
    case InvalidCredentials
    case NotAuthenticated
    case AuthenticationInProgress
    case InvalidPlayer
    case ScoreNotSet
    case ParentalControlsBlocked
    case PlayerStatusExceedsMaximumLength
    case PlayerStatusInvalid
    case MatchRequestInvalid
    case Underage
    case GameUnrecognized
    case NotSupported
    case InvalidParameter
    case UnexpectedConnection
    case ChallengeInvalid
    case TurnBasedMatchDataTooLarge
    case TurnBasedTooManySessions
    case TurnBasedInvalidParticipant
    case TurnBasedInvalidTurn
    case TurnBasedInvalidState
    case InvitationsDisabled
    case PlayerPhotoFailure
    case UbiquityContainerUnavailable
}
extension GKErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
extension GKErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
Equatable, ErrorType, Hashable, RawRepresentableInt

Declaration
From
class GKFriendRequestComposeViewController : NSViewController, GKViewController {
}
extension GKFriendRequestComposeViewController {
    class func maxNumberOfRecipients() -> Int
    func setMessage(_ message: String!)
    func addRecipientPlayers(_ players: [AnyObject]!)
    func addRecipientsWithPlayerIDs(_ playerIDs: [AnyObject]!)
    func addRecipientsWithEmailAddresses(_ emailAddresses: [AnyObject]!)
    unowned(unsafe) var composeViewDelegate: GKFriendRequestComposeViewControllerDelegate!
}
To
class GKFriendRequestComposeViewController : NSViewController, GKViewController {
}
extension GKFriendRequestComposeViewController {
    class func maxNumberOfRecipients() -> Int
    func setMessage(_ message: String?)
    func addRecipientPlayers(_ players: [GKPlayer])
    func addRecipientsWithPlayerIDs(_ playerIDs: [String])
    func addRecipientsWithEmailAddresses(_ emailAddresses: [String])
    unowned(unsafe) var composeViewDelegate: GKFriendRequestComposeViewControllerDelegate?
}

Declaration
From
func addRecipientPlayers(_ players: [AnyObject]!)
To
func addRecipientPlayers(_ players: [GKPlayer])

Declaration
From
func addRecipientsWithEmailAddresses(_ emailAddresses: [AnyObject]!)
To
func addRecipientsWithEmailAddresses(_ emailAddresses: [String])

Declaration
From
func addRecipientsWithPlayerIDs(_ playerIDs: [AnyObject]!)
To
func addRecipientsWithPlayerIDs(_ playerIDs: [String])

Declaration
From
unowned(unsafe) var composeViewDelegate: GKFriendRequestComposeViewControllerDelegate!
To
unowned(unsafe) var composeViewDelegate: GKFriendRequestComposeViewControllerDelegate?

Declaration
From
func setMessage(_ message: String!)
To
func setMessage(_ message: String?)

Declaration
From
protocol GKFriendRequestComposeViewControllerDelegate {
    func friendRequestComposeViewControllerDidFinish(_ viewController: GKFriendRequestComposeViewController!)
}
To
protocol GKFriendRequestComposeViewControllerDelegate {
    func friendRequestComposeViewControllerDidFinish(_ viewController: GKFriendRequestComposeViewController)
}

Declaration
From
func friendRequestComposeViewControllerDidFinish(_ viewController: GKFriendRequestComposeViewController!)
To
func friendRequestComposeViewControllerDidFinish(_ viewController: GKFriendRequestComposeViewController)

Declaration
From
protocol GKGameCenterControllerDelegate : NSObjectProtocol {
    func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController!)
}
To
protocol GKGameCenterControllerDelegate : NSObjectProtocol {
    func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController)
}

Declaration
From
func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController!)
To
func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController)

Declaration
From
class GKGameCenterViewController : NSViewController, GKViewController {
    unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate!
    var viewState: GKGameCenterViewControllerState
}
extension GKGameCenterViewController {
    var leaderboardTimeScope: GKLeaderboardTimeScope
    var leaderboardIdentifier: String!
    var leaderboardCategory: String!
}
To
class GKGameCenterViewController : NSViewController, GKViewController {
    unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate?
    var viewState: GKGameCenterViewControllerState
}
extension GKGameCenterViewController {
    var leaderboardTimeScope: GKLeaderboardTimeScope
    var leaderboardIdentifier: String?
    var leaderboardCategory: String?
}

Declaration
From
unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate!
To
unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate?

Declaration
From
var leaderboardCategory: String!
To
var leaderboardCategory: String?

Declaration
From
var leaderboardIdentifier: String!
To
var leaderboardIdentifier: String?

Deprecation
FromOS X 10.10
To--

Raw Value Type
From--
ToInt

Modified GKInvite
Declaration
From
class GKInvite : NSObject {
    var sender: GKPlayer! { get }
    var inviter: String! { get }
    var hosted: Bool { get }
    var playerGroup: Int { get }
    var playerAttributes: UInt32 { get }
}
To
class GKInvite : NSObject {
    var sender: GKPlayer { get }
    var inviter: String { get }
    var hosted: Bool { get }
    var playerGroup: Int { get }
    var playerAttributes: UInt32 { get }
}

Declaration
From
var inviter: String! { get }
To
var inviter: String { get }

Declaration
From
var sender: GKPlayer! { get }
To
var sender: GKPlayer { get }

Declaration
From
protocol GKInviteEventListener {
    optional func player(_ player: GKPlayer!, didAcceptInvite invite: GKInvite!)
    optional func player(_ player: GKPlayer!, didRequestMatchWithRecipients recipientPlayers: [AnyObject]!)
    optional func player(_ player: GKPlayer!, didRequestMatchWithPlayers playerIDsToInvite: [AnyObject]!)
}
To
protocol GKInviteEventListener {
    optional func player(_ player: GKPlayer, didAcceptInvite invite: GKInvite)
    optional func player(_ player: GKPlayer, didRequestMatchWithRecipients recipientPlayers: [GKPlayer])
    optional func player(_ player: GKPlayer, didRequestMatchWithPlayers playerIDsToInvite: [String])
}

Declaration
From
optional func player(_ player: GKPlayer!, didAcceptInvite invite: GKInvite!)
To
optional func player(_ player: GKPlayer, didAcceptInvite invite: GKInvite)

Declaration
From
optional func player(_ player: GKPlayer!, didRequestMatchWithRecipients recipientPlayers: [AnyObject]!)
To
optional func player(_ player: GKPlayer, didRequestMatchWithRecipients recipientPlayers: [GKPlayer])

DeclarationRaw Value Type
From
enum GKInviteRecipientResponse : Int {
    case InviteRecipientResponseAccepted
    case InviteRecipientResponseDeclined
    case InviteRecipientResponseFailed
    case InviteRecipientResponseIncompatible
    case InviteRecipientResponseUnableToConnect
    case InviteRecipientResponseNoAnswer
}
--
To
enum GKInviteRecipientResponse : Int {
    case InviteRecipientResponseAccepted
    case InviteRecipientResponseDeclined
    case InviteRecipientResponseFailed
    case InviteRecipientResponseIncompatible
    case InviteRecipientResponseUnableToConnect
    case InviteRecipientResponseNoAnswer
    static var InviteeResponseAccepted: GKInviteRecipientResponse { get }
    static var InviteeResponseDeclined: GKInviteRecipientResponse { get }
    static var InviteeResponseFailed: GKInviteRecipientResponse { get }
    static var InviteeResponseIncompatible: GKInviteRecipientResponse { get }
    static var InviteeResponseUnableToConnect: GKInviteRecipientResponse { get }
    static var InviteeResponseNoAnswer: GKInviteRecipientResponse { get }
}
Int

Modified GKLeaderboard
Declaration
From
class GKLeaderboard : NSObject {
    var timeScope: GKLeaderboardTimeScope
    var playerScope: GKLeaderboardPlayerScope
    var identifier: String!
    var title: String! { get }
    var range: NSRange
    var scores: [AnyObject]! { get }
    var maxRange: Int { get }
    var localPlayerScore: GKScore! { get }
    var loading: Bool { get }
    var groupIdentifier: String! { get }
    init!()
    init!(players players: [AnyObject]!)
    func loadScoresWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    class func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
}
extension GKLeaderboard {
    var category: String!
    init!(playerIDs playerIDs: [AnyObject]!)
    class func loadCategoriesWithCompletionHandler(_ completionHandler: (([AnyObject]!, [AnyObject]!, NSError!) -> Void)!)
    class func setDefaultLeaderboard(_ leaderboardIdentifier: String!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
}
extension GKLeaderboard {
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
}
To
class GKLeaderboard : NSObject {
    var timeScope: GKLeaderboardTimeScope
    var playerScope: GKLeaderboardPlayerScope
    var identifier: String?
    var title: String? { get }
    var range: NSRange
    var scores: [GKScore]? { get }
    var maxRange: Int { get }
    var localPlayerScore: GKScore? { get }
    var loading: Bool { get }
    var groupIdentifier: String? { get }
    init()
    init(players players: [GKPlayer])
    func loadScoresWithCompletionHandler(_ completionHandler: (([GKScore]?, NSError?) -> Void)?)
    class func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([GKLeaderboard]?, NSError?) -> Void)?)
}
extension GKLeaderboard {
    var category: String?
    init?(playerIDs playerIDs: [String]?)
    class func loadCategoriesWithCompletionHandler(_ completionHandler: (([String]?, [String]?, NSError?) -> Void)?)
    class func setDefaultLeaderboard(_ leaderboardIdentifier: String?, withCompletionHandler completionHandler: ((NSError?) -> Void)?)
}
extension GKLeaderboard {
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)
}

Declaration
From
var category: String!
To
var category: String?

Declaration
From
var groupIdentifier: String! { get }
To
var groupIdentifier: String? { get }

Declaration
From
var identifier: String!
To
var identifier: String?

Declaration
From
init!()
To
init()

Declaration
From
init!(playerIDs playerIDs: [AnyObject]!)
To
init?(playerIDs playerIDs: [String]?)

Declaration
From
init!(players players: [AnyObject]!)
To
init(players players: [GKPlayer])

Declaration
From
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
To
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)

Declaration
From
class func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([GKLeaderboard]?, NSError?) -> Void)?)

Declaration
From
func loadScoresWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func loadScoresWithCompletionHandler(_ completionHandler: (([GKScore]?, NSError?) -> Void)?)

Declaration
From
var localPlayerScore: GKScore! { get }
To
var localPlayerScore: GKScore? { get }

Declaration
From
var scores: [AnyObject]! { get }
To
var scores: [GKScore]? { get }

Declaration
From
class func setDefaultLeaderboard(_ leaderboardIdentifier: String!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
class func setDefaultLeaderboard(_ leaderboardIdentifier: String?, withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
var title: String! { get }
To
var title: String? { get }

Raw Value Type
From--
ToInt

Declaration
From
class GKLeaderboardSet : NSObject, NSCoding, NSSecureCoding {
    var title: String! { get }
    var groupIdentifier: String! { get }
    var identifier: String!
    class func loadLeaderboardSetsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
}
extension GKLeaderboardSet {
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
}
To
class GKLeaderboardSet : NSObject, NSCoding, NSSecureCoding {
    var title: String { get }
    var groupIdentifier: String? { get }
    var identifier: String?
    class func loadLeaderboardSetsWithCompletionHandler(_ completionHandler: (([GKLeaderboardSet]?, NSError?) -> Void)?)
    func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([GKLeaderboard]?, NSError?) -> Void)?)
}
extension GKLeaderboardSet {
    func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)
}

Declaration
From
var groupIdentifier: String! { get }
To
var groupIdentifier: String? { get }

Declaration
From
var identifier: String!
To
var identifier: String?

Declaration
From
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage!, NSError!) -> Void)!)
To
func loadImageWithCompletionHandler(_ completionHandler: ((NSImage?, NSError?) -> Void)?)

Declaration
From
class func loadLeaderboardSetsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadLeaderboardSetsWithCompletionHandler(_ completionHandler: (([GKLeaderboardSet]?, NSError?) -> Void)?)

Declaration
From
func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func loadLeaderboardsWithCompletionHandler(_ completionHandler: (([GKLeaderboard]?, NSError?) -> Void)?)

Declaration
From
var title: String! { get }
To
var title: String { get }

Raw Value Type
From--
ToInt

Deprecation
From--
ToOS X 10.10

Modified GKLocalPlayer
Declaration
From
class GKLocalPlayer : GKPlayer {
    class func localPlayer() -> GKLocalPlayer!
    var authenticated: Bool { get }
    var underage: Bool { get }
    var authenticateHandler: ((NSViewController!, NSError!) -> Void)!
    func loadFriendPlayersWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func loadDefaultLeaderboardIdentifierWithCompletionHandler(_ completionHandler: ((String!, NSError!) -> Void)!)
    func generateIdentityVerificationSignatureWithCompletionHandler(_ completionHandler: ((NSURL!, NSData!, NSData!, UInt64, NSError!) -> Void)!)
}
extension GKLocalPlayer {
    func registerListener(_ listener: GKLocalPlayerListener!)
    func unregisterListener(_ listener: GKLocalPlayerListener!)
    func unregisterAllListeners()
}
extension GKLocalPlayer {
    func setDefaultLeaderboardCategoryID(_ categoryID: String!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func loadDefaultLeaderboardCategoryIDWithCompletionHandler(_ completionHandler: ((String!, NSError!) -> Void)!)
    func loadFriendsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func authenticateWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    var friends: [AnyObject]! { get }
}
extension GKLocalPlayer : GKSavedGameListener, NSObjectProtocol {
    func fetchSavedGamesWithCompletionHandler(_ handler: (([AnyObject]!, NSError!) -> Void)!)
    func saveGameData(_ data: NSData!, withName name: String!, completionHandler handler: ((GKSavedGame!, NSError!) -> Void)!)
    func deleteSavedGamesWithName(_ name: String!, completionHandler handler: ((NSError!) -> Void)!)
    func resolveConflictingSavedGames(_ conflictingSavedGames: [AnyObject]!, withData data: NSData!, completionHandler handler: (([AnyObject]!, NSError!) -> Void)!)
}
To
class GKLocalPlayer : GKPlayer {
    class func localPlayer() -> GKLocalPlayer
    var authenticated: Bool { get }
    var underage: Bool { get }
    var authenticateHandler: ((NSViewController?, NSError?) -> Void)?
    func loadFriendPlayersWithCompletionHandler(_ completionHandler: (([GKPlayer]?, NSError?) -> Void)?)
    func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String, completionHandler completionHandler: ((NSError?) -> Void)?)
    func loadDefaultLeaderboardIdentifierWithCompletionHandler(_ completionHandler: ((String?, NSError?) -> Void)?)
    func generateIdentityVerificationSignatureWithCompletionHandler(_ completionHandler: ((NSURL?, NSData?, NSData?, UInt64, NSError?) -> Void)?)
}
extension GKLocalPlayer {
    func registerListener(_ listener: GKLocalPlayerListener)
    func unregisterListener(_ listener: GKLocalPlayerListener)
    func unregisterAllListeners()
}
extension GKLocalPlayer {
    func setDefaultLeaderboardCategoryID(_ categoryID: String?, completionHandler completionHandler: ((NSError?) -> Void)?)
    func loadDefaultLeaderboardCategoryIDWithCompletionHandler(_ completionHandler: ((String?, NSError?) -> Void)?)
    func loadFriendsWithCompletionHandler(_ completionHandler: (([String]?, NSError?) -> Void)?)
    func authenticateWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    var friends: [String]? { get }
}
extension GKLocalPlayer : GKSavedGameListener {
    func fetchSavedGamesWithCompletionHandler(_ handler: (([GKSavedGame]?, NSError?) -> Void)?)
    func saveGameData(_ data: NSData, withName name: String, completionHandler handler: ((GKSavedGame?, NSError?) -> Void)?)
    func deleteSavedGamesWithName(_ name: String, completionHandler handler: ((NSError?) -> Void)?)
    func resolveConflictingSavedGames(_ conflictingSavedGames: [GKSavedGame], withData data: NSData, completionHandler handler: (([GKSavedGame]?, NSError?) -> Void)?)
}

Declaration
From
var authenticateHandler: ((NSViewController!, NSError!) -> Void)!
To
var authenticateHandler: ((NSViewController?, NSError?) -> Void)?

Declaration
From
func deleteSavedGamesWithName(_ name: String!, completionHandler handler: ((NSError!) -> Void)!)
To
func deleteSavedGamesWithName(_ name: String, completionHandler handler: ((NSError?) -> Void)?)

Declaration
From
func fetchSavedGamesWithCompletionHandler(_ handler: (([AnyObject]!, NSError!) -> Void)!)
To
func fetchSavedGamesWithCompletionHandler(_ handler: (([GKSavedGame]?, NSError?) -> Void)?)

Declaration
From
var friends: [AnyObject]! { get }
To
var friends: [String]? { get }

Declaration
From
func generateIdentityVerificationSignatureWithCompletionHandler(_ completionHandler: ((NSURL!, NSData!, NSData!, UInt64, NSError!) -> Void)!)
To
func generateIdentityVerificationSignatureWithCompletionHandler(_ completionHandler: ((NSURL?, NSData?, NSData?, UInt64, NSError?) -> Void)?)

Declaration
From
func loadDefaultLeaderboardCategoryIDWithCompletionHandler(_ completionHandler: ((String!, NSError!) -> Void)!)
To
func loadDefaultLeaderboardCategoryIDWithCompletionHandler(_ completionHandler: ((String?, NSError?) -> Void)?)

Declaration
From
func loadDefaultLeaderboardIdentifierWithCompletionHandler(_ completionHandler: ((String!, NSError!) -> Void)!)
To
func loadDefaultLeaderboardIdentifierWithCompletionHandler(_ completionHandler: ((String?, NSError?) -> Void)?)

Declaration
From
func loadFriendPlayersWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func loadFriendPlayersWithCompletionHandler(_ completionHandler: (([GKPlayer]?, NSError?) -> Void)?)

Declaration
From
func loadFriendsWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func loadFriendsWithCompletionHandler(_ completionHandler: (([String]?, NSError?) -> Void)?)

Declaration
From
class func localPlayer() -> GKLocalPlayer!
To
class func localPlayer() -> GKLocalPlayer

Declaration
From
func registerListener(_ listener: GKLocalPlayerListener!)
To
func registerListener(_ listener: GKLocalPlayerListener)

Declaration
From
func resolveConflictingSavedGames(_ conflictingSavedGames: [AnyObject]!, withData data: NSData!, completionHandler handler: (([AnyObject]!, NSError!) -> Void)!)
To
func resolveConflictingSavedGames(_ conflictingSavedGames: [GKSavedGame], withData data: NSData, completionHandler handler: (([GKSavedGame]?, NSError?) -> Void)?)

Declaration
From
func saveGameData(_ data: NSData!, withName name: String!, completionHandler handler: ((GKSavedGame!, NSError!) -> Void)!)
To
func saveGameData(_ data: NSData, withName name: String, completionHandler handler: ((GKSavedGame?, NSError?) -> Void)?)

Declaration
From
func setDefaultLeaderboardCategoryID(_ categoryID: String!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func setDefaultLeaderboardCategoryID(_ categoryID: String?, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func unregisterListener(_ listener: GKLocalPlayerListener!)
To
func unregisterListener(_ listener: GKLocalPlayerListener)

Modified GKMatch
Declaration
From
class GKMatch : NSObject {
    var players: [AnyObject]! { get }
    unowned(unsafe) var delegate: GKMatchDelegate!
    var expectedPlayerCount: Int { get }
    func sendData(_ data: NSData!, toPlayers players: [AnyObject]!, dataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
    func sendDataToAllPlayers(_ data: NSData!, withDataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
    func disconnect()
    func voiceChatWithName(_ name: String!) -> GKVoiceChat!
    func chooseBestHostingPlayerWithCompletionHandler(_ completionHandler: ((GKPlayer!) -> Void)!)
    func rematchWithCompletionHandler(_ completionHandler: ((GKMatch!, NSError!) -> Void)!)
}
extension GKMatch {
    func chooseBestHostPlayerWithCompletionHandler(_ completionHandler: ((String!) -> Void)!)
    func sendData(_ data: NSData!, toPlayers playerIDs: [AnyObject]!, withDataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
    var playerIDs: [AnyObject]! { get }
}
To
class GKMatch : NSObject {
    var players: [GKPlayer] { get }
    unowned(unsafe) var delegate: GKMatchDelegate?
    var expectedPlayerCount: Int { get }
    func sendData(_ data: NSData, toPlayers players: [GKPlayer], dataMode mode: GKMatchSendDataMode) throws
    func sendDataToAllPlayers(_ data: NSData, withDataMode mode: GKMatchSendDataMode) throws
    func disconnect()
    func voiceChatWithName(_ name: String) -> GKVoiceChat?
    func chooseBestHostingPlayerWithCompletionHandler(_ completionHandler: (GKPlayer?) -> Void)
    func rematchWithCompletionHandler(_ completionHandler: ((GKMatch?, NSError?) -> Void)?)
}
extension GKMatch {
    func chooseBestHostPlayerWithCompletionHandler(_ completionHandler: (String?) -> Void)
    func sendData(_ data: NSData, toPlayers playerIDs: [String], withDataMode mode: GKMatchSendDataMode) throws
    var playerIDs: [String] { get }
}

Declaration
From
func chooseBestHostingPlayerWithCompletionHandler(_ completionHandler: ((GKPlayer!) -> Void)!)
To
func chooseBestHostingPlayerWithCompletionHandler(_ completionHandler: (GKPlayer?) -> Void)

Declaration
From
func chooseBestHostPlayerWithCompletionHandler(_ completionHandler: ((String!) -> Void)!)
To
func chooseBestHostPlayerWithCompletionHandler(_ completionHandler: (String?) -> Void)

Declaration
From
unowned(unsafe) var delegate: GKMatchDelegate!
To
unowned(unsafe) var delegate: GKMatchDelegate?

Declaration
From
var playerIDs: [AnyObject]! { get }
To
var playerIDs: [String] { get }

Declaration
From
var players: [AnyObject]! { get }
To
var players: [GKPlayer] { get }

Declaration
From
func rematchWithCompletionHandler(_ completionHandler: ((GKMatch!, NSError!) -> Void)!)
To
func rematchWithCompletionHandler(_ completionHandler: ((GKMatch?, NSError?) -> Void)?)

Declaration
From
func sendData(_ data: NSData!, toPlayers players: [AnyObject]!, dataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
To
func sendData(_ data: NSData, toPlayers players: [GKPlayer], dataMode mode: GKMatchSendDataMode) throws

Declaration
From
func sendData(_ data: NSData!, toPlayers playerIDs: [AnyObject]!, withDataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
To
func sendData(_ data: NSData, toPlayers playerIDs: [String], withDataMode mode: GKMatchSendDataMode) throws

Declaration
From
func sendDataToAllPlayers(_ data: NSData!, withDataMode mode: GKMatchSendDataMode, error error: NSErrorPointer) -> Bool
To
func sendDataToAllPlayers(_ data: NSData, withDataMode mode: GKMatchSendDataMode) throws

Declaration
From
func voiceChatWithName(_ name: String!) -> GKVoiceChat!
To
func voiceChatWithName(_ name: String) -> GKVoiceChat?

Declaration
From
protocol GKMatchDelegate : NSObjectProtocol {
    optional func match(_ match: GKMatch!, didReceiveData data: NSData!, fromRemotePlayer player: GKPlayer!)
    optional func match(_ match: GKMatch!, didReceiveData data: NSData!, fromPlayer playerID: String!)
    optional func match(_ match: GKMatch!, player player: GKPlayer!, didChangeConnectionState state: GKPlayerConnectionState)
    optional func match(_ match: GKMatch!, player playerID: String!, didChangeState state: GKPlayerConnectionState)
    optional func match(_ match: GKMatch!, didFailWithError error: NSError!)
    optional func match(_ match: GKMatch!, shouldReinviteDisconnectedPlayer player: GKPlayer!) -> Bool
    optional func match(_ match: GKMatch!, shouldReinvitePlayer playerID: String!) -> Bool
}
To
protocol GKMatchDelegate : NSObjectProtocol {
    optional func match(_ match: GKMatch, didReceiveData data: NSData, fromRemotePlayer player: GKPlayer)
    optional func match(_ match: GKMatch, didReceiveData data: NSData, forRecipient recipient: GKPlayer, fromRemotePlayer player: GKPlayer)
    optional func match(_ match: GKMatch, didReceiveData data: NSData, fromPlayer playerID: String)
    optional func match(_ match: GKMatch, player player: GKPlayer, didChangeConnectionState state: GKPlayerConnectionState)
    optional func match(_ match: GKMatch, player playerID: String, didChangeState state: GKPlayerConnectionState)
    optional func match(_ match: GKMatch, didFailWithError error: NSError?)
    optional func match(_ match: GKMatch, shouldReinviteDisconnectedPlayer player: GKPlayer) -> Bool
    optional func match(_ match: GKMatch, shouldReinvitePlayer playerID: String) -> Bool
}

Declaration
From
optional func match(_ match: GKMatch!, didFailWithError error: NSError!)
To
optional func match(_ match: GKMatch, didFailWithError error: NSError?)

Declaration
From
optional func match(_ match: GKMatch!, didReceiveData data: NSData!, fromPlayer playerID: String!)
To
optional func match(_ match: GKMatch, didReceiveData data: NSData, fromPlayer playerID: String)

Declaration
From
optional func match(_ match: GKMatch!, didReceiveData data: NSData!, fromRemotePlayer player: GKPlayer!)
To
optional func match(_ match: GKMatch, didReceiveData data: NSData, fromRemotePlayer player: GKPlayer)

Declaration
From
optional func match(_ match: GKMatch!, player player: GKPlayer!, didChangeConnectionState state: GKPlayerConnectionState)
To
optional func match(_ match: GKMatch, player player: GKPlayer, didChangeConnectionState state: GKPlayerConnectionState)

Declaration
From
optional func match(_ match: GKMatch!, shouldReinviteDisconnectedPlayer player: GKPlayer!) -> Bool
To
optional func match(_ match: GKMatch, shouldReinviteDisconnectedPlayer player: GKPlayer) -> Bool

Declaration
From
optional func match(_ match: GKMatch!, shouldReinvitePlayer playerID: String!) -> Bool
To
optional func match(_ match: GKMatch, shouldReinvitePlayer playerID: String) -> Bool

Modified GKMatchmaker
Declaration
From
class GKMatchmaker : NSObject {
    class func sharedMatchmaker() -> GKMatchmaker!
    func matchForInvite(_ invite: GKInvite!, completionHandler completionHandler: ((GKMatch!, NSError!) -> Void)!)
    func findMatchForRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: ((GKMatch!, NSError!) -> Void)!)
    func findPlayersForHostedRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    func addPlayersToMatch(_ match: GKMatch!, matchRequest matchRequest: GKMatchRequest!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func cancel()
    func cancelPendingInviteToPlayer(_ player: GKPlayer!)
    func finishMatchmakingForMatch(_ match: GKMatch!)
    func queryPlayerGroupActivity(_ playerGroup: Int, withCompletionHandler completionHandler: ((Int, NSError!) -> Void)!)
    func queryActivityWithCompletionHandler(_ completionHandler: ((Int, NSError!) -> Void)!)
    func startBrowsingForNearbyPlayersWithHandler(_ reachableHandler: ((GKPlayer!, Bool) -> Void)!)
    func stopBrowsingForNearbyPlayers()
}
extension GKMatchmaker {
    var inviteHandler: ((GKInvite!, [AnyObject]!) -> Void)!
    func startBrowsingForNearbyPlayersWithReachableHandler(_ reachableHandler: ((String!, Bool) -> Void)!)
    func cancelInviteToPlayer(_ playerID: String!)
    func findPlayersForHostedMatchRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
}
To
class GKMatchmaker : NSObject {
    class func sharedMatchmaker() -> GKMatchmaker
    func matchForInvite(_ invite: GKInvite, completionHandler completionHandler: ((GKMatch?, NSError?) -> Void)?)
    func findMatchForRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: ((GKMatch?, NSError?) -> Void)?)
    func findPlayersForHostedRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)
    func addPlayersToMatch(_ match: GKMatch, matchRequest matchRequest: GKMatchRequest, completionHandler completionHandler: ((NSError?) -> Void)?)
    func cancel()
    func cancelPendingInviteToPlayer(_ player: GKPlayer)
    func finishMatchmakingForMatch(_ match: GKMatch)
    func queryPlayerGroupActivity(_ playerGroup: Int, withCompletionHandler completionHandler: ((Int, NSError?) -> Void)?)
    func queryActivityWithCompletionHandler(_ completionHandler: ((Int, NSError?) -> Void)?)
    func startBrowsingForNearbyPlayersWithHandler(_ reachableHandler: ((GKPlayer, Bool) -> Void)?)
    func stopBrowsingForNearbyPlayers()
}
extension GKMatchmaker {
    var inviteHandler: ((GKInvite, [AnyObject]?) -> Void)?
    func startBrowsingForNearbyPlayersWithReachableHandler(_ reachableHandler: ((String, Bool) -> Void)?)
    func cancelInviteToPlayer(_ playerID: String)
    func findPlayersForHostedMatchRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (([String]?, NSError?) -> Void)?)
}

Declaration
From
func addPlayersToMatch(_ match: GKMatch!, matchRequest matchRequest: GKMatchRequest!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func addPlayersToMatch(_ match: GKMatch, matchRequest matchRequest: GKMatchRequest, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func cancelInviteToPlayer(_ playerID: String!)
To
func cancelInviteToPlayer(_ playerID: String)

Declaration
From
func cancelPendingInviteToPlayer(_ player: GKPlayer!)
To
func cancelPendingInviteToPlayer(_ player: GKPlayer)

Declaration
From
func findMatchForRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: ((GKMatch!, NSError!) -> Void)!)
To
func findMatchForRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: ((GKMatch?, NSError?) -> Void)?)

Declaration
From
func findPlayersForHostedMatchRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func findPlayersForHostedMatchRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (([String]?, NSError?) -> Void)?)

Declaration
From
func findPlayersForHostedRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
func findPlayersForHostedRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)

Declaration
From
func finishMatchmakingForMatch(_ match: GKMatch!)
To
func finishMatchmakingForMatch(_ match: GKMatch)

Declaration
From
var inviteHandler: ((GKInvite!, [AnyObject]!) -> Void)!
To
var inviteHandler: ((GKInvite, [AnyObject]?) -> Void)?

Declaration
From
func matchForInvite(_ invite: GKInvite!, completionHandler completionHandler: ((GKMatch!, NSError!) -> Void)!)
To
func matchForInvite(_ invite: GKInvite, completionHandler completionHandler: ((GKMatch?, NSError?) -> Void)?)

Declaration
From
func queryActivityWithCompletionHandler(_ completionHandler: ((Int, NSError!) -> Void)!)
To
func queryActivityWithCompletionHandler(_ completionHandler: ((Int, NSError?) -> Void)?)

Declaration
From
func queryPlayerGroupActivity(_ playerGroup: Int, withCompletionHandler completionHandler: ((Int, NSError!) -> Void)!)
To
func queryPlayerGroupActivity(_ playerGroup: Int, withCompletionHandler completionHandler: ((Int, NSError?) -> Void)?)

Declaration
From
class func sharedMatchmaker() -> GKMatchmaker!
To
class func sharedMatchmaker() -> GKMatchmaker

Declaration
From
func startBrowsingForNearbyPlayersWithHandler(_ reachableHandler: ((GKPlayer!, Bool) -> Void)!)
To
func startBrowsingForNearbyPlayersWithHandler(_ reachableHandler: ((GKPlayer, Bool) -> Void)?)

Declaration
From
func startBrowsingForNearbyPlayersWithReachableHandler(_ reachableHandler: ((String!, Bool) -> Void)!)
To
func startBrowsingForNearbyPlayersWithReachableHandler(_ reachableHandler: ((String, Bool) -> Void)?)

Declaration
From
class GKMatchmakerViewController : NSViewController, GKViewController {
    unowned(unsafe) var matchmakerDelegate: GKMatchmakerViewControllerDelegate!
    var matchRequest: GKMatchRequest! { get }
    var hosted: Bool
    init!(matchRequest request: GKMatchRequest!)
    init!(invite invite: GKInvite!)
    func addPlayersToMatch(_ match: GKMatch!)
    func setHostedPlayer(_ playerID: String!, connected connected: Bool)
    func setHostedPlayer(_ player: GKPlayer!, didConnect connected: Bool)
    var defaultInvitationMessage: String!
}
To
class GKMatchmakerViewController : NSViewController, GKViewController {
    unowned(unsafe) var matchmakerDelegate: GKMatchmakerViewControllerDelegate?
    var matchRequest: GKMatchRequest { get }
    var hosted: Bool
    init?(matchRequest request: GKMatchRequest)
    init?(invite invite: GKInvite)
    func addPlayersToMatch(_ match: GKMatch)
    func setHostedPlayer(_ playerID: String, connected connected: Bool)
    func setHostedPlayer(_ player: GKPlayer, didConnect connected: Bool)
    var defaultInvitationMessage: String?
}

Declaration
From
func addPlayersToMatch(_ match: GKMatch!)
To
func addPlayersToMatch(_ match: GKMatch)

Declaration
From
var defaultInvitationMessage: String!
To
var defaultInvitationMessage: String?

Declaration
From
init!(invite invite: GKInvite!)
To
init?(invite invite: GKInvite)

Declaration
From
init!(matchRequest request: GKMatchRequest!)
To
init?(matchRequest request: GKMatchRequest)

Declaration
From
unowned(unsafe) var matchmakerDelegate: GKMatchmakerViewControllerDelegate!
To
unowned(unsafe) var matchmakerDelegate: GKMatchmakerViewControllerDelegate?

Declaration
From
var matchRequest: GKMatchRequest! { get }
To
var matchRequest: GKMatchRequest { get }

Declaration
From
func setHostedPlayer(_ playerID: String!, connected connected: Bool)
To
func setHostedPlayer(_ playerID: String, connected connected: Bool)

Declaration
From
func setHostedPlayer(_ player: GKPlayer!, didConnect connected: Bool)
To
func setHostedPlayer(_ player: GKPlayer, didConnect connected: Bool)

Declaration
From
protocol GKMatchmakerViewControllerDelegate : NSObjectProtocol {
    func matchmakerViewControllerWasCancelled(_ viewController: GKMatchmakerViewController!)
    func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFailWithError error: NSError!)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindMatch match: GKMatch!)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindHostedPlayers players: [AnyObject]!)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindPlayers playerIDs: [AnyObject]!)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, hostedPlayerDidAccept player: GKPlayer!)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didReceiveAcceptFromHostedPlayer playerID: String!)
}
To
protocol GKMatchmakerViewControllerDelegate : NSObjectProtocol {
    func matchmakerViewControllerWasCancelled(_ viewController: GKMatchmakerViewController)
    func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFailWithError error: NSError)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindMatch match: GKMatch)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindHostedPlayers players: [GKPlayer])
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindPlayers playerIDs: [String])
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, hostedPlayerDidAccept player: GKPlayer)
    optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didReceiveAcceptFromHostedPlayer playerID: String)
}

Declaration
From
func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFailWithError error: NSError!)
To
func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFailWithError error: NSError)

Declaration
From
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindHostedPlayers players: [AnyObject]!)
To
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindHostedPlayers players: [GKPlayer])

Declaration
From
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindMatch match: GKMatch!)
To
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindMatch match: GKMatch)

Declaration
From
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didFindPlayers playerIDs: [AnyObject]!)
To
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindPlayers playerIDs: [String])

Declaration
From
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, didReceiveAcceptFromHostedPlayer playerID: String!)
To
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didReceiveAcceptFromHostedPlayer playerID: String)

Declaration
From
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController!, hostedPlayerDidAccept player: GKPlayer!)
To
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, hostedPlayerDidAccept player: GKPlayer)

Declaration
From
func matchmakerViewControllerWasCancelled(_ viewController: GKMatchmakerViewController!)
To
func matchmakerViewControllerWasCancelled(_ viewController: GKMatchmakerViewController)

Declaration
From
class GKMatchRequest : NSObject {
    var minPlayers: Int
    var maxPlayers: Int
    var playerGroup: Int
    var playerAttributes: UInt32
    var recipients: [AnyObject]!
    var playersToInvite: [AnyObject]!
    var inviteMessage: String!
    var defaultNumberOfPlayers: Int
    var recipientResponseHandler: ((GKPlayer!, GKInviteRecipientResponse) -> Void)!
    var inviteeResponseHandler: ((String!, GKInviteeResponse) -> Void)!
    class func maxPlayersAllowedForMatchOfType(_ matchType: GKMatchType) -> Int
}
To
class GKMatchRequest : NSObject {
    var minPlayers: Int
    var maxPlayers: Int
    var playerGroup: Int
    var playerAttributes: UInt32
    var recipients: [GKPlayer]?
    var playersToInvite: [String]?
    var inviteMessage: String?
    var defaultNumberOfPlayers: Int
    var recipientResponseHandler: ((GKPlayer, GKInviteRecipientResponse) -> Void)?
    var inviteeResponseHandler: ((String, GKInviteeResponse) -> Void)?
    class func maxPlayersAllowedForMatchOfType(_ matchType: GKMatchType) -> Int
}

Declaration
From
var inviteeResponseHandler: ((String!, GKInviteeResponse) -> Void)!
To
var inviteeResponseHandler: ((String, GKInviteeResponse) -> Void)?

Declaration
From
var inviteMessage: String!
To
var inviteMessage: String?

Declaration
From
var playersToInvite: [AnyObject]!
To
var playersToInvite: [String]?

Declaration
From
var recipientResponseHandler: ((GKPlayer!, GKInviteRecipientResponse) -> Void)!
To
var recipientResponseHandler: ((GKPlayer, GKInviteRecipientResponse) -> Void)?

Declaration
From
var recipients: [AnyObject]!
To
var recipients: [GKPlayer]?

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToUInt

Declaration
From
class GKNotificationBanner : NSObject {
    class func showBannerWithTitle(_ title: String!, message message: String!, completionHandler completionHandler: (() -> Void)!)
    class func showBannerWithTitle(_ title: String!, message message: String!, duration duration: NSTimeInterval, completionHandler completionHandler: (() -> Void)!)
}
To
class GKNotificationBanner : NSObject {
    class func showBannerWithTitle(_ title: String?, message message: String?, completionHandler completionHandler: (() -> Void)?)
    class func showBannerWithTitle(_ title: String?, message message: String?, duration duration: NSTimeInterval, completionHandler completionHandler: (() -> Void)?)
}

Declaration
From
class func showBannerWithTitle(_ title: String!, message message: String!, completionHandler completionHandler: (() -> Void)!)
To
class func showBannerWithTitle(_ title: String?, message message: String?, completionHandler completionHandler: (() -> Void)?)

Declaration
From
class func showBannerWithTitle(_ title: String!, message message: String!, duration duration: NSTimeInterval, completionHandler completionHandler: (() -> Void)!)
To
class func showBannerWithTitle(_ title: String?, message message: String?, duration duration: NSTimeInterval, completionHandler completionHandler: (() -> Void)?)

Modified GKPlayer
Declaration
From
class GKPlayer : NSObject {
    class func loadPlayersForIdentifiers(_ identifiers: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    var playerID: String! { get }
    var displayName: String! { get }
    var alias: String! { get }
}
extension GKPlayer {
    func loadPhotoForSize(_ size: GKPhotoSize, withCompletionHandler completionHandler: ((NSImage!, NSError!) -> Void)!)
}
extension GKPlayer {
    var isFriend: Bool { get }
}
To
class GKPlayer : NSObject {
    class func loadPlayersForIdentifiers(_ identifiers: [String], withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)
    var playerID: String? { get }
    var displayName: String? { get }
    var alias: String? { get }
    class func anonymousGuestPlayerWithIdentifier(_ guestIdentifier: String) -> Self
    var guestIdentifier: String? { get }
}
extension GKPlayer {
    func loadPhotoForSize(_ size: GKPhotoSize, withCompletionHandler completionHandler: ((NSImage?, NSError?) -> Void)?)
}
extension GKPlayer {
    var isFriend: Bool { get }
}

Declaration
From
var alias: String! { get }
To
var alias: String? { get }

Declaration
From
var displayName: String! { get }
To
var displayName: String? { get }

Declaration
From
func loadPhotoForSize(_ size: GKPhotoSize, withCompletionHandler completionHandler: ((NSImage!, NSError!) -> Void)!)
To
func loadPhotoForSize(_ size: GKPhotoSize, withCompletionHandler completionHandler: ((NSImage?, NSError?) -> Void)?)

Declaration
From
class func loadPlayersForIdentifiers(_ identifiers: [AnyObject]!, withCompletionHandler completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadPlayersForIdentifiers(_ identifiers: [String], withCompletionHandler completionHandler: (([GKPlayer]?, NSError?) -> Void)?)

Declaration
From
var playerID: String! { get }
To
var playerID: String? { get }

Raw Value Type
From--
ToInt

Modified GKSavedGame
Declaration
From
class GKSavedGame : NSObject, NSCopying {
    var name: String! { get }
    var deviceName: String! { get }
    var modificationDate: NSDate! { get }
    func loadDataWithCompletionHandler(_ handler: ((NSData!, NSError!) -> Void)!)
}
To
class GKSavedGame : NSObject, NSCopying {
    var name: String? { get }
    var deviceName: String? { get }
    var modificationDate: NSDate? { get }
    func loadDataWithCompletionHandler(_ handler: ((NSData?, NSError?) -> Void)?)
}

Declaration
From
var deviceName: String! { get }
To
var deviceName: String? { get }

Declaration
From
func loadDataWithCompletionHandler(_ handler: ((NSData!, NSError!) -> Void)!)
To
func loadDataWithCompletionHandler(_ handler: ((NSData?, NSError?) -> Void)?)

Declaration
From
var modificationDate: NSDate! { get }
To
var modificationDate: NSDate? { get }

Declaration
From
var name: String! { get }
To
var name: String? { get }

Declaration
From
protocol GKSavedGameListener : NSObjectProtocol {
    optional func player(_ player: GKPlayer!, didModifySavedGame savedGame: GKSavedGame!)
    optional func player(_ player: GKPlayer!, hasConflictingSavedGames savedGames: [AnyObject]!)
}
To
protocol GKSavedGameListener : NSObjectProtocol {
    optional func player(_ player: GKPlayer, didModifySavedGame savedGame: GKSavedGame)
    optional func player(_ player: GKPlayer, hasConflictingSavedGames savedGames: [GKSavedGame])
}

Declaration
From
optional func player(_ player: GKPlayer!, didModifySavedGame savedGame: GKSavedGame!)
To
optional func player(_ player: GKPlayer, didModifySavedGame savedGame: GKSavedGame)

Declaration
From
optional func player(_ player: GKPlayer!, hasConflictingSavedGames savedGames: [AnyObject]!)
To
optional func player(_ player: GKPlayer, hasConflictingSavedGames savedGames: [GKSavedGame])

Modified GKScore
Declaration
From
class GKScore : NSObject, NSCoding, NSSecureCoding {
    init!(leaderboardIdentifier identifier: String!)
    init!(leaderboardIdentifier identifier: String!, player player: GKPlayer!)
    var formattedValue: String! { get }
    var leaderboardIdentifier: String!
    var context: UInt64
    var date: NSDate! { get }
    var player: GKPlayer! { get }
    var rank: Int { get }
    var shouldSetDefaultLeaderboard: Bool
    class func reportScores(_ scores: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
    func value() -> Int64
    func setValue(_ value: Int64)
}
extension GKScore {
    func challengeComposeControllerWithMessage(_ message: String!, players players: [AnyObject]!, completionHandler completionHandler: GKChallengeComposeCompletionBlock!) -> NSViewController!
    func issueChallengeToPlayers(_ playerIDs: [AnyObject]!, message message: String!)
    class func reportScores(_ scores: [AnyObject]!, withEligibleChallenges challenges: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
}
extension GKScore {
    init!(leaderboardIdentifier identifier: String!, forPlayer playerID: String!)
    func reportScoreWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    init!(category category: String!)
    var playerID: String! { get }
    var category: String!
}
To
class GKScore : NSObject, NSCoding, NSSecureCoding {
    init(leaderboardIdentifier identifier: String)
    init(leaderboardIdentifier identifier: String, player player: GKPlayer)
    var value: Int64
    var formattedValue: String? { get }
    var leaderboardIdentifier: String
    var context: UInt64
    var date: NSDate { get }
    var player: GKPlayer { get }
    var rank: Int { get }
    var shouldSetDefaultLeaderboard: Bool
    class func reportScores(_ scores: [GKScore], withCompletionHandler completionHandler: ((NSError?) -> Void)?)
}
extension GKScore {
    func challengeComposeControllerWithMessage(_ message: String?, players players: [GKPlayer]?, completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> NSViewController
    func issueChallengeToPlayers(_ playerIDs: [String]?, message message: String?)
    class func reportScores(_ scores: [GKScore], withEligibleChallenges challenges: [GKChallenge], withCompletionHandler completionHandler: ((NSError?) -> Void)?)
}
extension GKScore {
    init(leaderboardIdentifier identifier: String, forPlayer playerID: String)
    func reportScoreWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    init(category category: String?)
    var playerID: String { get }
    var category: String?
}

Declaration
From
var category: String!
To
var category: String?

Declaration
From
func challengeComposeControllerWithMessage(_ message: String!, players players: [AnyObject]!, completionHandler completionHandler: GKChallengeComposeCompletionBlock!) -> NSViewController!
To
func challengeComposeControllerWithMessage(_ message: String?, players players: [GKPlayer]?, completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> NSViewController

Modified GKScore.date
Declaration
From
var date: NSDate! { get }
To
var date: NSDate { get }

Declaration
From
var formattedValue: String! { get }
To
var formattedValue: String? { get }

Declaration
From
init!(category category: String!)
To
init(category category: String?)

Declaration
From
init!(leaderboardIdentifier identifier: String!)
To
init(leaderboardIdentifier identifier: String)

Declaration
From
init!(leaderboardIdentifier identifier: String!, player player: GKPlayer!)
To
init(leaderboardIdentifier identifier: String, player player: GKPlayer)

Declaration
From
func issueChallengeToPlayers(_ playerIDs: [AnyObject]!, message message: String!)
To
func issueChallengeToPlayers(_ playerIDs: [String]?, message message: String?)

Declaration
From
var leaderboardIdentifier: String!
To
var leaderboardIdentifier: String

Declaration
From
var player: GKPlayer! { get }
To
var player: GKPlayer { get }

Declaration
From
var playerID: String! { get }
To
var playerID: String { get }

Declaration
From
class func reportScores(_ scores: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
class func reportScores(_ scores: [GKScore], withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
class func reportScores(_ scores: [AnyObject]!, withEligibleChallenges challenges: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
class func reportScores(_ scores: [GKScore], withEligibleChallenges challenges: [GKChallenge], withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func reportScoreWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
To
func reportScoreWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)

Declaration
From
class GKScoreChallenge : GKChallenge {
    var score: GKScore! { get }
}
To
class GKScoreChallenge : GKChallenge {
    var score: GKScore? { get }
}

Declaration
From
var score: GKScore! { get }
To
var score: GKScore? { get }

Modified GKSession
Declaration
From
class GKSession : NSObject {
    init!(sessionID sessionID: String!, displayName name: String!, sessionMode mode: GKSessionMode)
    unowned(unsafe) var delegate: GKSessionDelegate!
    var sessionID: String! { get }
    var displayName: String! { get }
    var sessionMode: GKSessionMode { get }
    var peerID: String! { get }
    var available: Bool
    var disconnectTimeout: NSTimeInterval
    func displayNameForPeer(_ peerID: String!) -> String!
    func sendData(_ data: NSData!, toPeers peers: [AnyObject]!, withDataMode mode: GKSendDataMode, error error: NSErrorPointer) -> Bool
    func sendDataToAllPeers(_ data: NSData!, withDataMode mode: GKSendDataMode, error error: NSErrorPointer) -> Bool
    func setDataReceiveHandler(_ handler: AnyObject!, withContext context: UnsafeMutablePointer<Void>)
    func connectToPeer(_ peerID: String!, withTimeout timeout: NSTimeInterval)
    func cancelConnectToPeer(_ peerID: String!)
    func acceptConnectionFromPeer(_ peerID: String!, error error: NSErrorPointer) -> Bool
    func denyConnectionFromPeer(_ peerID: String!)
    func disconnectPeerFromAllPeers(_ peerID: String!)
    func disconnectFromAllPeers()
    func peersWithConnectionState(_ state: GKPeerConnectionState) -> [AnyObject]!
}
To
class GKSession : NSObject {
    init!(sessionID sessionID: String!, displayName name: String!, sessionMode mode: GKSessionMode)
    unowned(unsafe) var delegate: GKSessionDelegate!
    var sessionID: String! { get }
    var displayName: String! { get }
    var sessionMode: GKSessionMode { get }
    var peerID: String! { get }
    var available: Bool
    var disconnectTimeout: NSTimeInterval
    func displayNameForPeer(_ peerID: String!) -> String!
    func sendData(_ data: NSData!, toPeers peers: [AnyObject]!, withDataMode mode: GKSendDataMode) throws
    func sendDataToAllPeers(_ data: NSData!, withDataMode mode: GKSendDataMode) throws
    func setDataReceiveHandler(_ handler: AnyObject!, withContext context: UnsafeMutablePointer<Void>)
    func connectToPeer(_ peerID: String!, withTimeout timeout: NSTimeInterval)
    func cancelConnectToPeer(_ peerID: String!)
    func acceptConnectionFromPeer(_ peerID: String!) throws
    func denyConnectionFromPeer(_ peerID: String!)
    func disconnectPeerFromAllPeers(_ peerID: String!)
    func disconnectFromAllPeers()
    func peersWithConnectionState(_ state: GKPeerConnectionState) -> [AnyObject]!
}

Declaration
From
func acceptConnectionFromPeer(_ peerID: String!, error error: NSErrorPointer) -> Bool
To
func acceptConnectionFromPeer(_ peerID: String!) throws

Declaration
From
func sendData(_ data: NSData!, toPeers peers: [AnyObject]!, withDataMode mode: GKSendDataMode, error error: NSErrorPointer) -> Bool
To
func sendData(_ data: NSData!, toPeers peers: [AnyObject]!, withDataMode mode: GKSendDataMode) throws

Declaration
From
func sendDataToAllPeers(_ data: NSData!, withDataMode mode: GKSendDataMode, error error: NSErrorPointer) -> Bool
To
func sendDataToAllPeers(_ data: NSData!, withDataMode mode: GKSendDataMode) throws

Declaration
From
protocol GKSessionDelegate : NSObjectProtocol {
    optional func session(_ session: GKSession!, peer peerID: String!, didChangeState state: GKPeerConnectionState)
    optional func session(_ session: GKSession!, didReceiveConnectionRequestFromPeer peerID: String!)
    optional func session(_ session: GKSession!, connectionWithPeerFailed peerID: String!, withError error: NSError!)
    optional func session(_ session: GKSession!, didFailWithError error: NSError!)
}
To
protocol GKSessionDelegate : NSObjectProtocol {
    optional func session(_ session: GKSession, peer peerID: String, didChangeState state: GKPeerConnectionState)
    optional func session(_ session: GKSession, didReceiveConnectionRequestFromPeer peerID: String)
    optional func session(_ session: GKSession, connectionWithPeerFailed peerID: String, withError error: NSError)
    optional func session(_ session: GKSession, didFailWithError error: NSError)
}

DeclarationIntroduction
From
optional func session(_ session: GKSession!, connectionWithPeerFailed peerID: String!, withError error: NSError!)
OS X 10.10
To
optional func session(_ session: GKSession, connectionWithPeerFailed peerID: String, withError error: NSError)
OS X 10.8

DeclarationIntroduction
From
optional func session(_ session: GKSession!, didFailWithError error: NSError!)
OS X 10.10
To
optional func session(_ session: GKSession, didFailWithError error: NSError)
OS X 10.8

DeclarationIntroduction
From
optional func session(_ session: GKSession!, didReceiveConnectionRequestFromPeer peerID: String!)
OS X 10.10
To
optional func session(_ session: GKSession, didReceiveConnectionRequestFromPeer peerID: String)
OS X 10.8

DeclarationIntroduction
From
optional func session(_ session: GKSession!, peer peerID: String!, didChangeState state: GKPeerConnectionState)
OS X 10.10
To
optional func session(_ session: GKSession, peer peerID: String, didChangeState state: GKPeerConnectionState)
OS X 10.8

Declaration
From
class GKTurnBasedEventHandler : NSObject {
    class func sharedTurnBasedEventHandler() -> GKTurnBasedEventHandler!
    unowned(unsafe) var delegate: NSObject!
}
To
class GKTurnBasedEventHandler : NSObject {
    class func sharedTurnBasedEventHandler() -> GKTurnBasedEventHandler
    unowned(unsafe) var delegate: protocol<GKTurnBasedEventHandlerDelegate, NSObjectProtocol>
}

Declaration
From
unowned(unsafe) var delegate: NSObject!
To
unowned(unsafe) var delegate: protocol<GKTurnBasedEventHandlerDelegate, NSObjectProtocol>

Declaration
From
class func sharedTurnBasedEventHandler() -> GKTurnBasedEventHandler!
To
class func sharedTurnBasedEventHandler() -> GKTurnBasedEventHandler

Declaration
From
protocol GKTurnBasedEventHandlerDelegate {
    func handleInviteFromGameCenter(_ playersToInvite: [AnyObject]!)
    func handleTurnEventForMatch(_ match: GKTurnBasedMatch!, didBecomeActive didBecomeActive: Bool)
    optional func handleTurnEventForMatch(_ match: GKTurnBasedMatch!)
    optional func handleMatchEnded(_ match: GKTurnBasedMatch!)
}
To
protocol GKTurnBasedEventHandlerDelegate {
    func handleInviteFromGameCenter(_ playersToInvite: [GKPlayer])
    func handleTurnEventForMatch(_ match: GKTurnBasedMatch, didBecomeActive didBecomeActive: Bool)
    optional func handleTurnEventForMatch(_ match: GKTurnBasedMatch)
    optional func handleMatchEnded(_ match: GKTurnBasedMatch)
}

Declaration
From
func handleInviteFromGameCenter(_ playersToInvite: [AnyObject]!)
To
func handleInviteFromGameCenter(_ playersToInvite: [GKPlayer])

Declaration
From
optional func handleMatchEnded(_ match: GKTurnBasedMatch!)
To
optional func handleMatchEnded(_ match: GKTurnBasedMatch)

Declaration
From
func handleTurnEventForMatch(_ match: GKTurnBasedMatch!, didBecomeActive didBecomeActive: Bool)
To
func handleTurnEventForMatch(_ match: GKTurnBasedMatch, didBecomeActive didBecomeActive: Bool)

Declaration
From
protocol GKTurnBasedEventListener {
    optional func player(_ player: GKPlayer!, didRequestMatchWithOtherPlayers playersToInvite: [AnyObject]!)
    optional func player(_ player: GKPlayer!, receivedTurnEventForMatch match: GKTurnBasedMatch!, didBecomeActive didBecomeActive: Bool)
    optional func player(_ player: GKPlayer!, matchEnded match: GKTurnBasedMatch!)
    optional func player(_ player: GKPlayer!, receivedExchangeRequest exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
    optional func player(_ player: GKPlayer!, receivedExchangeCancellation exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
    optional func player(_ player: GKPlayer!, receivedExchangeReplies replies: [AnyObject]!, forCompletedExchange exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
    optional func player(_ player: GKPlayer!, didRequestMatchWithPlayers playerIDsToInvite: [AnyObject]!)
}
To
protocol GKTurnBasedEventListener {
    optional func player(_ player: GKPlayer, didRequestMatchWithOtherPlayers playersToInvite: [GKPlayer])
    optional func player(_ player: GKPlayer, receivedTurnEventForMatch match: GKTurnBasedMatch, didBecomeActive didBecomeActive: Bool)
    optional func player(_ player: GKPlayer, matchEnded match: GKTurnBasedMatch)
    optional func player(_ player: GKPlayer, receivedExchangeRequest exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)
    optional func player(_ player: GKPlayer, receivedExchangeCancellation exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)
    optional func player(_ player: GKPlayer, receivedExchangeReplies replies: [GKTurnBasedExchangeReply], forCompletedExchange exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)
    optional func player(_ player: GKPlayer, wantsToQuitMatch match: GKTurnBasedMatch)
    optional func player(_ player: GKPlayer, didRequestMatchWithPlayers playerIDsToInvite: [String])
}

Declaration
From
optional func player(_ player: GKPlayer!, didRequestMatchWithOtherPlayers playersToInvite: [AnyObject]!)
To
optional func player(_ player: GKPlayer, didRequestMatchWithOtherPlayers playersToInvite: [GKPlayer])

DeclarationIntroduction
From
optional func player(_ player: GKPlayer!, matchEnded match: GKTurnBasedMatch!)
OS X 10.10
To
optional func player(_ player: GKPlayer, matchEnded match: GKTurnBasedMatch)
OS X 10.8

Declaration
From
optional func player(_ player: GKPlayer!, receivedExchangeCancellation exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
To
optional func player(_ player: GKPlayer, receivedExchangeCancellation exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)

Declaration
From
optional func player(_ player: GKPlayer!, receivedExchangeReplies replies: [AnyObject]!, forCompletedExchange exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
To
optional func player(_ player: GKPlayer, receivedExchangeReplies replies: [GKTurnBasedExchangeReply], forCompletedExchange exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)

Declaration
From
optional func player(_ player: GKPlayer!, receivedExchangeRequest exchange: GKTurnBasedExchange!, forMatch match: GKTurnBasedMatch!)
To
optional func player(_ player: GKPlayer, receivedExchangeRequest exchange: GKTurnBasedExchange, forMatch match: GKTurnBasedMatch)

Declaration
From
optional func player(_ player: GKPlayer!, receivedTurnEventForMatch match: GKTurnBasedMatch!, didBecomeActive didBecomeActive: Bool)
To
optional func player(_ player: GKPlayer, receivedTurnEventForMatch match: GKTurnBasedMatch, didBecomeActive didBecomeActive: Bool)

Declaration
From
class GKTurnBasedExchange : NSObject {
    var exchangeID: String! { get }
    var sender: GKTurnBasedParticipant! { get }
    var recipients: [AnyObject]! { get }
    var status: GKTurnBasedExchangeStatus { get }
    var message: String! { get }
    var data: NSData! { get }
    var sendDate: NSDate! { get }
    var timeoutDate: NSDate! { get }
    var completionDate: NSDate! { get }
    var replies: [AnyObject]! { get }
    func cancelWithLocalizableMessageKey(_ key: String!, arguments arguments: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func replyWithLocalizableMessageKey(_ key: String!, arguments arguments: [AnyObject]!, data data: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
}
To
class GKTurnBasedExchange : NSObject {
    var exchangeID: String? { get }
    var sender: GKTurnBasedParticipant? { get }
    var recipients: [GKTurnBasedParticipant]? { get }
    var status: GKTurnBasedExchangeStatus { get }
    var message: String? { get }
    var data: NSData? { get }
    var sendDate: NSDate? { get }
    var timeoutDate: NSDate? { get }
    var completionDate: NSDate? { get }
    var replies: [GKTurnBasedExchangeReply]? { get }
    func cancelWithLocalizableMessageKey(_ key: String, arguments arguments: [String], completionHandler completionHandler: ((NSError?) -> Void)?)
    func replyWithLocalizableMessageKey(_ key: String, arguments arguments: [String], data data: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
}

Declaration
From
func cancelWithLocalizableMessageKey(_ key: String!, arguments arguments: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func cancelWithLocalizableMessageKey(_ key: String, arguments arguments: [String], completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
var completionDate: NSDate! { get }
To
var completionDate: NSDate? { get }

Declaration
From
var data: NSData! { get }
To
var data: NSData? { get }

Declaration
From
var exchangeID: String! { get }
To
var exchangeID: String? { get }

Declaration
From
var message: String! { get }
To
var message: String? { get }

Declaration
From
var recipients: [AnyObject]! { get }
To
var recipients: [GKTurnBasedParticipant]? { get }

Declaration
From
var replies: [AnyObject]! { get }
To
var replies: [GKTurnBasedExchangeReply]? { get }

Declaration
From
func replyWithLocalizableMessageKey(_ key: String!, arguments arguments: [AnyObject]!, data data: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func replyWithLocalizableMessageKey(_ key: String, arguments arguments: [String], data data: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
var sendDate: NSDate! { get }
To
var sendDate: NSDate? { get }

Declaration
From
var sender: GKTurnBasedParticipant! { get }
To
var sender: GKTurnBasedParticipant? { get }

Declaration
From
var timeoutDate: NSDate! { get }
To
var timeoutDate: NSDate? { get }

Declaration
From
class GKTurnBasedExchangeReply : NSObject {
    var recipient: GKTurnBasedParticipant! { get }
    var message: String! { get }
    var data: NSData! { get }
    var replyDate: NSDate! { get }
}
To
class GKTurnBasedExchangeReply : NSObject {
    var recipient: GKTurnBasedParticipant? { get }
    var message: String? { get }
    var data: NSData? { get }
    var replyDate: NSDate? { get }
}

Declaration
From
var data: NSData! { get }
To
var data: NSData? { get }

Declaration
From
var message: String! { get }
To
var message: String? { get }

Declaration
From
var recipient: GKTurnBasedParticipant! { get }
To
var recipient: GKTurnBasedParticipant? { get }

Declaration
From
var replyDate: NSDate! { get }
To
var replyDate: NSDate? { get }

Declaration
From
class GKTurnBasedMatch : NSObject {
    var matchID: String! { get }
    var creationDate: NSDate! { get }
    var participants: [AnyObject]! { get }
    var status: GKTurnBasedMatchStatus { get }
    var currentParticipant: GKTurnBasedParticipant! { get }
    var matchData: NSData! { get }
    func setLocalizableMessageWithKey(_ key: String!, arguments arguments: [AnyObject]!)
    var message: String!
    var matchDataMaximumSize: Int { get }
    var exchanges: [AnyObject]! { get }
    var activeExchanges: [AnyObject]! { get }
    var completedExchanges: [AnyObject]! { get }
    var exchangeDataMaximumSize: Int { get }
    var exchangeMaxInitiatedExchangesPerPlayer: Int { get }
    class func findMatchForRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
    class func loadMatchesWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
    class func loadMatchWithID(_ matchID: String!, withCompletionHandler completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
    func rematchWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
    func acceptInviteWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
    func declineInviteWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    func removeWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
    func loadMatchDataWithCompletionHandler(_ completionHandler: ((NSData!, NSError!) -> Void)!)
    func endTurnWithNextParticipants(_ nextParticipants: [AnyObject]!, turnTimeout timeout: NSTimeInterval, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipants nextParticipants: [AnyObject]!, turnTimeout timeout: NSTimeInterval, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func participantQuitOutOfTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
    func endMatchInTurnWithMatchData(_ matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func endMatchInTurnWithMatchData(_ matchData: NSData!, scores scores: [AnyObject]!, achievements achievements: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func saveCurrentTurnWithMatchData(_ matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func saveMergedMatchData(_ matchData: NSData!, withResolvedExchanges exchanges: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func sendExchangeToParticipants(_ participants: [AnyObject]!, data data: NSData!, localizableMessageKey key: String!, arguments arguments: [AnyObject]!, timeout timeout: NSTimeInterval, completionHandler completionHandler: ((GKTurnBasedExchange!, NSError!) -> Void)!)
    func sendReminderToParticipants(_ participants: [AnyObject]!, localizableMessageKey key: String!, arguments arguments: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func endTurnWithNextParticipant(_ nextParticipant: GKTurnBasedParticipant!, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
    func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipant nextParticipant: GKTurnBasedParticipant!, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
}
To
class GKTurnBasedMatch : NSObject {
    var matchID: String? { get }
    var creationDate: NSDate? { get }
    var participants: [GKTurnBasedParticipant]? { get }
    var status: GKTurnBasedMatchStatus { get }
    var currentParticipant: GKTurnBasedParticipant? { get }
    var matchData: NSData? { get }
    func setLocalizableMessageWithKey(_ key: String, arguments arguments: [String]?)
    var message: String?
    var matchDataMaximumSize: Int { get }
    var exchanges: [GKTurnBasedExchange]? { get }
    var activeExchanges: [GKTurnBasedExchange]? { get }
    var completedExchanges: [GKTurnBasedExchange]? { get }
    var exchangeDataMaximumSize: Int { get }
    var exchangeMaxInitiatedExchangesPerPlayer: Int { get }
    class func findMatchForRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (GKTurnBasedMatch?, NSError?) -> Void)
    class func loadMatchesWithCompletionHandler(_ completionHandler: (([GKTurnBasedMatch]?, NSError?) -> Void)?)
    class func loadMatchWithID(_ matchID: String, withCompletionHandler completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)
    func rematchWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)
    func acceptInviteWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)
    func declineInviteWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    func removeWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)
    func loadMatchDataWithCompletionHandler(_ completionHandler: ((NSData?, NSError?) -> Void)?)
    func endTurnWithNextParticipants(_ nextParticipants: [GKTurnBasedParticipant], turnTimeout timeout: NSTimeInterval, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
    func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipants nextParticipants: [GKTurnBasedParticipant], turnTimeout timeout: NSTimeInterval, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
    func participantQuitOutOfTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, withCompletionHandler completionHandler: ((NSError?) -> Void)?)
    func endMatchInTurnWithMatchData(_ matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
    func endMatchInTurnWithMatchData(_ matchData: NSData, scores scores: [GKScore]?, achievements achievements: [GKAchievement]?, completionHandler completionHandler: ((NSError?) -> Void)?)
    func saveCurrentTurnWithMatchData(_ matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
    func saveMergedMatchData(_ matchData: NSData, withResolvedExchanges exchanges: [GKTurnBasedExchange], completionHandler completionHandler: ((NSError?) -> Void)?)
    func sendExchangeToParticipants(_ participants: [GKTurnBasedParticipant], data data: NSData, localizableMessageKey key: String, arguments arguments: [String], timeout timeout: NSTimeInterval, completionHandler completionHandler: ((GKTurnBasedExchange, NSError) -> Void)?)
    func sendReminderToParticipants(_ participants: [GKTurnBasedParticipant], localizableMessageKey key: String, arguments arguments: [String], completionHandler completionHandler: ((NSError?) -> Void)?)
    func endTurnWithNextParticipant(_ nextParticipant: GKTurnBasedParticipant, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
    func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipant nextParticipant: GKTurnBasedParticipant, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)
}

Declaration
From
func acceptInviteWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
To
func acceptInviteWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)

Declaration
From
var activeExchanges: [AnyObject]! { get }
To
var activeExchanges: [GKTurnBasedExchange]? { get }

Declaration
From
var completedExchanges: [AnyObject]! { get }
To
var completedExchanges: [GKTurnBasedExchange]? { get }

Declaration
From
var creationDate: NSDate! { get }
To
var creationDate: NSDate? { get }

Declaration
From
var currentParticipant: GKTurnBasedParticipant! { get }
To
var currentParticipant: GKTurnBasedParticipant? { get }

Declaration
From
func declineInviteWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
To
func declineInviteWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)

Declaration
From
func endMatchInTurnWithMatchData(_ matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func endMatchInTurnWithMatchData(_ matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func endMatchInTurnWithMatchData(_ matchData: NSData!, scores scores: [AnyObject]!, achievements achievements: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func endMatchInTurnWithMatchData(_ matchData: NSData, scores scores: [GKScore]?, achievements achievements: [GKAchievement]?, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func endTurnWithNextParticipants(_ nextParticipants: [AnyObject]!, turnTimeout timeout: NSTimeInterval, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func endTurnWithNextParticipants(_ nextParticipants: [GKTurnBasedParticipant], turnTimeout timeout: NSTimeInterval, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
var exchanges: [AnyObject]! { get }
To
var exchanges: [GKTurnBasedExchange]? { get }

Declaration
From
class func findMatchForRequest(_ request: GKMatchRequest!, withCompletionHandler completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
To
class func findMatchForRequest(_ request: GKMatchRequest, withCompletionHandler completionHandler: (GKTurnBasedMatch?, NSError?) -> Void)

Declaration
From
func loadMatchDataWithCompletionHandler(_ completionHandler: ((NSData!, NSError!) -> Void)!)
To
func loadMatchDataWithCompletionHandler(_ completionHandler: ((NSData?, NSError?) -> Void)?)

Declaration
From
class func loadMatchesWithCompletionHandler(_ completionHandler: (([AnyObject]!, NSError!) -> Void)!)
To
class func loadMatchesWithCompletionHandler(_ completionHandler: (([GKTurnBasedMatch]?, NSError?) -> Void)?)

Declaration
From
class func loadMatchWithID(_ matchID: String!, withCompletionHandler completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
To
class func loadMatchWithID(_ matchID: String, withCompletionHandler completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)

Declaration
From
var matchData: NSData! { get }
To
var matchData: NSData? { get }

Declaration
From
var matchID: String! { get }
To
var matchID: String? { get }

Declaration
From
var message: String!
To
var message: String?

Declaration
From
func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipants nextParticipants: [AnyObject]!, turnTimeout timeout: NSTimeInterval, matchData matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func participantQuitInTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, nextParticipants nextParticipants: [GKTurnBasedParticipant], turnTimeout timeout: NSTimeInterval, matchData matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func participantQuitOutOfTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, withCompletionHandler completionHandler: ((NSError!) -> Void)!)
To
func participantQuitOutOfTurnWithOutcome(_ matchOutcome: GKTurnBasedMatchOutcome, withCompletionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
var participants: [AnyObject]! { get }
To
var participants: [GKTurnBasedParticipant]? { get }

Declaration
From
func rematchWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch!, NSError!) -> Void)!)
To
func rematchWithCompletionHandler(_ completionHandler: ((GKTurnBasedMatch?, NSError?) -> Void)?)

Declaration
From
func removeWithCompletionHandler(_ completionHandler: ((NSError!) -> Void)!)
To
func removeWithCompletionHandler(_ completionHandler: ((NSError?) -> Void)?)

Declaration
From
func saveCurrentTurnWithMatchData(_ matchData: NSData!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func saveCurrentTurnWithMatchData(_ matchData: NSData, completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func saveMergedMatchData(_ matchData: NSData!, withResolvedExchanges exchanges: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func saveMergedMatchData(_ matchData: NSData, withResolvedExchanges exchanges: [GKTurnBasedExchange], completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func sendExchangeToParticipants(_ participants: [AnyObject]!, data data: NSData!, localizableMessageKey key: String!, arguments arguments: [AnyObject]!, timeout timeout: NSTimeInterval, completionHandler completionHandler: ((GKTurnBasedExchange!, NSError!) -> Void)!)
To
func sendExchangeToParticipants(_ participants: [GKTurnBasedParticipant], data data: NSData, localizableMessageKey key: String, arguments arguments: [String], timeout timeout: NSTimeInterval, completionHandler completionHandler: ((GKTurnBasedExchange, NSError) -> Void)?)

Declaration
From
func sendReminderToParticipants(_ participants: [AnyObject]!, localizableMessageKey key: String!, arguments arguments: [AnyObject]!, completionHandler completionHandler: ((NSError!) -> Void)!)
To
func sendReminderToParticipants(_ participants: [GKTurnBasedParticipant], localizableMessageKey key: String, arguments arguments: [String], completionHandler completionHandler: ((NSError?) -> Void)?)

Declaration
From
func setLocalizableMessageWithKey(_ key: String!, arguments arguments: [AnyObject]!)
To
func setLocalizableMessageWithKey(_ key: String, arguments arguments: [String]?)

Declaration
From
class GKTurnBasedMatchmakerViewController : NSViewController, GKViewController {
}
extension GKTurnBasedMatchmakerViewController {
    unowned(unsafe) var turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate!
    var showExistingMatches: Bool
    init!(matchRequest request: GKMatchRequest!)
}
To
class GKTurnBasedMatchmakerViewController : NSViewController, GKViewController {
}
extension GKTurnBasedMatchmakerViewController {
    unowned(unsafe) var turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate?
    var showExistingMatches: Bool
    init(matchRequest request: GKMatchRequest)
}

Declaration
From
init!(matchRequest request: GKMatchRequest!)
To
init(matchRequest request: GKMatchRequest)

Declaration
From
unowned(unsafe) var turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate!
To
unowned(unsafe) var turnBasedMatchmakerDelegate: GKTurnBasedMatchmakerViewControllerDelegate?

Declaration
From
protocol GKTurnBasedMatchmakerViewControllerDelegate : NSObjectProtocol {
    func turnBasedMatchmakerViewControllerWasCancelled(_ viewController: GKTurnBasedMatchmakerViewController!)
    func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, didFailWithError error: NSError!)
    func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, didFindMatch match: GKTurnBasedMatch!)
    func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, playerQuitForMatch match: GKTurnBasedMatch!)
}
To
protocol GKTurnBasedMatchmakerViewControllerDelegate : NSObjectProtocol {
    func turnBasedMatchmakerViewControllerWasCancelled(_ viewController: GKTurnBasedMatchmakerViewController)
    func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, didFailWithError error: NSError)
    optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, didFindMatch match: GKTurnBasedMatch)
    optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, playerQuitForMatch match: GKTurnBasedMatch)
}

Declaration
From
func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, didFailWithError error: NSError!)
To
func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, didFailWithError error: NSError)

DeclarationDeprecationOptional
From
func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, didFindMatch match: GKTurnBasedMatch!)
----
To
optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, didFindMatch match: GKTurnBasedMatch)
OS X 10.11yes

DeclarationDeprecationOptional
From
func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController!, playerQuitForMatch match: GKTurnBasedMatch!)
----
To
optional func turnBasedMatchmakerViewController(_ viewController: GKTurnBasedMatchmakerViewController, playerQuitForMatch match: GKTurnBasedMatch)
OS X 10.11yes

Declaration
From
func turnBasedMatchmakerViewControllerWasCancelled(_ viewController: GKTurnBasedMatchmakerViewController!)
To
func turnBasedMatchmakerViewControllerWasCancelled(_ viewController: GKTurnBasedMatchmakerViewController)

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToInt

Declaration
From
class GKTurnBasedParticipant : NSObject {
    var player: GKPlayer! { get }
    @NSCopying var lastTurnDate: NSDate! { get }
    var status: GKTurnBasedParticipantStatus { get }
    var matchOutcome: GKTurnBasedMatchOutcome
    @NSCopying var timeoutDate: NSDate! { get }
    var playerID: String! { get }
}
To
class GKTurnBasedParticipant : NSObject {
    var player: GKPlayer? { get }
    @NSCopying var lastTurnDate: NSDate? { get }
    var status: GKTurnBasedParticipantStatus { get }
    var matchOutcome: GKTurnBasedMatchOutcome
    @NSCopying var timeoutDate: NSDate? { get }
    var playerID: String? { get }
}

Declaration
From
@NSCopying var lastTurnDate: NSDate! { get }
To
@NSCopying var lastTurnDate: NSDate? { get }

Declaration
From
var player: GKPlayer! { get }
To
var player: GKPlayer? { get }

Declaration
From
var playerID: String! { get }
To
var playerID: String? { get }

Declaration
From
@NSCopying var timeoutDate: NSDate! { get }
To
@NSCopying var timeoutDate: NSDate? { get }

Raw Value Type
From--
ToInt

Modified GKVoiceChat
Declaration
From
class GKVoiceChat : NSObject {
    func start()
    func stop()
    func setPlayer(_ player: GKPlayer!, muted isMuted: Bool)
    var playerVoiceChatStateDidChangeHandler: ((GKPlayer!, GKVoiceChatPlayerState) -> Void)!
    var name: String! { get }
    var active: Bool
    var volume: Float
    var players: [AnyObject]! { get }
    class func isVoIPAllowed() -> Bool
}
extension GKVoiceChat {
    var playerIDs: [AnyObject]! { get }
    var playerStateUpdateHandler: ((String!, GKVoiceChatPlayerState) -> Void)!
    func setMute(_ isMuted: Bool, forPlayer playerID: String!)
}
To
class GKVoiceChat : NSObject {
    func start()
    func stop()
    func setPlayer(_ player: GKPlayer, muted isMuted: Bool)
    var playerVoiceChatStateDidChangeHandler: (GKPlayer, GKVoiceChatPlayerState) -> Void
    var name: String { get }
    var active: Bool
    var volume: Float
    var players: [GKPlayer] { get }
    class func isVoIPAllowed() -> Bool
}
extension GKVoiceChat {
    var playerIDs: [String] { get }
    var playerStateUpdateHandler: (String, GKVoiceChatPlayerState) -> Void
    func setMute(_ isMuted: Bool, forPlayer playerID: String)
}

Declaration
From
var name: String! { get }
To
var name: String { get }

Declaration
From
var playerIDs: [AnyObject]! { get }
To
var playerIDs: [String] { get }

Declaration
From
var players: [AnyObject]! { get }
To
var players: [GKPlayer] { get }

Declaration
From
var playerStateUpdateHandler: ((String!, GKVoiceChatPlayerState) -> Void)!
To
var playerStateUpdateHandler: (String, GKVoiceChatPlayerState) -> Void

Declaration
From
var playerVoiceChatStateDidChangeHandler: ((GKPlayer!, GKVoiceChatPlayerState) -> Void)!
To
var playerVoiceChatStateDidChangeHandler: (GKPlayer, GKVoiceChatPlayerState) -> Void

Declaration
From
func setMute(_ isMuted: Bool, forPlayer playerID: String!)
To
func setMute(_ isMuted: Bool, forPlayer playerID: String)

Declaration
From
func setPlayer(_ player: GKPlayer!, muted isMuted: Bool)
To
func setPlayer(_ player: GKPlayer, muted isMuted: Bool)

Declaration
From
protocol GKVoiceChatClient : NSObjectProtocol {
    func voiceChatService(_ voiceChatService: GKVoiceChatService!, sendData data: NSData!, toParticipantID participantID: String!)
    func participantID() -> String!
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, sendRealTimeData data: NSData!, toParticipantID participantID: String!)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didStartWithParticipantID participantID: String!)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didNotStartWithParticipantID participantID: String!, error error: NSError!)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didStopWithParticipantID participantID: String!, error error: NSError!)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didReceiveInvitationFromParticipantID participantID: String!, callID callID: Int)
}
To
protocol GKVoiceChatClient : NSObjectProtocol {
    func voiceChatService(_ voiceChatService: GKVoiceChatService, sendData data: NSData, toParticipantID participantID: String)
    func participantID() -> String
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService, sendRealTimeData data: NSData, toParticipantID participantID: String)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didStartWithParticipantID participantID: String)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didNotStartWithParticipantID participantID: String, error error: NSError?)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didStopWithParticipantID participantID: String, error error: NSError?)
    optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didReceiveInvitationFromParticipantID participantID: String, callID callID: Int)
}

Declaration
From
func participantID() -> String!
To
func participantID() -> String

Declaration
From
optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didNotStartWithParticipantID participantID: String!, error error: NSError!)
To
optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didNotStartWithParticipantID participantID: String, error error: NSError?)

Declaration
From
optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didReceiveInvitationFromParticipantID participantID: String!, callID callID: Int)
To
optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didReceiveInvitationFromParticipantID participantID: String, callID callID: Int)

Declaration
From
optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didStartWithParticipantID participantID: String!)
To
optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didStartWithParticipantID participantID: String)

Declaration
From
optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, didStopWithParticipantID participantID: String!, error error: NSError!)
To
optional func voiceChatService(_ voiceChatService: GKVoiceChatService, didStopWithParticipantID participantID: String, error error: NSError?)

Declaration
From
func voiceChatService(_ voiceChatService: GKVoiceChatService!, sendData data: NSData!, toParticipantID participantID: String!)
To
func voiceChatService(_ voiceChatService: GKVoiceChatService, sendData data: NSData, toParticipantID participantID: String)

Declaration
From
optional func voiceChatService(_ voiceChatService: GKVoiceChatService!, sendRealTimeData data: NSData!, toParticipantID participantID: String!)
To
optional func voiceChatService(_ voiceChatService: GKVoiceChatService, sendRealTimeData data: NSData, toParticipantID participantID: String)

Raw Value Type
From--
ToInt

Declaration
From
typealias GKChallengeComposeCompletionBlock = (NSViewController!, Bool, [AnyObject]!) -> Void
To
typealias GKChallengeComposeCompletionBlock = (NSViewController, Bool, [String]?) -> Void