GameKit Changes for Swift
GameKit
Modified GKAchievement
Declaration | |
---|---|
From | 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?) -> UIViewController 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?) func challengeComposeControllerWithPlayers(_ playerIDs: [String]?, message message: String?, completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> UIViewController? } |
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?) -> UIViewController func issueChallengeToPlayers(_ playerIDs: [String]?, message message: String?) 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 challengeComposeControllerWithPlayers(_ playerIDs: [String]?, message message: String?, completionHandler completionHandler: GKChallengeComposeCompletionBlock?) -> UIViewController? } |
Modified GKGameCenterViewController
Declaration | |
---|---|
From | class GKGameCenterViewController : UINavigationController { unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate? var viewState: GKGameCenterViewControllerState } extension GKGameCenterViewController { var leaderboardTimeScope: GKLeaderboardTimeScope var leaderboardIdentifier: String? var leaderboardCategory: String? } |
To | class GKGameCenterViewController : UINavigationController { } extension GKGameCenterViewController { unowned(unsafe) var gameCenterDelegate: GKGameCenterControllerDelegate? var viewState: GKGameCenterViewControllerState } extension GKGameCenterViewController { var leaderboardTimeScope: GKLeaderboardTimeScope var leaderboardIdentifier: String? var leaderboardCategory: String? } |