← ClaudeAtlas

gamekitlisted

Integrate Game Center features using GameKit. Use when authenticating players with GKLocalPlayer, submitting scores to leaderboards, unlocking achievements, implementing real-time or turn-based multiplayer matchmaking, showing the Game Center access point or dashboard, or adding challenges and friend invitations to iOS games.
dpearson2699/swift-ios-skills · ★ 730 · AI & Automation · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# GameKit Integrate Game Center features into iOS 26+ games using GameKit and Swift 6.3. Provides player authentication, leaderboards, achievements, multiplayer matchmaking, access point, dashboard, challenges, and saved games. ## Contents - [Authentication](#authentication) - [Access Point](#access-point) - [Dashboard](#dashboard) - [Leaderboards](#leaderboards) - [Achievements](#achievements) - [Real-Time Multiplayer](#real-time-multiplayer) - [Turn-Based Multiplayer](#turn-based-multiplayer) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Authentication All GameKit features require the local player to authenticate first. Set the `authenticateHandler` on `GKLocalPlayer.local` early in the app lifecycle. GameKit calls the handler multiple times during initialization. ```swift import GameKit func authenticatePlayer() { GKLocalPlayer.local.authenticateHandler = { viewController, error in if let viewController { // Present so the player can sign in or create an account. present(viewController, animated: true) return } if let error { // Player could not sign in. Disable Game Center features. disableGameCenter() return } // Player authenticated. Check restrictions before starting. let player = GKLocalPlayer.local if player.isUnderage { hideExplicitContent() }