I’m testing Game Activities in my Unity project with the new Apple.GameKit 2025-beta1 plugin.
When I go into Xcode- Debug → GameKit → Manage Game Progress → Leaderboards → and click the generated link:
If my app is already running in the background, the link opens the app and my handler (Apple.GameKit.GKGameActivity.WantsToPlay += OnWantsToPlay;) fires as expected. I can read the activity and route the player to the right level.
If the app is completely closed, clicking the same link launches the app, but my OnWantsToPlay listener is never invoked. The app just boots normally and the activity intent seems lost.
I’ve tried to subscribe as early as possible (in Awake() of my bootstrap scene, also tested with RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]). Nothing works. Also, “Get Started with Game Center” video only demonstrates activation when the app already running, not a cold start from a Game Activity link. What am I missing?
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
Apple Unity Plug-Ins
RSS for tagConnect your game to Game Center, Core Haptics, PHASE audio, accessibility, and game controller frameworks.
Posts under Apple Unity Plug-Ins tag
44 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
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
Hello,
We are experiencing an issue with apparent lag or latency when interacting with objects in Unity using the XR Interaction Toolkit. Even when interactables are configured with the Movement Type set to Instantaneous, objects exhibit a noticeable delay when following hand movement. This issue is particularly apparent when the hand moves at higher speeds.
We would like to know: is any additional configuration required, or is there something else we need to do to resolve this?
Thank you very much for your assistance.
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!
Hello,
As titled, my team is trying to find a way to add unity projects to our current developments. We have checked several posts and tutorials, but find they are all about porting to a brand new project.
Without modifying too much on our current swift codes, we wonder if we can add Unity part as a WindowGroup/ImmersiveSpace like the following? :)
struct TestVisionUnityApp: App {
var body: some Scene {
// from default template
WindowGroup {
ContentView()
....
}
// @TODO
WindowGroup {...}
}
}
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.
I need help. Looking for devs who’ve integrated Unity into a native iOS app (Swift/SwiftUI)
SwiftUI vs Flutter for Embedding Unity in an iOS App?
I’m planning an iOS-first app where users interact with a real-time 3D custom avatar with 52 blendshapes powered by Unity, using SALSA LipSync + Emoter for facial animation. The avatar will respond to voice using Whisper → GPT-4 → ElevenLabs.
My plan is to embed Unity only for the avatar screen, and build the rest of the app (chat, voice input, onboarding, etc.) natively?
Here’s the decision I’m stuck on:
Should I stick with SwiftUI, since it gives full access to iOS-native features like ARKit, audio routing, and StoreKit? I only plan to develop for iOS.
Has anyone here integrated Unity with Flutter for mobile app successfully? Any pitfalls or major limitations I should know about before going that route?
I haven’t started development yet — just want to make sure I choose the right foundation for performance, flexibility, and long-term growth.
Any experience would be hugely appreciated!
Topic:
Community
SubTopic:
Apple Developers
Tags:
Swift Packages
Community Management
ARKit
Apple Unity Plug-Ins
There is a bug in Unity Plugins: Corehaptics.AssetPickerDrawer throws exceptions and draws incorrectly when fieldInfo or assetType is null (FB17305973). I fixed it and created a pull request: https://github.com/apple/unityplugins/pull/47
It has been months and this bug is really annoying.
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
Prototyping
Core Haptics
Apple Unity Plug-Ins
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()
}
}
}
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 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!!!
I use unity 2020.3.48f1 to develop a game; trying to implement Apple Services integration I use Apple unity plugins(https://github.com/apple/unityplugins) Using latest version of unity plugins I getting error in Unity project after plugin import It say "Not allowed platform VisionOS" When I tryed to use older version of the plugins I getting error on runtime when calling "var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems();" in line 42 it drop EXC_BAD_ACCESS(code=257, address=0x0000...) error I tryed to use different commits from official repositorys and even custom branches of apple unity plugins like (https://github.com/muZZkat/unityplugins/tree/muzzkat/fix-fetch-items) but it did not help
There is whole my script which trying to use apple unuity plugins
using System.Threading.Tasks;
using UnityEngine;
using System.Collections;
using System;
using Apple.GameKit;
using UnityEngine.UI;
public class TheScript : MonoBehaviour
{
[SerializeField]
InputField otp;
string Signature;
string TeamPlayerID;
string Salt;
string PublicKeyUrl;
string Timestamp;
void Start()
{
StartCoroutine(Call());
}
private IEnumerator Call()
{
yield return new WaitForSeconds(5);
Login();
}
public async Task Login()
{
otp.text += $"Loginig... ";
if (!Apple.GameKit.GKLocalPlayer.Local.IsAuthenticated)
{
try
{
var player = await GKLocalPlayer.Authenticate();
var localPlayer = GKLocalPlayer.Local;
TeamPlayerID = localPlayer.TeamPlayerId;
var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems();
Signature = Convert.ToBase64String(fetchItemsResponse.GetSignature());
PublicKeyUrl = fetchItemsResponse.PublicKeyUrl;
otp.text += $"Team Player ID: {TeamPlayerID} ";
otp.text += $"PublicKeyUrl: {PublicKeyUrl} ";
}
catch(Exception e)
{
otp.text += $"Error: " + e.Message;
}
}
else
{
Debug.Log("AppleGameCenter player already logged in.");
}
}
async Task SignInWithAppleGameCenterAsync(string signature, string teamPlayerId, string publicKeyURL, string salt, ulong timestamp)
{
}
}
Hi everyone,
I'm experiencing an issue with my app, which is currently live on the App Store. I attempted to upload a new version, but the App Review team informed me that the app crashes on launch.
Sure enough, when I download the app via TestFlight, it crashes immediately on startup — I see a grey screen, and then the app closes after about a second. The strange part is that no crash reports are generated.
However, when I build the app in Xcode and install it directly onto my device via USB-C, it runs perfectly fine.
I've tried updating to the latest version of Xcode and followed the suggestions in this Reddit thread:
https://www.reddit.com/r/iOSProgramming/comments/re2n65/app_crashes_after_testflight_download_but_no/
My app is a Unity game that had been working fine until now. There haven’t been any major changes in the latest update.
Could this be an Apple-side issue?
And how is it possible that no crash reports are generated? Since the app crashes before it even fully starts, I don’t think it's a memory leak.
Any help would be greatly appreciated, I can give more info if needed — I’m completely stuck here. :/
We are experiencing an issue with our iOS TestFlight builds where in-app purchase (IAP) products are not being retrieved as expected. We are using Unity IAP to handle our purchases, and despite having all the products correctly configured and approved in App Store Connect, we consistently receive errors such as:
UnityIAP: Received 0 products
Unavailable product [product_id]
We have thoroughly verified that:
The product identifiers are correctly configured in App Store Connect.
The bundle ID mappings are correctly set on both Unity and our backend.
The same setup works on the live App Store build, where purchases are fetched and validated correctly for the same set of In App products.
Sandbox test accounts are being used during TestFlight testing.
This issue only started appearing recently and affects the TestFlight builds only.
Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox.
Looking forward to your support on this matter.
Hi, I have a class project I am working on (with a due date tomorrow, unfortunately RIP to me). But I have made my project about adding accessibility to a Unity game. I've successfully added apple unity core and accessibility plugins to my project, and my project builds. But I have simple text nodes and buttons and they aren't accessible with voiceover once I build/export my game and test. I am only building for MacOS right now (for the assignment).
I don't have too much experience with Unity, but I am relatively experienced with accessibility (even formerly an intern and contractor at Apple for accessibility). So I wonder if I am just using Unity incorrectly? Perhaps I've done something to my build process (or haven't done something I should)? I've attached a photo of what my dev environment looks like in Unity, I've focused a text node (on the left) and on the right are my AccessibilityNode settings.
Any help would be awesome, even if I don't make my deadline tomorrow... :*(
Project repo is here, if it is helpful: https://github.com/frankelavsky/PGD_final_project
Thanks!
I am developing a Unity application for the Apple Vision Pro using PolySpatial and RealityKit integration.
The goal is to create a graspable object (for example, a handheld cube) that includes a secondary camera. When the user grabs and moves the object, the secondary camera should render its view to a RenderTexture, which is displayed on a quad attached to the object, simulating a live camera screen.
In the Unity Editor, this setup works correctly. The RenderTexture updates in real time, and the quad displays the camera’s view as expected.
However, when building and running the application on the Vision Pro, the quad only displays the clear background color of the secondary camera. No scene content appears. The graspable interaction itself works fine: the object can be grabbed and moved as intended.
Steps I have taken:
Created a new layer (CameraFeed) and assigned the relevant objects to it.
Set the secondary camera’s culling mask to render only the CameraFeed layer.
Assigned the RenderTexture as the camera’s target texture.
Applied the RenderTexture to an Unlit/Texture material on a quad.
Confirmed the camera is active and correctly positioned relative to the object.
From my research, it appears that once objects are managed by RealityKit through PolySpatial (for example, made graspable), they are no longer rendered through Unity's normal camera pipeline. Only the main XR camera (managed by RealityKit) seems able to see these objects. Secondary Unity cameras cannot render RealityKit-synced content to a RenderTexture. If this is correct, it seems there is currently no way to implement a true live secondary camera feed showing graspable objects on Vision Pro using Unity PolySpatial.
My questions are:
Is there any official way to enable multiple camera rendering of RealityKit-managed objects through PolySpatial?
Are there known workarounds to simulate a live camera feed that still allows objects to be grabbed?
Has anyone found alternative design patterns or methods for this kind of interaction?
Environment: Unity 6.0 , PolySpatial 2.2.4, Apple Vision OS XR 2.2.4
Any insight or suggestions would be greatly appreciated.
Thank you.
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!
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 player, the native Game Center interface opens and begins the matchmaking process.
Almost immediately, 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, the task does not complete when the log appears (our Debug.Log are nerver called).
But if we manually cancel the matchmaking process, the "User cancel" log is correctly triggered.
Here is a code snippet for the request :
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.LogInfo("User cancel"); }, TaskContinuationOptions.OnlyOnCanceled);
matchRequestTask.ContinueWith(t => { Debug.LogInfo("Success"); }, TaskContinuationOptions.OnlyOnRanToCompletion);
We have tested this on multiple devices 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.
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.
Hi everyone,
I am working on a Unity iOS app. I am adding in-app purchasing in my app. I have added Unity IAP to the Unity project, as well as the code for initialising and purchasing a subscription with the product ID. I have also added my certificates and provisioning profile in Xcode with in-app purchasing capabilities. Also, I have set up an App Store Connect page with a non-renewing subscription with a unique product ID and all required information. The subscription status is ready to submit. I have added a sandbox tester account in it. In unity editor, it is working fine with fake purchase receipt.
While testing in an iOS device, apple ID is logged out. But there is an error occurs everytime : IAP not initialized.
Also I have uploaded a newer version of app on app store connect, it is in waiting for review status.
Is there any step or something I am missing that it is not working in iOS device?
Please help
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
App Store Connect
In-App Purchase
Apple Unity Plug-Ins