diff --git a/src/GameKit/GameKit.cs b/src/GameKit/GameKit.cs index 621f98c60893..3de674a111b3 100644 --- a/src/GameKit/GameKit.cs +++ b/src/GameKit/GameKit.cs @@ -144,6 +144,7 @@ public enum GKError : long { FriendListDescriptionMissing = 100, FriendListRestricted = 101, FriendListDenied = 102, + FriendRequestNotAvailable = 103, } [Native] @@ -261,6 +262,8 @@ public enum GKGameCenterViewControllerState : long { LocalPlayerProfile = 3, [iOS (14,0)][TV (14,0)] Dashboard = 4, + [iOS (15,0), Mac (12,0), MacCatalyst (15,0), TV (15,0), NoWatch] + LocalPlayerFriendsList = 5, } // NSInteger -> GKMatchmaker.h @@ -343,6 +346,8 @@ public enum GKMatchmakingMode : long Default = 0, NearbyOnly = 1, AutomatchOnly = 2, + [TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + InviteOnly = 3, } [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] diff --git a/src/gamekit.cs b/src/gamekit.cs index b3c4395536f7..dd32a4ec6aa2 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -26,6 +26,7 @@ #else using UIKit; using NSViewController = Foundation.NSObject; +using NSWindow = Foundation.NSObject; #endif namespace GameKit { @@ -853,6 +854,18 @@ interface GKLocalPlayer Action AuthenticateHandler { get; set; } #endif + [NoWatch, NoTV, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Export ("isPresentingFriendRequestViewController")] + bool IsPresentingFriendRequestViewController { get; } + + [NoWatch, NoTV, NoMac, iOS (15,0), NoMacCatalyst] + [Export ("presentFriendRequestCreatorFromViewController:error:")] + bool PresentFriendRequestCreator (UIViewController viewController, [NullAllowed] out NSError error); + + [NoWatch, NoTV, NoiOS, Mac (12,0), NoMacCatalyst] + [Export ("presentFriendRequestCreatorFromWindow:error:")] + bool PresentFriendRequestCreator ([NullAllowed] NSWindow window, [NullAllowed] out NSError error); + [iOS (7,0)][Mac (10,10)] // Mismarked in header, 17613142 [Export ("loadDefaultLeaderboardIdentifierWithCompletionHandler:")] [Async] @@ -1429,6 +1442,10 @@ interface GKMatchmakerViewController [TV (14,0), Mac (11,0), iOS (14,0)] [Export ("matchmakingMode", ArgumentSemantic.Assign)] GKMatchmakingMode MatchmakingMode { get; set; } + + [TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Export ("canStartWithMinimumPlayers")] + bool CanStartWithMinimumPlayers { get; set; } } [NoWatch] @@ -2082,6 +2099,10 @@ interface GKTurnBasedMatchmakerViewController : UIAppearance [Export ("showExistingMatches", ArgumentSemantic.Assign)] bool ShowExistingMatches { get; set; } + [TV (15,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] + [Export ("matchmakingMode", ArgumentSemantic.Assign)] + GKMatchmakingMode MatchmakingMode { get; set; } + [Export ("initWithMatchRequest:")] IntPtr Constructor (GKMatchRequest request); diff --git a/tests/xtro-sharpie/MacCatalyst-GameKit.ignore b/tests/xtro-sharpie/MacCatalyst-GameKit.ignore index 1963397228ff..14f5bd46b850 100644 --- a/tests/xtro-sharpie/MacCatalyst-GameKit.ignore +++ b/tests/xtro-sharpie/MacCatalyst-GameKit.ignore @@ -24,3 +24,12 @@ !missing-selector! GKFriendRequestComposeViewControllerGKFriendRequestComposeViewController::setComposeViewDelegate: not bound !missing-selector! GKFriendRequestComposeViewControllerGKFriendRequestComposeViewController::setMessage: not bound !missing-type! GKFriendRequestComposeViewController not bound + +# Deprecated +!incorrect-protocol-member! GKMatchmakerViewControllerDelegate::matchmakerViewController:didFindPlayers: is OPTIONAL and should NOT be abstract +!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:didFindMatch: is OPTIONAL and should NOT be abstract +!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:playerQuitForMatch: is OPTIONAL and should NOT be abstract + +# Are only available for TvOS +!missing-selector! GKAccessPoint::isFocused not bound +!missing-selector! GKAccessPoint::setFocused: not bound diff --git a/tests/xtro-sharpie/MacCatalyst-GameKit.todo b/tests/xtro-sharpie/MacCatalyst-GameKit.todo deleted file mode 100644 index 4f32b7c66216..000000000000 --- a/tests/xtro-sharpie/MacCatalyst-GameKit.todo +++ /dev/null @@ -1,14 +0,0 @@ -!incorrect-protocol-member! GKMatchmakerViewControllerDelegate::matchmakerViewController:didFindPlayers: is OPTIONAL and should NOT be abstract -!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:didFindMatch: is OPTIONAL and should NOT be abstract -!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:playerQuitForMatch: is OPTIONAL and should NOT be abstract -!missing-selector! GKAccessPoint::isFocused not bound -!missing-selector! GKAccessPoint::setFocused: not bound -## appended from unclassified file -!missing-enum-value! GKError native value GKErrorFriendRequestNotAvailable = 103 not bound -!missing-enum-value! GKGameCenterViewControllerState native value GKGameCenterViewControllerStateLocalPlayerFriendsList = 5 not bound -!missing-enum-value! GKMatchmakingMode native value GKMatchmakingModeInviteOnly = 3 not bound -!missing-selector! GKLocalPlayer::isPresentingFriendRequestViewController not bound -!missing-selector! GKMatchmakerViewController::canStartWithMinimumPlayers not bound -!missing-selector! GKMatchmakerViewController::setCanStartWithMinimumPlayers: not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::setMatchmakingMode: not bound diff --git a/tests/xtro-sharpie/iOS-GameKit.todo b/tests/xtro-sharpie/iOS-GameKit.todo deleted file mode 100644 index affc5cf29b3c..000000000000 --- a/tests/xtro-sharpie/iOS-GameKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-enum-value! GKError native value GKErrorFriendRequestNotAvailable = 103 not bound -!missing-enum-value! GKGameCenterViewControllerState native value GKGameCenterViewControllerStateLocalPlayerFriendsList = 5 not bound -!missing-enum-value! GKMatchmakingMode native value GKMatchmakingModeInviteOnly = 3 not bound -!missing-selector! GKLocalPlayer::isPresentingFriendRequestViewController not bound -!missing-selector! GKLocalPlayer::presentFriendRequestCreatorFromViewController:error: not bound -!missing-selector! GKMatchmakerViewController::canStartWithMinimumPlayers not bound -!missing-selector! GKMatchmakerViewController::setCanStartWithMinimumPlayers: not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::setMatchmakingMode: not bound diff --git a/tests/xtro-sharpie/macOS-GameKit.todo b/tests/xtro-sharpie/macOS-GameKit.todo deleted file mode 100644 index e40682906c18..000000000000 --- a/tests/xtro-sharpie/macOS-GameKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-enum-value! GKError native value GKErrorFriendRequestNotAvailable = 103 not bound -!missing-enum-value! GKGameCenterViewControllerState native value GKGameCenterViewControllerStateLocalPlayerFriendsList = 5 not bound -!missing-enum-value! GKMatchmakingMode native value GKMatchmakingModeInviteOnly = 3 not bound -!missing-selector! GKLocalPlayer::isPresentingFriendRequestViewController not bound -!missing-selector! GKLocalPlayer::presentFriendRequestCreatorFromWindow:error: not bound -!missing-selector! GKMatchmakerViewController::canStartWithMinimumPlayers not bound -!missing-selector! GKMatchmakerViewController::setCanStartWithMinimumPlayers: not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::setMatchmakingMode: not bound diff --git a/tests/xtro-sharpie/tvOS-GameKit.todo b/tests/xtro-sharpie/tvOS-GameKit.todo deleted file mode 100644 index 092ef3a6dd57..000000000000 --- a/tests/xtro-sharpie/tvOS-GameKit.todo +++ /dev/null @@ -1,7 +0,0 @@ -!missing-enum-value! GKError native value GKErrorFriendRequestNotAvailable = 103 not bound -!missing-enum-value! GKGameCenterViewControllerState native value GKGameCenterViewControllerStateLocalPlayerFriendsList = 5 not bound -!missing-enum-value! GKMatchmakingMode native value GKMatchmakingModeInviteOnly = 3 not bound -!missing-selector! GKMatchmakerViewController::canStartWithMinimumPlayers not bound -!missing-selector! GKMatchmakerViewController::setCanStartWithMinimumPlayers: not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKTurnBasedMatchmakerViewControllerGKTurnBasedMatchmakerViewController::setMatchmakingMode: not bound diff --git a/tests/xtro-sharpie/watchOS-GameKit.todo b/tests/xtro-sharpie/watchOS-GameKit.todo deleted file mode 100644 index 538eb10ed122..000000000000 --- a/tests/xtro-sharpie/watchOS-GameKit.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! GKError native value GKErrorFriendRequestNotAvailable = 103 not bound