From 41d79829ce04b36a8f3dfd3e05ca93d9682c11f4 Mon Sep 17 00:00:00 2001 From: Joe Flood Date: Thu, 26 Feb 2026 16:23:57 +0000 Subject: [PATCH 1/2] Initial support for visionOS --- Sources/GameKitUI/iOS/Authentication/GKAuthentication+iOS.swift | 2 +- .../GameKitUI/iOS/Authentication/GKAuthenticationView+iOS.swift | 2 +- .../iOS/Authentication/GKAuthenticationViewController+iOS.swift | 2 +- Sources/GameKitUI/iOS/Invite/GKInviteView+iOS.swift | 2 +- Sources/GameKitUI/iOS/Invite/InviteViewController+iOS.swift | 2 +- Sources/GameKitUI/iOS/Matchmaker/GKMatchmakerView+iOS.swift | 2 +- .../GameKitUI/iOS/Matchmaker/MatchmakerViewController+iOS.swift | 2 +- .../iOS/TurnBasedMatchmaker/GKTurnBasedMatchmakerView+iOS.swift | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/GameKitUI/iOS/Authentication/GKAuthentication+iOS.swift b/Sources/GameKitUI/iOS/Authentication/GKAuthentication+iOS.swift index a070623..36972cf 100644 --- a/Sources/GameKitUI/iOS/Authentication/GKAuthentication+iOS.swift +++ b/Sources/GameKitUI/iOS/Authentication/GKAuthentication+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import os.log import Combine diff --git a/Sources/GameKitUI/iOS/Authentication/GKAuthenticationView+iOS.swift b/Sources/GameKitUI/iOS/Authentication/GKAuthenticationView+iOS.swift index 1416cf0..4b495c5 100644 --- a/Sources/GameKitUI/iOS/Authentication/GKAuthenticationView+iOS.swift +++ b/Sources/GameKitUI/iOS/Authentication/GKAuthenticationView+iOS.swift @@ -24,7 +24,7 @@ /// Created by Sascha Müllner on 21.11.20. /// Modfied by Sascha Müllner on 17.12.20. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/Authentication/GKAuthenticationViewController+iOS.swift b/Sources/GameKitUI/iOS/Authentication/GKAuthenticationViewController+iOS.swift index 067bf40..4ba8080 100644 --- a/Sources/GameKitUI/iOS/Authentication/GKAuthenticationViewController+iOS.swift +++ b/Sources/GameKitUI/iOS/Authentication/GKAuthenticationViewController+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import os.log import Foundation diff --git a/Sources/GameKitUI/iOS/Invite/GKInviteView+iOS.swift b/Sources/GameKitUI/iOS/Invite/GKInviteView+iOS.swift index 179c921..b7bcbf2 100644 --- a/Sources/GameKitUI/iOS/Invite/GKInviteView+iOS.swift +++ b/Sources/GameKitUI/iOS/Invite/GKInviteView+iOS.swift @@ -24,7 +24,7 @@ /// Created by Sascha Müllner on 22.11.20. /// Modfied by Sascha Müllner on 17.12.20. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/Invite/InviteViewController+iOS.swift b/Sources/GameKitUI/iOS/Invite/InviteViewController+iOS.swift index 4d11fc7..930aaf4 100644 --- a/Sources/GameKitUI/iOS/Invite/InviteViewController+iOS.swift +++ b/Sources/GameKitUI/iOS/Invite/InviteViewController+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/Matchmaker/GKMatchmakerView+iOS.swift b/Sources/GameKitUI/iOS/Matchmaker/GKMatchmakerView+iOS.swift index 0d2b670..04a20e4 100644 --- a/Sources/GameKitUI/iOS/Matchmaker/GKMatchmakerView+iOS.swift +++ b/Sources/GameKitUI/iOS/Matchmaker/GKMatchmakerView+iOS.swift @@ -24,7 +24,7 @@ /// Created by Sascha Müllner on 22.11.20. /// Modfied by Sascha Müllner on 17.12.20. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/Matchmaker/MatchmakerViewController+iOS.swift b/Sources/GameKitUI/iOS/Matchmaker/MatchmakerViewController+iOS.swift index 6b5483e..be50af4 100644 --- a/Sources/GameKitUI/iOS/Matchmaker/MatchmakerViewController+iOS.swift +++ b/Sources/GameKitUI/iOS/Matchmaker/MatchmakerViewController+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Combine import Foundation diff --git a/Sources/GameKitUI/iOS/TurnBasedMatchmaker/GKTurnBasedMatchmakerView+iOS.swift b/Sources/GameKitUI/iOS/TurnBasedMatchmaker/GKTurnBasedMatchmakerView+iOS.swift index 1079c4e..54f4acd 100644 --- a/Sources/GameKitUI/iOS/TurnBasedMatchmaker/GKTurnBasedMatchmakerView+iOS.swift +++ b/Sources/GameKitUI/iOS/TurnBasedMatchmaker/GKTurnBasedMatchmakerView+iOS.swift @@ -24,7 +24,7 @@ /// Created by Sascha Müllner on 22.11.20. /// Modfied by Sascha Müllner on 17.12.20. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit From 71cd20f5131055dfc774eb4a0cc80e5e6cbd2430 Mon Sep 17 00:00:00 2001 From: Joe Flood Date: Thu, 26 Feb 2026 16:27:53 +0000 Subject: [PATCH 2/2] Add more os(visionOS) checks --- Sources/GameKitUI/Shared/Manager/GKMatchManager.swift | 2 +- Sources/GameKitUI/iOS/GKGameCenterView+iOS.swift | 2 +- Sources/GameKitUI/iOS/LoadingViewController+iOS.swift | 2 +- .../TurnBasedMatchmakerViewController+iOS.swift | 2 +- Sources/GameKitUI/iOS/UIViewController+Child.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/GameKitUI/Shared/Manager/GKMatchManager.swift b/Sources/GameKitUI/Shared/Manager/GKMatchManager.swift index 003633f..cc4a018 100644 --- a/Sources/GameKitUI/Shared/Manager/GKMatchManager.swift +++ b/Sources/GameKitUI/Shared/Manager/GKMatchManager.swift @@ -126,7 +126,7 @@ public final class GKMatchManager: NSObject { } } -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) extension GKMatchManager: GKMatchmakerViewControllerDelegate { diff --git a/Sources/GameKitUI/iOS/GKGameCenterView+iOS.swift b/Sources/GameKitUI/iOS/GKGameCenterView+iOS.swift index 03d22aa..06b2906 100644 --- a/Sources/GameKitUI/iOS/GKGameCenterView+iOS.swift +++ b/Sources/GameKitUI/iOS/GKGameCenterView+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Henrik Storch on 02.10.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/LoadingViewController+iOS.swift b/Sources/GameKitUI/iOS/LoadingViewController+iOS.swift index e19ea5d..8f79268 100644 --- a/Sources/GameKitUI/iOS/LoadingViewController+iOS.swift +++ b/Sources/GameKitUI/iOS/LoadingViewController+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import SwiftUI diff --git a/Sources/GameKitUI/iOS/TurnBasedMatchmaker/TurnBasedMatchmakerViewController+iOS.swift b/Sources/GameKitUI/iOS/TurnBasedMatchmaker/TurnBasedMatchmakerViewController+iOS.swift index ed7b5a3..d84926c 100644 --- a/Sources/GameKitUI/iOS/TurnBasedMatchmaker/TurnBasedMatchmakerViewController+iOS.swift +++ b/Sources/GameKitUI/iOS/TurnBasedMatchmaker/TurnBasedMatchmakerViewController+iOS.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) +#if os(iOS) || os(visionOS) import Foundation import GameKit diff --git a/Sources/GameKitUI/iOS/UIViewController+Child.swift b/Sources/GameKitUI/iOS/UIViewController+Child.swift index 70e3b4f..a8a2c98 100644 --- a/Sources/GameKitUI/iOS/UIViewController+Child.swift +++ b/Sources/GameKitUI/iOS/UIViewController+Child.swift @@ -23,7 +23,7 @@ /// /// Created by Sascha Müllner on 23.02.21. -#if os(iOS) || os(tvOS) +#if os(iOS) || os(tvOS) || os(visionOS) import UIKit