← ClaudeAtlas

gamekitlisted

Integrate Game Center features using GameKit. Use when authenticating GKLocalPlayer, checking player restrictions, submitting leaderboard scores, reporting achievements, implementing real-time or turn-based matchmaking, handling GKMatch data, showing the Game Center dashboard or access point, adding challenges and friend invitations, saving game data, or verifying player identity on a server.
thiennc-tesoglobal/ios-skills · ★ 3 · Data & Documents · score 66
Install: claude install-skill thiennc-tesoglobal/ios-skills
# GameKit Use GameKit for Game Center authentication, competition, matchmaking, social surfaces, and saved-game handoffs; keep rendering, board logic, and full SharePlay group-activity design in their owning framework skills. ## 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() }