Hello !
We are working on a real-time 2-player online game targeting multiple Apple devices.
The following issue only occurs on tvOS:
When selecting matchmaking to connect with another random player, the native Game Center interface opens and begins the matchmaking process.
Almost immediately after clicking "start", the following log appears in the console, and the matchmaking screen remains indefinitely without completing:
Timeout while starting matching with request: <GKMatchRequestInternal 0x30d62f690> {
defaultNumberOfPlayers : 0
isLateJoin : 0
localPlayerID : U:bea182d69b85f0839e3958742fbc4609
matchType : 0
maxPlayers : 2
minPlayers : 2
playerAttributes : 4294967295
playerGroup : 1
preloadedMatch : 0
recipientPlayerIDs : <__NSArrayM 0x3034ed5c0> {}
recipients : <__NSArrayM 0x3034ee280> {}
restrictToAutomatch : 0
version : 1
archivedSharePlayInviteeTokensFromProgrammaticInvite, inviteMessage, localizableInviteMessage, messagesBasedRecipients, properties, queueName, recipientProperties, rid, sessionToken : (null)
} . Error: (null)
However, as shown in the code snippet below, the task does not complete when the log appears. But when we manually cancel the matchmaking process, the "User cancel" log is correctly triggered.
var gkMatchRequest = GKMatchRequest.Init();
gkMatchRequest.MinPlayers = 2;
gkMatchRequest.MaxPlayers = 2;
var matchRequestTask = GKMatchmakerViewController.Request(gkMatchRequest);
matchRequestTask.ContinueWith(t => { Debug.LogException(t.Exception); }, TaskContinuationOptions.OnlyOnFaulted);
matchRequestTask.ContinueWith(t => { Debug.Log("User cancel"); }, TaskContinuationOptions.OnlyOnCanceled);
matchRequestTask.ContinueWith(t => { Debug.Log("Success"); }, TaskContinuationOptions.OnlyOnRanToCompletion);
We have tested this on multiple Apple TV and network types (Wi-Fi, 5G, Ethernet), but we consistently encounter this bug along with the same log message.
Could you please help us understand or resolve this issue?
Thank you.
GameKit
RSS for tagCreate apps that allow players to interact with each other using GameKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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.
Topic:
Graphics & Games
SubTopic:
GameKit
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.
Topic:
Graphics & Games
SubTopic:
GameKit
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?
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<TextAsset>("AppleRootCA-G3");
bytes = textAsset.bytes;
rootCert.ChainPolicy.ExtraStore.Add(new X509Certificate2(bytes));
textAsset = Resources.Load<TextAsset>("AppleRootCA-G2");
bytes = textAsset.bytes;
rootCert.ChainPolicy.ExtraStore.Add(new X509Certificate2(bytes));
textAsset = Resources.Load<TextAsset>("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
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?
Topic:
Graphics & Games
SubTopic:
GameKit
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
TLDR; I can't get QueueName to work with matchmaking a turn-based match in Unity using matchmaking rules.
Long version:
I'm using the apple unity plugin found here: https://github.com/apple/unityplugins/blob/main/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Documentation~/Apple.GameKit.md
I have created a Queue, RuleSet and a simple Rule to match players by following these docs tightly: https://developer.apple.com/documentation/gamekit/finding-players-using-matchmaking-rules.
Here is the single rule I have that drives matchmaking:
{
"data" : {
"type" : "gameCenterMatchmakingRules",
"id" : "[hiddden-rule-id]",
"attributes" : {
"referenceName" : "ComplimentaryFactionPreference",
"description" : "default desc",
"type" : "MATCH",
"expression" : "requests[0].properties.preference != requests[1].properties.preference",
"weight" : null
},
"links" : {
"self" : "https://api.appstoreconnect.apple.com/v1/gameCenterMatchmakingRules/[hidden-rule-id]"
}
},
"links" : {
"self" : "https://api.appstoreconnect.apple.com/v1/gameCenterMatchmakingRules"
}
}
which belongs to a rule set which belongs to a queue. I have verified these are setup and linked via the App Store Connect API. Additionally, when I tested queue-based matchmaking without a queue established, I got an error in Unity. Now, with this, I do not. However there is a problem when I attempt to use the queue for matchmaking.
I have the basic C# function here:
public override void StartSearch(NSMutableDictionary<NSString, NSObject> properties)
{
if (searching) return;
base.StartSearch(properties);
//Establish matchmaking requests
_matchRequest = GKMatchRequest.Init();
_matchRequest.QueueName = _PreferencesToQueue(GetSerializedPreferences());
_matchRequest.Properties = properties;
_matchRequest.MaxPlayers = PLAYERS_COUNT;
_matchRequest.MinPlayers = PLAYERS_COUNT;
_matchTask = GKTurnBasedMatch.Find(_matchRequest);
}
The
_PreferencesToQueue(GetSerializedPreferences());
returns the exact name of the queue I added my ruleset to.
After this function is called, I poll the task generated from the .Find(...) function. Every time I run this function, a new match is created almost instantly. No two players are ever added to the same match.
Further, I'm running two built game instances, one on a mac and another on an ipad and when I simultaneously test, I am unable to join games this way.
Can someone help me debug why I cannot seem to match make when using a queue based approach?
Hello,
**I'm Using **
Unity 6 LTS
Unity Apple GameKit + Core plugins
Turn-based matchmaking interface w/ 2 players max
App Store Connect API for rule-based matchmaking
I have already
enabled game center in app store connect (I think)
authenticated players and matched via friend request
I am stuck
Using queues to match players automatically
I'm working on a rule-based matchmaking system which aims to place two players against each other into a GKTurnBasedMatch. I have a simple Unity Project that correctly authenticates a user and proceeds to send a matchmaking request. The matchmaking script utilizes the Unity plugins' GKTurnBasedMatchmakerViewController.Request(...) request function with a GKMatchRequest.Init() request configured with a QueueName equal to the App Store Connect API Queue I created.
The queue I created is also linked to a ruleset with a very basic rule that checks if the properties contains a key called 'preference' that contains a string value for what side the player wants to play for this match. If during the matchmaking, the preferences between players are different, then the match is made and both players should join the match; each player gets to play the side they have chosen. I have my rule expression designed to just check if the preferences are not equal:
requests[0].properties.faction_preference != requests[1].properties.faction_preference
When I launch the game with two physical iPads and begin the matchmaking request, each player is immediately presented with two options:
Invite a friend, or
Start game
The Problem: Inviting a friend works to get two players into a game, but queue seems to not matter, and clicking start game will just put the current player into its own match (no one joins).
The Question: How do I get queue based matchmaking to work in Unity for a Turn-based match with only two players who are able to select the enemy side they want to play dictated by a rule that compares enemy play-side preferences?
Resources I've used:
Apple Unity GameKit Plugin: https://github.com/apple/unityplugins
Matchmaking: https://developer.apple.com/documentation/gamekit/matchmaking-rules
Multiplayer rulesets: https://developer.apple.com/documentation/gamekit/finding-players-using-matchmaking-rules
Topic:
Graphics & Games
SubTopic:
GameKit
Tags:
GameKit
Graphics and Games
App Store Connect
Apple Unity Plug-Ins
I have several games on the app store which are setup as "For Kids" which means these games cannot have any way to access the outside world including the App Store. No problem. These games have worked fine for years until iOS 26.
Now, all my updates are being rejected because the new version of Game Center running on iPadOS 26 has a way for people to exit the game and go to the App Store. I have no control over this since it's built into Game Center, and the app review folks want me to put a "parental gate" on it, but there's no way to do that because... well... it's in Game Center, not my code.
So, I'm unable to update my apps because of this. Presumably, the existing versions on the app store still do this exact same thing, so my update isn't going to make any difference. Does anyone know of a way to make that crap at the top go away so this isn't an issue?
Topic:
Graphics & Games
SubTopic:
GameKit
i play Roblox and ever since I've got this update the quality graphics stability Internet ping and a lot of other stuff has drastically been worse
Attempting to bring up the access point yields the following error log:
[GameCenterOverlayService] Failed to create GameOverlayUI Dashboard Remote Proxy
[GameCenterOverlayService] Could not create endpoint for service name: com.apple.GameOverlayUI.dashboard-service
[GameCenterOverlayService] Failed to create GameOverlayUI Dashboard Remote Proxy
[GameCenterOverlayService] Could not create endpoint for service name: com.apple.GameOverlayUI.dashboard-service
[GameCenterOverlayService] Failed to create GameOverlayUI Dashboard Remote Proxy
[GameCenterOverlayService] Failed to create GameOverlayUI Dashboard Remote Proxy
The same code (which is a single line setting 'active' to true) works on physical devices and on the simulator in iOS 18.6
I haven't been able to find any mention of this issue online. Any suggestions or help greatly appreciated.
Hi everyone
I'm experiencing an issue with iPadOS 26 regarding multi-touch gesture detection. When performing a quick four-finger gesture (tap and swipe), the system often fails to recognize the input. This especially affects multi-touch gestures, such as rhythm games with difficult levels.
Steps to Reproduce:
Place four fingers on the screen.
Perform a quick tap or a quick horizontal swipe (like the one used to switch apps).
Observe whether the gesture is ignored or detected inconsistently.
Expected Behavior:
4-finger multitouch gestures should be recognized regardless of gesture speed, just like previous iPadOS versions.
Actual Behavior:
Gestures fail to be detected when executed quickly—same gestures still work, and miss notes in rhythm games.
You can check out my posts on Twitter/x and Facebook: [https://x.com/kokona_fwa/status/1978131164104728949?s=61]
Facebook: [https://m.facebook.com/groups/idipad/permalink/24438964899058806/?]
Matchmaking rules
https://developer.apple.com/documentation/gamekit/matchmaking-rules?language=objc
AppStoreConnectApi rules
https://developer.apple.com/documentation/appstoreconnectapi/rules?language=objc
・Environment
Unity 6000.2.2f1
XCode 16.1
iOS 26
3 iPhones
・AppStoreConnectApi rules
"type": "gameCenterMatchmakingRuleSets",
"id": "f6a88caf-85db-42bf-xxxxxxxxxxxxxxxxxxxx",
"attributes": {
"referenceName": "co.mygame.RuleSets.GvERandom34",
"ruleLanguageVersion": 1,
"minPlayers": 3,
"maxPlayers": 4
},
"type": "gameCenterMatchmakingRules",
"id": "6afa68ce-4d2c-496f-xxxxxxxxxxxxxxxxxxxx",
"attributes": {
"referenceName": "GameVersion",
"description": "Check Game Version. GvERandom34",
"type": "COMPATIBLE",
"expression": "requests[0].properties.gameVersion == requests[1].properties.gameVersion",
"weight": null
},
"type": "gameCenterMatchmakingQueues",
"id": "7fb645ef-4eca-4510-xxxxxxxxxxxxxxxxxxxx",
"attributes": {
"referenceName": "co.mygame.que.GvERandom34",
"classicMatchmakingBundleIds": []
},
・Objective-C Execution code
queueName = "co.mygame.que.GvERandom34"
keyStr = "gameVersion "
valueStr = "1.0"
- (void)MatchQueueParamStr1Start:(NSString*)queueName keyStr:(NSString*)keyStr valueStr:(NSString*)valueStr
{
if (@available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) == NO)
{
DBGLOG(@"MatchQueueParamStr1Start Not support.");
return;
}
self->_matchMakingFlag = YES;
self->_matchFinishFlag = NO;
self->_myMatch = nil;
GKMatchRequest *req = [[GKMatchRequest alloc] init];
if (@available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *))
{
req.queueName = queueName;
req.properties = @{keyStr: valueStr};
}
[[GKMatchmaker sharedMatchmaker] findMatchForRequest:req withCompletionHandler: ^(GKMatch *match, NSError *error)
{
if (error)
{
[self SetupErrorInfo:error descriptionText:@"findMatchForRequest"];
}
else if(match)
{
self->_myMatch = match;
self->_myMatch.delegate = self;
}
self->_matchMakingFlag = NO;
self->_matchFinishFlag = YES;
}];
}
・
I'm trying to match with three devices.
Matching doesn't work.
5 minutes later times out.
What's the problem?
I am using the latest version of the Game Center plugin for Unity and have noticed that my game will crash on launch when trying to authenticate.
I've tried this in an empty project with just the plugin and it still crashes with this exception.
GfxDevice: creating device client; threaded=1; jobified=0
Initializing Metal device caps: Apple A14 GPU
Initialize engine version: 2022.3.62f2 (7670c08855a9)
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.
And the area in the native code that is triggering the crash is this inside the GKLocalPlayer_SetAuthenticateHandler function
`_onAuthenticate!(tid, _mostRecentAuthenticatePlayer!.passRetainedUnsafeMutablePointer());
I am using Unity 2022.3.62f2 and MacOS 15.6 with iOS 18.6.2 which based on the min specs for the plugin we should be within spec.
I have also included this message because I thought it might help too
`terminating due to uncaught exception of type Il2CppExceptionWrapper
Could not import Swift modules for translation unit: failed to get module "GameKitWrapper" from AST context:
error: 'GKErrorCodeExtension.h' file not found
in file included from :1:
error: could not build Objective-C module 'GameKitWrapper'
warning: Ignoring missing VFS file: /Users/james/Library/Developer/Xcode/DerivedData/GameKitWrapper-dzawbtxqdxdviiakfxmfunexppqv/Build/Intermediates.noindex/GameKitWrapper.build/Release-iphoneos/GameKitWrapper-bc72bd3638f4d2956cac9b00e84c1a7d-VFS-iphoneos/all-product-headers.yaml
This is the likely root cause for any subsequent compiler
errors.warning: Ignoring missing VFS file: /Users/bill/Library/Developer/Xcode/DerivedData/GameKitWrapper-dzawbtxqdxdviiakfxmfunexppqv/Build/Intermediates.noindex/GameKitWrapper.build/Release-iphoneos/GameKitWrapper iOS.build/unextended-module-overlay.yaml
This is the likely root cause for any subsequent compiler errors.warning: TypeSystemSwiftTypeRef::GetNumChildren: had to engage SwiftASTContext fallback for type $syyXCD
I've also attached the script that I am using for authentication, this script runs on the first scene.
GameCenterManager.cs
在正常游戏中,如果非常频繁的调用assetBundle.Unload接口,会导致游戏应用画面卡死,但是游戏的背景音乐仍然正常播放。这类问题仅发生在iphone16 和iphone17的手机上,低版本的手机没有任何问题,请问该如何解决这个问题?
Hello, I’m the developer of the “ StepSquad” app. Our app uses the Game Center achievement feature, but we’ve been encountering a problem: the “Global Players” metric always shows 0%, even though there are friends who have already achieved these achievements. Initially, I thought it might be because the app was newly launched. However, it’s now been over two months since release, and it’s still showing 0%. If anyone has any insight into this issue, please leave a comment.
I am using Unity's GameKit to implement a turnbase game.
I want to make a UI in Unity to show all the games I can join.
I tried using
var matches = await GKTurnBasedMatch.LoadMatches();
to get all the open matches.
But it seems that I can only get the matcm related to the current apple account.
Can you help me get all the matches?
ALSO
I used
var match = await GKTurnBasedMatchmakerViewController.Request(request);
to exit the gamecenter interface and start a game (automatic matching, no one was invited)
Another device used
var match = await GKTurnBasedMatch.Find(request);
to find the game, but it did not find the game, but it start a new game (automatic matching).
Can you help me solve these problems?
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]
Topic:
Graphics & Games
SubTopic:
GameKit
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!!!