Hi, I’m creating a game and I’m just wondering if I can integrate GCVirtualController in my SwiftUI app.
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
I'm making the following call:
[[GKGameCenterViewController alloc] initWithLeaderboardID:leaderboardID playerScope:(GKLeaderboardPlayerScopeGlobal) timeScope:(GKLeaderboardTimeScopeAllTime)];
When I present that VC, I get the correct leaderboard (for my passed leaderboardID), but it appears in "Friends" view, not "Global". Global works fine when I tap on it, but I'd like to display that list by default. Seems like a pretty straightforward request supported by the API. Does initWithLeaderboardID not respect that? I'm curious if others have this problem. Thanks!
Topic:
Graphics & Games
SubTopic:
GameKit
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” 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 play this game called Sonic Forces: Speed Battle that's available in the app store and I completed a quest outside of the app on this site called TapResearch for some rewards as I've done before and has worked, but after this one time I can no longer enter back into the game without crashing immediately. I tried deleting and reinstalling but nothing. I even tried signing into a different account but that didn't work either. So then I tried to make a new game center account to try and see if it works, and it did, though all my progress has been restarted. Does anyone know how to fix this?
The solo Leveling:arise is a game but the game mode is not switching on and game crashing everything time while playing
Topic:
Graphics & Games
SubTopic:
GameKit
Tags:
External Graphics Processors
Games
Graphics and Games
Hi all im having a variety of issues with gamekit matchmaking. On the simulator the matchmaking ui pops up and I can click Quick Match, then immediately "Failed to find Players" this is the same with a real Apple ID and a sandbox account.
If I use real devices the app at least discovers a match, but then the match none of the delegate methods for the match ever get called and the logs are filled with socket not connected and various errors.
My questions are:
Should match making via quick match work in the simulator, I have seen tutorial videos etc of this working, but I can't seem to get it to work.
How do people debug issues with GameCenter / Gamekit to find out why its not able to connect?
Many thanks in advance
I am currently working on a game that involves earning achievements, which I am using the Apple Unity Plug-Ins to display. I have found that occasionally opening the Game Center Dashboard the last achievement earned will not be displayed until the game is closed and reopened. I am using GKAccessPoint.Shared.Trigger to display the Achievements screen, which occasionally seems to open a cached version of the dashboard. I've found that it seems to consistently happen when earning multiple achievements within one minute, but this is not always the case. Does anybody have any experience with something like this in the past?
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.
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
The welcome banner is off the top left side of the screen instead of coming down the center. This behavior is encountered when running my iOS application on macOS.
So recently I have been trying to install game-porting-toolkit, and when I try to run
brew -v install apple/apple/game-porting-toolkit
Im getting an error:
Error: apple/apple/game-porting-toolkit 1.1 did not build
Logs:
/Users/mateusz/Library/Logs/Homebrew/game-porting-toolkit/00.options.out
/Users/mateusz/Library/Logs/Homebrew/game-porting-toolkit/01.configure
/Users/mateusz/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc
/Users/mateusz/Library/Logs/Homebrew/game-porting-toolkit/wine64-build
If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core):
apple/apple
I searched on this forum some threads but I couldn't take any advice from them. I would really appreciate any help.
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?