Create apps that allow players to interact with each other using GameKit.

GameKit Documentation

Posts under GameKit subtopic

Post

Replies

Boosts

Views

Activity

Game Center Challenges and Activities are not appearing
Hi, I'm trying to add game center challenges and activities to an already live game, but they are not appearing in game for testing, GameCenter, or the Games app. I know the game is setup with GameKit entitlements since this is a live game and it has working leaderboards and achievements. I've updated to Tahoe beta 8, added a challenge and activity on app store connect, added that to a new distribution and added that distribution to 'Add for Review' I'm using Unity and the Apple Unity plugin Not sure what other steps I'm missing Thanks
0
0
13
2h
GKLeaderboard.LoadLeaderboards() return empty when testing on Xcode with local gamekit file (Unity)
var allLeaderboards = await GKLeaderboard.LoadLeaderboards(); Log(allLeaderboards.Count); // returns 0 What am I missing?? What doesn’t work: await GKGameActivityDefinition.LoadGameActivityDefinitions() → count = 0 await GKLeaderboard.LoadLeaderboards() (no args) → 0 leaderboards await GKLeaderboard.LoadLeaderboards("MY ID") → returns 0 GkGameActivity.SetScoreOnLeaderboard(Leaderboard, score, context); returns an error since my Leaderboard is null. Activities and leaderboards are defined in GameCenterResources.gamekit in Xcode. Achievements that I add locally in the .gamekit file do not appear at runtime either; only ASC live ones show. ** What works:** xcode- debug- Gamekit- Manage Game progress- I can submit new scores with the plus button and see the notification on my device. await GKLocalPlayer.Authenticate() succeeds. await GKAchievement.LoadAchievements() returns the list of achievements configured in App Store Connect- but not any new local achievements created in Xcode in GameCenterResources.gamekit Environment Device/OS: iPhone on iOS 26.0 beta (Game Center sandbox) Xcode: 26.0 beta 6 Unity: 2022.3.21 Apple GameKit Unity plugin: 2025-beta1 (GameKit package) Signing: Game Center capability enabled; using development provisioning profile GameKit resources: GameCenterResources.gamekit in project (Target: Unity-iPhone), appears under Build Phases → Copy Bundle Resources
0
0
28
3h
Unity GameKit plugin beta GameKit Activity UnsupportedOperationForOSVersion
I’m running into unexpected problems with the Unity GameKit plugin setup with the new Activities. I didn’t see anyone else mentioning these issues, so my guess is that it’s a problem with my setup. The authentication (GKLocalPlayer.Authenticate()) works as expected, but any call to the new GameActivity functionality (e.g. GKGameActivityDefinition.LoadGameActivityDefinitions() or GKGameActivity.WantsToPlay) gives me an exception with a 'UnsupportedOperationForOSVersion' reason despite it running on an iOS 18.6.1 device. I’m using a completely empty Unity 2022.3.62f1 project that only contains the official authentication example, followed by an event handler for activities from another example and the Unity core and gamekit plugins. The setup: macOS 15.6 Xcode 26 beta 6 (also tried with 5) Physical iPhone device running iOS 18.6.1 Unity 2022.3.62f1, which satisfies the requirements Unity plugin, Xcode setup, and build steps: I Followed the official beta branch build steps for Unity plugins with python3 build.py -m iOS iPhoneSimulator macOS -p Core GameKit which ran through after a slight modification for the macOS target that somehow contained an unknown team reference for the GameKitWrapper project, which I changed to not reference a team and use ‘sign to run locally’, as was the case for the other packages. As far as I understood the macOS version is not strictly necessary either way just for running it on a local iOS device(?) I Imported these as tarball packages into the empty Unity 2022.3.62f1 project as per the official instructions, which seems to work as expected Added a single script with the mentioned example code added in a MonoBehavior.Start Building in Unity works as expected as well, creating the Xcode project The Unity-iPhone target has the GameKit framework linked (’do not embed’) and the GameCenter capability was added automatically as expected The GameKit framework seems to not be added to the UnityFramework target, but I don’t think this is necessary? Quickly testing this with the GameKit framework added there as well didn’t make a difference The linked GameKit framework is indeed the expected Xcode 26 beta version I can then build and run this on the physical iPhone iOS 18.6.1 device, where I get an ‘UnsupportedOperationForOSVersion’ as soon as I try to subscribe to deeplinking events (GKGameActivity.WantsToPlay) or use other GameKit Activity functionality from the official examples: // log showing that it's actually running on iOS 18.6: [Apple.Core Plug-In Runtime] Availability Runtime Environment: iOS 18.6 Apple.Core.Availability:OnApplicationStart() // and the exception I get: GameKitException: Code=-7 Domain=GKErrorDomain Description=The operation couldn’t be completed. (GKErrorDomain error -7.) (UnsupportedOperationForOSVersion) at Apple.GameKit.DefaultNSErrorHandler.ThrowNSError (System.IntPtr nsErrorPtr) [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initializer for 'Apple.GameKit.GKGameActivity' threw an exception. I unfortunately didn’t find any clues as to why this happens and how to resolve it on this forum or otherwise. Changing the minimum iOS version - up to 18.6 from the previously used (Unity export default) 12.0 for any and all targets - did not yield a different result I'd rather not update the phone to use the iOS 26 beta, though as far as I understood this is not necessary Any pointers to what I might be missing or doing wrong are greatly appreciated! Thank you very much in advance!
2
0
387
1w
GKAccessPoint triggerAccessPointWithState handler not invoked on iOS 26.0 and iOS 15.8.4
GKAccessPoint triggerAccessPointWithState handler not invoked on iOS 26.0 and iOS 15.8.4 Incorrect/Unexpected Behaviour: When calling [GKAccessPoint.shared triggerAccessPointWithState:GKGameCenterViewControllerStateAchievements handler:^{}] on a real device running iOS 26 beta (iOS 26), the overlay appears as expected, but the handler block is never called. This behavior also not working correctly on previous iOS versions(tested on iOS 15.8.4) Steps to Reproduce: Authenticate GKLocalPlayer Call triggerAccessPointWithState:handler: with a block that logs or performs logic Observe that overlay appears, but block is not executed Behavior: UI appears correctly Handler is not invoked at all Expected Result: The handler should fire immediately after the dashboard is shown. Actual Result: The handler is never called. Usecase: As GKGameCenterViewController is deprecated we are moving to GKAccesspoint but due to above functionality issue we are unable to. Environment: Device: iPhone 16, iPhone 7 iOS: 26.0 and iOS 15.8.4 Xcode: 26.0 beta and Xcode 16.4
3
0
118
1w
Monthly recurring leaderboard and placement achievement?
I would like a monthly recurring leaderboard, but the most days one can set for the recurring leaderboard is 30, and some months have 31 days (or 28/29). This is dumb. I guess I have to manually reset a classic leaderboard each month to get this result? Additionally once it closes and is about to reset (I also have daily recurring leaderboards), I'd like to grant the top placers on the leaderboard a corresponding achievement, but I don't see any way of doing this. I believe I can do all these things on PlayFab, but it'll take a bit more work, and eventually cost. Any one have advise?
1
0
77
2w
GKLocalPlayer.authenticateHandler not called on iOS 26 when Game Center auth overlay is shown
Hi — we’re testing our app on iOS 26 and ran into strange behavior with GKLocalPlayer.local.authenticateHandler. GKLocalPlayer.local.authenticateHandler = { [weak self] viewController, error in // additional code } What happens: When we assign authenticateHandler on iOS 26 and the user is not signed in to Game Center, the system shows a full-screen Game Center overlay asking the user to sign in. If the user taps Cancel, nothing further happens — the closure is not invoked again, so we don’t receive an error or any callback. The app never learns whether the auth was cancelled or failed. In previous iOS versions the closure was called (with viewController / error as appropriate) and the flow worked as expected. What we tried: Verified authenticateHandler is being set. Checked GKLocalPlayer.local.isAuthenticated after the overlay dismisses — it’s unchanged. Observed system logs: a com.apple.GameOverlayUI scene is created and later removed (so the auth overlay is shown by the system). Confirmed the same code works on earlier iOS versions. :thinking: Question: Has anyone seen authenticateHandler not being invoked on iOS 26 when the Game Center auth overlay is presented? Could this be a behavioral change in iOS 26 (overlay runs in a separate system process), or a bug? Any suggested workarounds to reliably detect that the user cancelled the sign-in (for example: listening for willResignActive / didBecomeActive, watching for a system overlay, or saving/presenting the viewController manually)? Thanks in advance for any advice — we’d appreciate pointers or suggested diagnostics ?
2
1
182
2w
App not showing in Game Center “All Activity” after release
Hello — I shipped an App Store build that signs in to Game Center using the Apple Unity Plugins (GameKit). The login banner appears, but my app still doesn’t show up in Game Center’s “All activity” (You started playing XXX 2d ago) What I’ve done Call await GKLocalPlayer.Authenticate(); “Game Center” is enabled for the current version in App Store Connect Confirmed: other App Store games do appear under “All Activity” on the same device/account Timeline: This is the first version that enables Game Center (not the app’s first release), and it has been about 2 hours since this build went live. Questions Is authentication alone sufficient for “Recently Played,” or is at least one Game Center component (leaderboards, achievements, activities, multiplayer) required? Is there a typical propagation delay before “Recently Played” starts showing a newly enabled app/version? Is there anything else I should configure in App Store Connect or entitlements to make “Recently Played” visible? Thanks for any help.
2
0
487
2w
GameKit Achievements, Leaderboards and Challenges not showing on iOS 26 beta 4 in the Game Center UI (opened from GKAccessPoint)
On an iPad running iPadOS 26 beta 4, when tapping the Game Center Access Point, the overlay doesn’t show the configured achievements, leaderboards or challenges. I should specify this is an in-development app and the achievements and leaderboards are in the “Not Live” state, however they show on other devices running iOS 18 in the Access Point UI. Anyone else having this issue? If so, how should I test achievements and leaderboards while iOS 26 beta is out? The UI looks like this on iPadOS 26:
2
0
190
Jul ’25
Issues building Unity plug-in project: Cannot locate native library Apple.Core/Apple.GameKit for iOS
I'm having issues getting a well built package from the Apple Unity Plug-in project. When building the my game project in Unity the following error is printed to the console: Apple.Core.AppleNativeLibraryUtility] Cannot locate a Debug or Release Apple.Core native library for iOS. Please ensure that the build invocation (build.py, xcodebuild, or Xcode) compiled cleanly and that the build was configured to support Debug on iOS. As far as I can tell the build did compile cleanly, but I might be missing something. If anyone can see what I'm doing wrong or has any insight it would be greatly appreciated. Setup is the following: macOS Tahoe 26 Beta Xcode-beta Version 26.0 beta 3 (17A5276g) Unity Plug-in branch: 2025-beta1 Unity game project version: 2022.3.60f M1 Macbook Pro The built packages have been imported into the game project through the Unity Package Manager using the tarball option pointing to the built packages from the Unity Plug-in project. The Unity Plug-in project has been built using the build.py file with the following: python3 build.py -m iOS iPhoneSimulator -p Core GameKit CoreHaptics GameController -k all The output is available in the attached file. build-output.txt Here's an image of the NativeLibraries~ folder inside the built Apple.Core package.
2
0
250
Jul ’25
Blurry Game Center Achievement Images?
Hey all — I’ve been building out my first set of Game Center Achievements for a game I’m working on, and I’ve run into something odd with the image quality. The specs say to upload icons at 512x512 or 1024x1024@2x. I’ve been uploading 1024x1024 PNGs (without explicitly naming them “@2x” since there’s only one upload slot), assuming that Game Center would just handle the scaling automatically — kind of like how a lot of things are getting more streamlined across platforms lately. But in testing, the icons are showing up a bit blurry, especially in the Game Center interface. It’s not horrible, but it’s definitely softer than I expected — more like low-res than Retina. All my test devices (outside the Simulator) are running iOS 26, so I’m also wondering if this might be a beta-related display bug? Has anyone else run into this? Curious if I’m missing a best practice here, or if I really do need to ensure I’m uploading it with the @2x suffix, or maybe something else entirely? Thanks!
2
1
104
Jun ’25
How to verify with the appropriate signing authority that Apple signed the public key
Hello I trying to implement authentication via apple services in unity game with server made as another unity app On client side I succesfully got teamPlayerID signature salt timestamp publicKeyUrl According to this documentation https://developer.apple.com/documentation/gamekit/gklocalplayer/fetchitems(foridentityverificationsignature:)?language=objc I have to Verify with the appropriate signing authority that Apple signed the public key. As I said my server is special build of unity project So now I have this kind of C# programm to check apple authority over public certificate i got from publicKeyUrl TextAsset textAsset; byte[] bytes; textAsset = Resources.Load&lt;TextAsset&gt;("AppleRootCA-G3"); bytes = textAsset.bytes; rootCert.ChainPolicy.ExtraStore.Add(new X509Certificate2(bytes)); textAsset = Resources.Load&lt;TextAsset&gt;("AppleRootCA-G2"); bytes = textAsset.bytes; rootCert.ChainPolicy.ExtraStore.Add(new X509Certificate2(bytes)); textAsset = Resources.Load&lt;TextAsset&gt;("AppleIncRootCertificate"); bytes = textAsset.bytes; rootCert.ChainPolicy.ExtraStore.Add(new X509Certificate2(bytes)); rootCert.Build(cert); Where cert is X509Certificate2 object I ge from publicKeyUrl AppleIncRootCertificate AppleRootCA-G2 AppleRootCA-G3 is certificates I got from https://www.apple.com/certificateauthority/ But it is not work Anytime rootCert.Build(cert); return false Why it is not work? May be I build keychain using wrong root CA cert? Or whole approach incorrect? Please help
1
0
73
Jun ’25
GameKit not working as expected in iOS 26.
I just upgraded my macOS, Xcode and Simulator all to the newest beta version 26. Then I found two issues when building my app with Xcode 26 and running it on simulator 26. The game center access point no longer shows up in the app. This is how it's configured in the past. And it still works on simulator 18.4 func authenticatePlayer() { GKAccessPoint.shared.location = .topTrailing self.localPlayer.authenticateHandler = { viewController, error in if let viewController = viewController { // can present Game Center login screen } else if self.localPlayer.isAuthenticated { // game can be started } else { // user didn't log in, continue the game without game center } } } After game ended, the leaderboard won't load. This is how it's implemented in the past. It's still working in simulator 18.4 struct GameCenterView: UIViewControllerRepresentable { @Environment(\.presentationMode) var presentationMode ... func makeUIViewController(context: Context) -> GKGameCenterViewController { let viewController = GKGameCenterViewController( leaderboardID: getLeaderBoardID(with: leaderBoardGameMode), playerScope: .global, timeScope: .allTime ) viewController.gameCenterDelegate = context.coordinator return viewController } func updateUIViewController(_ uiViewController: GKGameCenterViewController, context: Context) {} func makeCoordinator() -> Coordinator { Coordinator(self) } class Coordinator: NSObject, GKGameCenterControllerDelegate { let parent: GameCenterView init(_ parent: GameCenterView) { self.parent = parent } func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) { parent.presentationMode.wrappedValue.dismiss() } } }
3
2
207
Jun ’25
How to Apple Unity Plugins
When running my game in the Unity Editor on Windows platform I get an error: DllNotFoundException: GameKitWrapper assembly:<unknown assembly> type:<unknown type> member:(null) Apple.GameKit.DefaultNSErrorHandler.Init () (at ./Library/PackageCache/com.apple.unityplugin.gamekit@0abcad546f73/Source/DefaultHandlers.cs:35) This is because GameKitWrapper dynamically linked library is not available under Windows platform. Besides, "Apple Build Settings" are declared under UNITY_EDITOR_OSX and also not available under Windows platform. Does anyone managed to solve this?
1
1
247
Jun ’25
authenticateHandler events not being received on iOS 18
I work on a team that provides an SDK for another game to handle various tasks like authentication. They are experiencing a case where devices using iOS 17 are failing to authenticate with GameCenter, receiving the message "The requested operation could not be completed because local player has not been authenticated." We imagine this is because they still have some setup to finish regarding GameCenter itself, and we're working with them to take care of that. However, on iOS 18, their app ends up waiting indefinitely for GameCenter authentication messages that it never receives. That's where we're puzzled. We expect them to have the same outcome regardless of OS version. We initiate GameCenter authentication by setting an authenticateHandler after some initial application setup. The handler has code to account for UI, errors, and successful authentication. On iOS 17, it's clear that it's getting called as expected because they receive an indication that the player isn't authenticated. But on iOS 18, it looks like the same handler code on iOS 18 isn't being called at all. Are there differences in how iOS 18 interacts with the authenticationHandler that we somehow aren't accounting for? Or is there potentially something else that we're doing incorrectly that is manifesting only on iOS 18? Here's a simplified version of our login function code (in Obj-C++). There is no OS-specific code, and the job that owns this function does stay in scope until after authentication is complete. void beginLogin() { // Snip: Check if the user is already logged in. // Snip: Prevent multiple concurrent calls to this function. auto authenticateHandler = ^(UIViewController* gcViewController, NSError* error) { if (gcViewController != nil) { // Snip: Display the UI } else if (error != nil) { // Snip: Handle the error. } else { if ([[GKLocalPlayer localPlayer] isAuthenticated]) { // Snip: Handle successful authentication. } else { // Snip: Handle other case. } } }; [[GKLocalPlayer localPlayer] setAuthenticateHandler: authenticateHandler]; }
2
0
102
May ’25
Game Center Sandbox: Achievements not unlocking in development build?
Hello Everyone I am new here, I am testing game center integration and using a development build of my IOS game. I have set up a couple of achievements in app store connect, but when I trigger them in the game then they do not unlock or show up. Okay so i am signed into the game center with a sandbox account on a test advice. Is there anything else I need to configure, or do achievements usually only work after the game is released?. I will appreciate any guidance… Thanks in Advance!!!
0
0
98
May ’25
Achievement Banners Not always Showing
When running on my iPhone SE3 under IOS 18.4.1, achievement banners show as expected. The same code running on my iPad Air2 under IOS 15.8.4, achievement banners do not show, but they are accepted (as shown in the GameCenterViewController). The banners also don't show when running the simulator under iPhone 16 Pro Max under IOS 18.2 or simulator under iPhone SE3 under IOS 18.3. I haven't tried others. [Note that I clear the achievements each run during test so that I can duplicate this]
0
0
54
May ’25
Gamekit Achievements Won't Unhide
Added achievements to my approved app. Added them for the next release version, which I am running in simulator. When I look at the Achievements page, I can see that there are 17 Achievements available (correct), but they all show as hidden, despite checking the "No" box in App Store Connect.
1
1
74
May ’25
Testing Achievements - Apple Documentation out of Date
New to achievements. I added them in App Store Connect and want to test them. Apple Documentation says this: "Before you begin testing your GameKit configuration, you need to enable Debug Mode. In Xcode, choose Product > Scheme > Edit Scheme. From the Run configuration, select Options and toggle Enable Debug Mode. To begin testing your achievement configuration, open the game Progress Manager. In Xcode, choose Debug > GameKit > Manage Game Progress." Sounds easy enough, but there is no "GameKit" under Debug in Xcode 16.2.
2
0
93
May ’25
GameKit Configuration File - Apple Documentation out of Date
This is the first time I have tried adding achievements to my games. The online documentation says: "Before you can access achievements in your code, you can configure them in Xcode and sync the configuration updates you make with App Store Connect. Begin configuring achievements by creating a GameKit configuration file. In Xcode, choose File > New > File from Template. Select GameKit File, and click Next. In the sheet that appears, enter a name for the configuration and click Create." Sounds easy - except Xcode 16.2 does not have a GameKit File as one of the Templates. Please advise on how to proceed and it would be nice if the documentation were updated.
1
0
84
May ’25
Game Center Authentication Crashing - Unity 6, Gamekit 3.0.2
When testing my development build for gamecenter authentication, the game crashes. I've breadcrumbed it to the "await GKLocalPlayer.Authenticate();" call. Can't find any documentation on this issue and have been looking through the forums! I've already done all of the usual stuff like verifying bundle identifiers match, ensuring game center is enabled for the app, setting up app store connect, using a sandbox account, etc... Please point me to some resources if you know any. Any help is appreciated, I'm starting to lose hope here!
2
0
99
Apr ’25