From 0e4749c207d18373bbe98b2d9d0e4ba3386ccbc4 Mon Sep 17 00:00:00 2001 From: Whitney Schmidt Date: Mon, 27 Jul 2020 11:12:02 -0400 Subject: [PATCH] [Xcode12][GameKit] Update for beta 1-2 (#9126) * initial gamekit commit for xcode12 --- src/GameKit/GameKit.cs | 33 ++- src/gamekit.cs | 287 +++++++++++++++++++++- tests/xtro-sharpie/iOS-GameKit.ignore | 11 + tests/xtro-sharpie/iOS-GameKit.todo | 85 ------- tests/xtro-sharpie/macOS-GameKit.ignore | 3 + tests/xtro-sharpie/macOS-GameKit.todo | 60 ----- tests/xtro-sharpie/tvOS-GameKit.ignore | 17 ++ tests/xtro-sharpie/tvOS-GameKit.todo | 86 ------- tests/xtro-sharpie/watchOS-GameKit.ignore | 11 + tests/xtro-sharpie/watchOS-GameKit.todo | 51 ---- 10 files changed, 348 insertions(+), 296 deletions(-) delete mode 100644 tests/xtro-sharpie/iOS-GameKit.todo delete mode 100644 tests/xtro-sharpie/macOS-GameKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-GameKit.todo delete mode 100644 tests/xtro-sharpie/watchOS-GameKit.todo diff --git a/src/GameKit/GameKit.cs b/src/GameKit/GameKit.cs index 0a8ba24e67..2a940e79f4 100644 --- a/src/GameKit/GameKit.cs +++ b/src/GameKit/GameKit.cs @@ -291,11 +291,42 @@ namespace GameKit { NoAnswer = 5, } - [Mac (10,13,4), TV (11,3), iOS (11,3)] + [iOS (11,3)][Deprecated (PlatformName.iOS, 14,0, message: "Do not use; this API was removed.")] + [Mac (10,13,4)][Deprecated (PlatformName.MacOSX, 11,0, message: "Do not use; this API was removed.")] + [TV (11,3)][Deprecated (PlatformName.TvOS, 14,0, message: "Do not use; this API was removed.")] [Native] public enum GKAuthenticationType : ulong { WithoutUI = 0, GreenBuddyUI = 1, AuthKitInvocation = 2, } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [Native] + public enum GKAccessPointLocation : long + { + TopLeading, + TopTrailing, + BottomLeading, + BottomTrailing, + } + + [TV (14,0), Mac (11,0), iOS (14,0), Watch(7,0)] + [Native] + public enum GKLeaderboardType : long + { + Classic, + Recurring, + } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [Native] + public enum GKMatchmakingMode : long + { + Default = 0, + NearbyOnly = 1, + AutomatchOnly = 2, + } } diff --git a/src/gamekit.cs b/src/gamekit.cs index 2165c598ef..5fee100d5b 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -5,9 +5,11 @@ // Miguel de Icaza // Marek Safar (marek.safar@gmail.com) // Aaron Bockover (abock@xamarin.com) +// Whitney Schmidt (whschm@microsoft.com) // // Copyright 2009, Novell, Inc. // Copyright 2011-2013 Xamarin Inc. All rights reserved +// Copyright 2020 Microsoft Corp. All rights reserved // #pragma warning disable 618 @@ -16,8 +18,11 @@ using System; using ObjCRuntime; using Foundation; using CoreFoundation; +using CoreGraphics; #if MONOMAC using AppKit; +using UIWindow = AppKit.NSWindow; +using UIViewController = AppKit.NSViewController; #else using UIKit; using NSViewController = Foundation.NSObject; @@ -38,6 +43,8 @@ namespace GameKit { delegate void GKPlayerStateUpdateHandler (string playerId, GKVoiceChatPlayerState state); delegate void GKIdentityVerificationSignatureHandler (NSUrl publicKeyUrl, NSData signature, NSData salt, ulong timestamp, NSError error); delegate void GKLeaderboardSetsHandler (GKLeaderboardSet [] leaderboardSets, NSError error); + delegate void GKEntriesForPlayerScopeHandler (GKLeaderboardEntry localPlayerEntry, GKLeaderboardEntry [] entries, nint totalPlayerCount, NSError error); + delegate void GKEntriesForPlayersHandler (GKLeaderboardEntry localPlayerEntry, GKLeaderboardEntry [] entries, NSError error); #if MONOMAC delegate void GKImageLoadedHandler (NSImage image, NSError error); @@ -54,6 +61,7 @@ namespace GameKit { interface UIAppearance {} interface UIViewController {} interface UINavigationController {} + interface UIWindow {} #endif @@ -268,14 +276,27 @@ namespace GameKit { } [Watch (3,0)] + [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface GKLeaderboard { + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("timeScope", ArgumentSemantic.Assign)] GKLeaderboardTimeScope TimeScope { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("playerScope", ArgumentSemantic.Assign)] GKLeaderboardPlayerScope PlayerScope { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("maxRange", ArgumentSemantic.Assign)] nint MaxRange { get; } @@ -290,21 +311,44 @@ namespace GameKit { [Export ("title", ArgumentSemantic.Copy)] string Title { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("range", ArgumentSemantic.Assign)] NSRange Range { get; set; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("scores", ArgumentSemantic.Retain)] GKScore [] Scores { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("localPlayerScore", ArgumentSemantic.Retain)] GKScore LocalPlayerScore { get; } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboards' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboards' instead.")] + [Export ("init")] + IntPtr Constructor (); + [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) - [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'ctor (GKPlayer [] players)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'ctor (GKPlayer [] players)' instead.")] + [Deprecated (PlatformName.iOS, 8, 0, message : "Use '.ctor (GKPlayer [] players)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use '.ctor (GKPlayer [] players)' instead.")] [Export ("initWithPlayerIDs:")] IntPtr Constructor ([NullAllowed] string [] players); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Export ("loadScoresWithCompletionHandler:")] [Async] void LoadScores ([NullAllowed] GKScoresLoadedHandler scoresLoadedHandler); @@ -331,10 +375,18 @@ namespace GameKit { string GroupIdentifier { get; [NotImplemented] set; } [Static] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] void LoadLeaderboards ([NullAllowed] Action completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [iOS (7,0)][Mac (10,10)] [NullAllowed] [Export ("identifier", ArgumentSemantic.Copy)] @@ -347,13 +399,73 @@ namespace GameKit { [Async] void LoadImage ([NullAllowed] GKImageLoadedHandler completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [iOS (8,0), Mac (10,10)] [Export ("initWithPlayers:")] IntPtr Constructor (GKPlayer [] players); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Mac (10,10)] // should be 10,8 but tests fails before Yosemite [Export ("loading")] bool IsLoading { [Bind ("isLoading")] get; } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Async] + [Export ("loadLeaderboardsWithIDs:completionHandler:")] + void LoadLeaderboards ([NullAllowed] string[] leaderboardIds, GKLeaderboardsHandler completionHandler); + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Static] + [Export ("submitScore:context:player:leaderboardIDs:completionHandler:")] + [Async] + void SubmitScore (nint score, nuint context, GKPlayer player, string[] leaderboardIds, Action completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("baseLeaderboardID", ArgumentSemantic.Strong)] + string BaseLeaderboardId { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("duration")] + double Duration { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Async (ResultTypeName = "GKEntriesForPlayerScopeResult")] + [Export ("loadEntriesForPlayerScope:timeScope:range:completionHandler:")] + void LoadEntries (GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope, NSRange range, [NullAllowed] GKEntriesForPlayerScopeHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Async (ResultTypeName = "GKEntriesForPlayersResult")] + [Export ("loadEntriesForPlayers:timeScope:completionHandler:")] + void LoadEntries (GKPlayer[] players, GKLeaderboardTimeScope timeScope, [NullAllowed] GKEntriesForPlayersHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("loadPreviousOccurrenceWithCompletionHandler:")] + [Async] + void LoadPreviousOccurrence (GKLeaderboardsHandler completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("nextStartDate", ArgumentSemantic.Strong)] + NSDate NextStartDate { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [NullAllowed, Export ("startDate", ArgumentSemantic.Strong)] + NSDate StartDate { get; } + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("submitScore:context:player:completionHandler:")] + [Async] + void SubmitScore (nint score, nuint context, GKPlayer player, Action completionHandler); + + [Watch (7, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Export ("type")] + GKLeaderboardType Type { get; } } [Watch (3,0)] @@ -376,10 +488,19 @@ namespace GameKit { [Async] void LoadLeaderboardSets ([NullAllowed] GKLeaderboardSetsHandler completionHandler); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] void LoadLeaderboards ([NullAllowed] GKLeaderboardsHandler completionHandler); + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("loadLeaderboardsWithHandler:")] + [Async] + void LoadLeaderboardsWithCompletionHandler (GKLeaderboardsHandler handler); + #if !MONOMAC [NoTV] [NoWatch] @@ -481,8 +602,16 @@ namespace GameKit { [TV (13,0)][Mac (10,15)][iOS (13,0)] [Export ("scopedIDsArePersistent")] bool ScopedIdsArePersistent { get; } + + [TV (14, 0), NoWatch, Mac (11, 0), iOS (14, 0)] + [Field ("GKPlayerIDNoLongerAvailable")] + NSString IdNoLongerAvailable { get; } } + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GKLeaderboardEntry' instead.")] + [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GKLeaderboardEntry' instead.")] [Watch (3,0)] [BaseType (typeof (NSObject))] interface GKScore : NSSecureCoding { @@ -569,6 +698,12 @@ namespace GameKit { [Async] void ReportScores (GKScore[] scores, [NullAllowed] GKChallenge[] challenges, [NullAllowed] Action completionHandler); + [NoWatch] + [iOS (14,0)][Mac (11,0)][TV (14,0)] + [Static] + [Async] + [Export ("reportLeaderboardScores:withEligibleChallenges:withCompletionHandler:")] + void ReportLeaderboardScores (GKLeaderboardScore[] scores, GKChallenge[] eligibleChallenges, [NullAllowed] Action completionHandler); #if !MONOMAC [NoTV][NoWatch] [Availability (Deprecated = Platform.iOS_8_0, Message = "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ...)' instead.")] @@ -803,6 +938,11 @@ namespace GameKit { [Static] [Export ("local")] GKLocalPlayer Local { get; } + + [NoWatch] + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("personalizedCommunicationRestricted")] + bool PersonalizedCommunicationRestricted { [Bind ("isPersonalizedCommunicationRestricted")] get; } } [NoWatch] @@ -846,7 +986,7 @@ namespace GameKit { [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'Players' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'Players' instead.")] - [Export ("playerIDs")] + [NullAllowed, Export ("playerIDs")] string [] PlayersIDs { get; } [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] @@ -1000,7 +1140,7 @@ namespace GameKit { [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message : "Use 'Players' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'Players' instead.")] - [Export ("playerIDs")] + [NullAllowed, Export ("playerIDs")] string [] PlayerIDs { get; } [iOS (8,0)][Mac (10,10)] @@ -1240,6 +1380,10 @@ namespace GameKit { [iOS (8,0), Mac (10,10)] [Export ("setHostedPlayer:didConnect:")] void SetHostedPlayerConnected (GKPlayer playerID, bool connected); + + [TV (14,0), Mac (11,0), iOS (14,0)] + [Export ("matchmakingMode", ArgumentSemantic.Assign)] + GKMatchmakingMode MatchmakingMode { get; set; } } [NoWatch] @@ -1369,8 +1513,8 @@ namespace GameKit { [NoTV] [iOS (7,0)] [Availability (Deprecated = Platform.iOS_8_0, Message = "Use 'Player' instead.")] - [Export ("playerID", ArgumentSemantic.Copy)] - string PlayerID { + [NullAllowed, Export ("playerID", ArgumentSemantic.Copy)] + string PlayerID { get; } #endif @@ -1823,6 +1967,8 @@ namespace GameKit { [Export ("setLocalizableMessageWithKey:arguments:")] void SetMessage (string localizableMessage, params NSObject [] arguments); + [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] [iOS (7,0)][Mac (10,10)] [Export ("endMatchInTurnWithMatchData:scores:achievements:completionHandler:")] [Async] @@ -1842,6 +1988,11 @@ namespace GameKit { [Export ("sendReminderToParticipants:localizableMessageKey:arguments:completionHandler:")] [Async] void SendReminder (GKTurnBasedParticipant [] participants, string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); + + [iOS (14,0)][Mac (11,0)][Watch (7,0)][TV (14,0)] + [Export ("endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler:")] + [Async] + void EndMatchInTurn (NSData matchData, GKLeaderboardScore[] scores, NSObject[] achievements, Action completionHandler); } [NoWatch] @@ -1986,7 +2137,23 @@ namespace GameKit { [NoiOS] [Export ("initWithNibName:bundle:")] IntPtr Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull); - + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithLeaderboardID:playerScope:timeScope:")] + IntPtr Constructor (string leaderboardId, GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithLeaderboard:playerScope:")] + IntPtr Constructor (GKLeaderboard leaderboard, GKLeaderboardPlayerScope playerScope); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithAchievementID:")] + IntPtr Constructor (string achievementId); + + [TV (14,0), NoWatch, Mac (11,0), iOS (14,0)] + [Export ("initWithState:")] + IntPtr Constructor (GKGameCenterViewControllerState state); + [Export ("gameCenterDelegate", ArgumentSemantic.Weak), NullAllowed] NSObject WeakDelegate { get; set; } @@ -1994,7 +2161,10 @@ namespace GameKit { [Protocolize] GKGameCenterControllerDelegate Delegate { get; set; } - [NoTV] + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use '.ctor (GKGameCenterViewControllerState)' instead.")] + [TV (9,0)] [Export ("viewState", ArgumentSemantic.Assign)] GKGameCenterViewControllerState ViewState { get; set; } @@ -2011,8 +2181,10 @@ namespace GameKit { [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'LeaderboardIdentifier' instead.")] string LeaderboardCategory { get; set; } - [NoTV] - [iOS (7,0)][Mac (10,10)] // Marked 10.9 in header, apple 17612948 + [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use '.ctor (GKLeaderboard, GKLeaderboardPlayerScope)' instead.")] + [TV (9,0)][iOS (7,0)][Mac (10,10)] // Marked 10.9 in header, apple 17612948 [NullAllowed] // by default this property is null [Export ("leaderboardIdentifier", ArgumentSemantic.Strong)] string LeaderboardIdentifier { get; set; } @@ -2446,14 +2618,103 @@ namespace GameKit { interface GKSessionDelegate { [Export ("session:peer:didChangeState:")] void PeerChangedState (GKSession session, string peerID, GKPeerConnectionState state); - + [Export ("session:didReceiveConnectionRequestFromPeer:")] void PeerConnectionRequest (GKSession session, string peerID); - + [Export ("session:connectionWithPeerFailed:withError:")] void PeerConnectionFailed (GKSession session, string peerID, NSError error); - + [Export ("session:didFailWithError:")] void FailedWithError (GKSession session, NSError error); } + + [TV (14,0), Mac (11,0), iOS (14,0)] + [NoWatch] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface GKAccessPoint + { + [Static] + [Export ("shared")] + GKAccessPoint Shared { get; } + + [Export ("active")] + bool Active { [Bind ("isActive")] get; set; } + + [NoMac, NoiOS] + [Export ("focused")] + bool Focused { [Bind ("isFocused")] get; set; } + + [Export ("visible")] + bool Visible { [Bind ("isVisible")] get; } + + [Export ("isPresentingGameCenter")] + bool IsPresentingGameCenter { get; } + + [Export ("showHighlights")] + bool ShowHighlights { get; set; } + + [Export ("location", ArgumentSemantic.Assign)] + GKAccessPointLocation Location { get; set; } + + [Export ("frameInScreenCoordinates")] + CGRect FrameInScreenCoordinates { get; } + + [NullAllowed, Export ("parentWindow", ArgumentSemantic.Weak)] + UIWindow ParentWindow { get; set; } + + [Export ("triggerAccessPointWithHandler:")] + void TriggerAccessPoint (Action handler); + + [Export ("triggerAccessPointWithState:handler:")] + void TriggerAccessPoint (GKGameCenterViewControllerState state, Action handler); + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [DisableDefaultCtor] + [BaseType (typeof (NSObject))] + interface GKLeaderboardEntry + { + [Export ("player", ArgumentSemantic.Strong)] + GKPlayer Player { get; } + +#if MONOMAC // Some APIs missing on iOS, tvOS, watchOS as of Xcode 12 beta 3 - https://github.com/xamarin/maccore/issues/2269 + [Export ("rank")] + nint Rank { get; } + + [Export ("score")] + nint Score { get; } + + [Export ("formattedScore", ArgumentSemantic.Strong)] + string FormattedScore { get; } + + [Export ("context")] + nuint Context { get; } + + [Export ("date", ArgumentSemantic.Strong)] + NSDate Date { get; } +#endif + [NoWatch] // header lists watch as supported, but UIViewController is not available on Watch! + [Async (ResultTypeName = "GKChallengeComposeResult")] + [Export ("challengeComposeControllerWithMessage:players:completionHandler:")] + UIViewController ChallengeComposeController ([NullAllowed] string message, [NullAllowed] GKPlayer[] players, [NullAllowed] GKChallengeComposeHandler completionHandler); + } + + [Watch (7,0), TV (14,0), Mac (11,0), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface GKLeaderboardScore + { + [Export ("player", ArgumentSemantic.Strong)] + GKPlayer Player { get; set; } + + [Export ("value")] + nint Value { get; set; } + + [Export ("context")] + nuint Context { get; set; } + + [Export ("leaderboardID", ArgumentSemantic.Strong)] + string LeaderboardId { get; set; } + } } diff --git a/tests/xtro-sharpie/iOS-GameKit.ignore b/tests/xtro-sharpie/iOS-GameKit.ignore index 33535eb8ad..5d7206d816 100644 --- a/tests/xtro-sharpie/iOS-GameKit.ignore +++ b/tests/xtro-sharpie/iOS-GameKit.ignore @@ -32,3 +32,14 @@ !missing-null-allowed! 'UIKit.UIViewController GameKit.GKAchievement::ChallengeComposeController(GameKit.GKPlayer[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'UIKit.UIViewController GameKit.GKAchievement::ChallengeComposeController(GameKit.GKPlayer[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on return type !missing-null-allowed! 'UIKit.UIViewController GameKit.GKScore::ChallengeComposeController(System.String[],System.String,GameKit.GKChallengeComposeHandler)' is missing an [NullAllowed] on return type + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound + +# Xcode 12 beta 3 - these API are missing +# https://github.com/xamarin/maccore/issues/2269 +!missing-selector! GKLeaderboardEntry::context not bound +!missing-selector! GKLeaderboardEntry::date not bound +!missing-selector! GKLeaderboardEntry::formattedScore not bound +!missing-selector! GKLeaderboardEntry::rank not bound +!missing-selector! GKLeaderboardEntry::score not bound diff --git a/tests/xtro-sharpie/iOS-GameKit.todo b/tests/xtro-sharpie/iOS-GameKit.todo deleted file mode 100644 index 73d45cb563..0000000000 --- a/tests/xtro-sharpie/iOS-GameKit.todo +++ /dev/null @@ -1,85 +0,0 @@ -!deprecated-attribute-missing! GKGameCenterViewController::leaderboardIdentifier missing a [Deprecated] attribute -!deprecated-attribute-missing! GKGameCenterViewController::setLeaderboardIdentifier: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKGameCenterViewController::setViewState: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKGameCenterViewController::viewState missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::identifier missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::init missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::initWithPlayers: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::isLoading missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadScoresWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::localPlayerScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::maxRange missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::playerScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::range missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::scores missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setIdentifier: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setPlayerScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setRange: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setTimeScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::timeScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboardSet::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKScore::reportScores:withEligibleChallenges:withCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKTurnBasedMatch::endMatchInTurnWithMatchData:scores:achievements:completionHandler: missing a [Deprecated] attribute -!missing-enum! GKAccessPointLocation not bound -!missing-enum! GKLeaderboardType not bound -!missing-enum! GKMatchmakingMode not bound -!missing-field! GKPlayerIDNoLongerAvailable not bound -!missing-null-allowed! 'System.String GameKit.GKAchievement::get_PlayerID()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] GameKit.GKMatch::get_PlayersIDs()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] GameKit.GKVoiceChat::get_PlayerIDs()' is missing an [NullAllowed] on return type -!missing-selector! +GKAccessPoint::shared not bound -!missing-selector! +GKLeaderboard::loadLeaderboardsWithIDs:completionHandler: not bound -!missing-selector! +GKLeaderboard::submitScore:context:player:leaderboardIDs:completionHandler: not bound -!missing-selector! +GKScore::reportLeaderboardScores:withEligibleChallenges:withCompletionHandler: not bound -!missing-selector! GKAccessPoint::frameInScreenCoordinates not bound -!missing-selector! GKAccessPoint::isActive not bound -!missing-selector! GKAccessPoint::isPresentingGameCenter not bound -!missing-selector! GKAccessPoint::isVisible not bound -!missing-selector! GKAccessPoint::location not bound -!missing-selector! GKAccessPoint::parentWindow not bound -!missing-selector! GKAccessPoint::setActive: not bound -!missing-selector! GKAccessPoint::setLocation: not bound -!missing-selector! GKAccessPoint::setParentWindow: not bound -!missing-selector! GKAccessPoint::setShowHighlights: not bound -!missing-selector! GKAccessPoint::showHighlights not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithHandler: not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithState:handler: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithAchievementID: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboard:playerScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboardID:playerScope:timeScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithState: not bound -!missing-selector! GKLeaderboard::baseLeaderboardID not bound -!missing-selector! GKLeaderboard::duration not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayers:timeScope:completionHandler: not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayerScope:timeScope:range:completionHandler: not bound -!missing-selector! GKLeaderboard::loadPreviousOccurrenceWithCompletionHandler: not bound -!missing-selector! GKLeaderboard::nextStartDate not bound -!missing-selector! GKLeaderboard::startDate not bound -!missing-selector! GKLeaderboard::submitScore:context:player:completionHandler: not bound -!missing-selector! GKLeaderboard::type not bound -!missing-selector! GKLeaderboardEntry::challengeComposeControllerWithMessage:players:completionHandler: not bound -!missing-selector! GKLeaderboardEntry::context not bound -!missing-selector! GKLeaderboardEntry::date not bound -!missing-selector! GKLeaderboardEntry::formattedScore not bound -!missing-selector! GKLeaderboardEntry::player not bound -!missing-selector! GKLeaderboardEntry::rank not bound -!missing-selector! GKLeaderboardEntry::score not bound -!missing-selector! GKLeaderboardScore::context not bound -!missing-selector! GKLeaderboardScore::leaderboardID not bound -!missing-selector! GKLeaderboardScore::player not bound -!missing-selector! GKLeaderboardScore::setContext: not bound -!missing-selector! GKLeaderboardScore::setLeaderboardID: not bound -!missing-selector! GKLeaderboardScore::setPlayer: not bound -!missing-selector! GKLeaderboardScore::setValue: not bound -!missing-selector! GKLeaderboardScore::value not bound -!missing-selector! GKLeaderboardSet::loadLeaderboardsWithHandler: not bound -!missing-selector! GKLocalPlayer::isPersonalizedCommunicationRestricted not bound -!missing-selector! GKMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKMatchmakerViewController::setMatchmakingMode: not bound -!missing-selector! GKTurnBasedMatch::endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler: not bound -!missing-type! GKAccessPoint not bound -!missing-type! GKLeaderboardEntry not bound -!missing-type! GKLeaderboardScore not bound -!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/macOS-GameKit.ignore b/tests/xtro-sharpie/macOS-GameKit.ignore index 7b953de45d..09ddb00748 100644 --- a/tests/xtro-sharpie/macOS-GameKit.ignore +++ b/tests/xtro-sharpie/macOS-GameKit.ignore @@ -45,3 +45,6 @@ !missing-null-allowed! 'System.Void GameKit.GKDialogController::set_ParentWindow(AppKit.NSWindow)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void GameKit.GKGameSession::SendMessage(System.String,System.String[],Foundation.NSData,GameKit.GKCloudPlayer[],System.Boolean,System.Action`1)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'System.Void GameKit.GKMatchmakerViewController::set_DefaultInvitationMessage(System.String)' is missing an [NullAllowed] on parameter #0 + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/macOS-GameKit.todo b/tests/xtro-sharpie/macOS-GameKit.todo deleted file mode 100644 index db355724aa..0000000000 --- a/tests/xtro-sharpie/macOS-GameKit.todo +++ /dev/null @@ -1,60 +0,0 @@ -!missing-enum! GKAccessPointLocation not bound -!missing-enum! GKLeaderboardType not bound -!missing-enum! GKMatchmakingMode not bound -!missing-field! GKPlayerIDNoLongerAvailable not bound -!missing-null-allowed! 'System.String[] GameKit.GKMatch::get_PlayersIDs()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] GameKit.GKVoiceChat::get_PlayerIDs()' is missing an [NullAllowed] on return type -!missing-selector! +GKAccessPoint::shared not bound -!missing-selector! +GKLeaderboard::loadLeaderboardsWithIDs:completionHandler: not bound -!missing-selector! +GKLeaderboard::submitScore:context:player:leaderboardIDs:completionHandler: not bound -!missing-selector! +GKScore::reportLeaderboardScores:withEligibleChallenges:withCompletionHandler: not bound -!missing-selector! GKAccessPoint::frameInScreenCoordinates not bound -!missing-selector! GKAccessPoint::isActive not bound -!missing-selector! GKAccessPoint::isPresentingGameCenter not bound -!missing-selector! GKAccessPoint::isVisible not bound -!missing-selector! GKAccessPoint::location not bound -!missing-selector! GKAccessPoint::parentWindow not bound -!missing-selector! GKAccessPoint::setActive: not bound -!missing-selector! GKAccessPoint::setLocation: not bound -!missing-selector! GKAccessPoint::setParentWindow: not bound -!missing-selector! GKAccessPoint::setShowHighlights: not bound -!missing-selector! GKAccessPoint::showHighlights not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithHandler: not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithState:handler: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithAchievementID: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboard:playerScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboardID:playerScope:timeScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithState: not bound -!missing-selector! GKLeaderboard::baseLeaderboardID not bound -!missing-selector! GKLeaderboard::duration not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayers:timeScope:completionHandler: not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayerScope:timeScope:range:completionHandler: not bound -!missing-selector! GKLeaderboard::loadPreviousOccurrenceWithCompletionHandler: not bound -!missing-selector! GKLeaderboard::nextStartDate not bound -!missing-selector! GKLeaderboard::startDate not bound -!missing-selector! GKLeaderboard::submitScore:context:player:completionHandler: not bound -!missing-selector! GKLeaderboard::type not bound -!missing-selector! GKLeaderboardEntry::challengeComposeControllerWithMessage:players:completionHandler: not bound -!missing-selector! GKLeaderboardEntry::context not bound -!missing-selector! GKLeaderboardEntry::date not bound -!missing-selector! GKLeaderboardEntry::formattedScore not bound -!missing-selector! GKLeaderboardEntry::player not bound -!missing-selector! GKLeaderboardEntry::rank not bound -!missing-selector! GKLeaderboardEntry::score not bound -!missing-selector! GKLeaderboardScore::context not bound -!missing-selector! GKLeaderboardScore::leaderboardID not bound -!missing-selector! GKLeaderboardScore::player not bound -!missing-selector! GKLeaderboardScore::setContext: not bound -!missing-selector! GKLeaderboardScore::setLeaderboardID: not bound -!missing-selector! GKLeaderboardScore::setPlayer: not bound -!missing-selector! GKLeaderboardScore::setValue: not bound -!missing-selector! GKLeaderboardScore::value not bound -!missing-selector! GKLeaderboardSet::loadLeaderboardsWithHandler: not bound -!missing-selector! GKLocalPlayer::isPersonalizedCommunicationRestricted not bound -!missing-selector! GKMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKMatchmakerViewController::setMatchmakingMode: not bound -!missing-selector! GKTurnBasedMatch::endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler: not bound -!missing-type! GKAccessPoint not bound -!missing-type! GKLeaderboardEntry not bound -!missing-type! GKLeaderboardScore not bound -!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/tvOS-GameKit.ignore b/tests/xtro-sharpie/tvOS-GameKit.ignore index 449463508d..5d4f501d69 100644 --- a/tests/xtro-sharpie/tvOS-GameKit.ignore +++ b/tests/xtro-sharpie/tvOS-GameKit.ignore @@ -16,3 +16,20 @@ !missing-null-allowed! 'System.String GameKit.GKPlayer::get_GuestIdentifier()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Void GameKit.GKGameSession::SendMessage(System.String,System.String[],Foundation.NSData,GameKit.GKCloudPlayer[],System.Boolean,System.Action`1)' is missing an [NullAllowed] on parameter #2 !missing-null-allowed! 'UIKit.UIImage GameKit.GKAchievementDescription::get_Image()' is missing an [NullAllowed] on return type + +# NS_DEPRECATED_IOS(7_0, 8_0, "This is never invoked and its implementation does nothing, pass GKPlayers to challengeComposeControllerWithMessage:players: instead") /*rb= GameKit.unavailableForTVOS*/; +# as a sideeffect these macros include tvOS, however by the time tvOS 9.0 was released this +# API was already deprecated +!missing-selector! GKAchievement::challengeComposeControllerWithPlayers:message:completionHandler: not bound +!missing-selector! GKScore::challengeComposeControllerWithPlayers:message:completionHandler: not bound + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound + +# Xcode 12 beta 3 - these API are missing +# https://github.com/xamarin/maccore/issues/2269 +!missing-selector! GKLeaderboardEntry::context not bound +!missing-selector! GKLeaderboardEntry::date not bound +!missing-selector! GKLeaderboardEntry::formattedScore not bound +!missing-selector! GKLeaderboardEntry::rank not bound +!missing-selector! GKLeaderboardEntry::score not bound diff --git a/tests/xtro-sharpie/tvOS-GameKit.todo b/tests/xtro-sharpie/tvOS-GameKit.todo deleted file mode 100644 index fb8e90ac59..0000000000 --- a/tests/xtro-sharpie/tvOS-GameKit.todo +++ /dev/null @@ -1,86 +0,0 @@ -!deprecated-attribute-missing! GKLeaderboard::identifier missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::init missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::initWithPlayers: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::isLoading missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadScoresWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::localPlayerScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::maxRange missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::playerScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::range missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::scores missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setIdentifier: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setPlayerScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setRange: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setTimeScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::timeScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboardSet::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKScore::reportScores:withEligibleChallenges:withCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKTurnBasedMatch::endMatchInTurnWithMatchData:scores:achievements:completionHandler: missing a [Deprecated] attribute -!missing-enum! GKAccessPointLocation not bound -!missing-enum! GKLeaderboardType not bound -!missing-enum! GKMatchmakingMode not bound -!missing-field! GKPlayerIDNoLongerAvailable not bound -!missing-selector! +GKAccessPoint::shared not bound -!missing-selector! +GKLeaderboard::loadLeaderboardsWithIDs:completionHandler: not bound -!missing-selector! +GKLeaderboard::submitScore:context:player:leaderboardIDs:completionHandler: not bound -!missing-selector! +GKScore::reportLeaderboardScores:withEligibleChallenges:withCompletionHandler: not bound -!missing-selector! GKAccessPoint::frameInScreenCoordinates not bound -!missing-selector! GKAccessPoint::isActive not bound -!missing-selector! GKAccessPoint::isFocused not bound -!missing-selector! GKAccessPoint::isPresentingGameCenter not bound -!missing-selector! GKAccessPoint::isVisible not bound -!missing-selector! GKAccessPoint::location not bound -!missing-selector! GKAccessPoint::parentWindow not bound -!missing-selector! GKAccessPoint::setActive: not bound -!missing-selector! GKAccessPoint::setFocused: not bound -!missing-selector! GKAccessPoint::setLocation: not bound -!missing-selector! GKAccessPoint::setParentWindow: not bound -!missing-selector! GKAccessPoint::setShowHighlights: not bound -!missing-selector! GKAccessPoint::showHighlights not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithHandler: not bound -!missing-selector! GKAccessPoint::triggerAccessPointWithState:handler: not bound -!missing-selector! GKAchievement::challengeComposeControllerWithPlayers:message:completionHandler: not bound -!missing-selector! GKGameCenterViewController::leaderboardIdentifier not bound -!missing-selector! GKGameCenterViewController::setLeaderboardIdentifier: not bound -!missing-selector! GKGameCenterViewController::setViewState: not bound -!missing-selector! GKGameCenterViewController::viewState not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithAchievementID: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboard:playerScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithLeaderboardID:playerScope:timeScope: not bound -!missing-selector! GKGameCenterViewControllerGKGameCenterViewController::initWithState: not bound -!missing-selector! GKLeaderboard::baseLeaderboardID not bound -!missing-selector! GKLeaderboard::duration not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayers:timeScope:completionHandler: not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayerScope:timeScope:range:completionHandler: not bound -!missing-selector! GKLeaderboard::loadPreviousOccurrenceWithCompletionHandler: not bound -!missing-selector! GKLeaderboard::nextStartDate not bound -!missing-selector! GKLeaderboard::startDate not bound -!missing-selector! GKLeaderboard::submitScore:context:player:completionHandler: not bound -!missing-selector! GKLeaderboard::type not bound -!missing-selector! GKLeaderboardEntry::challengeComposeControllerWithMessage:players:completionHandler: not bound -!missing-selector! GKLeaderboardEntry::context not bound -!missing-selector! GKLeaderboardEntry::date not bound -!missing-selector! GKLeaderboardEntry::formattedScore not bound -!missing-selector! GKLeaderboardEntry::player not bound -!missing-selector! GKLeaderboardEntry::rank not bound -!missing-selector! GKLeaderboardEntry::score not bound -!missing-selector! GKLeaderboardScore::context not bound -!missing-selector! GKLeaderboardScore::leaderboardID not bound -!missing-selector! GKLeaderboardScore::player not bound -!missing-selector! GKLeaderboardScore::setContext: not bound -!missing-selector! GKLeaderboardScore::setLeaderboardID: not bound -!missing-selector! GKLeaderboardScore::setPlayer: not bound -!missing-selector! GKLeaderboardScore::setValue: not bound -!missing-selector! GKLeaderboardScore::value not bound -!missing-selector! GKLeaderboardSet::loadLeaderboardsWithHandler: not bound -!missing-selector! GKLocalPlayer::isPersonalizedCommunicationRestricted not bound -!missing-selector! GKMatchmakerViewController::matchmakingMode not bound -!missing-selector! GKMatchmakerViewController::setMatchmakingMode: not bound -!missing-selector! GKScore::challengeComposeControllerWithPlayers:message:completionHandler: not bound -!missing-selector! GKTurnBasedMatch::endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler: not bound -!missing-type! GKAccessPoint not bound -!missing-type! GKLeaderboardEntry not bound -!missing-type! GKLeaderboardScore not bound -!unknown-native-enum! GKAuthenticationType bound diff --git a/tests/xtro-sharpie/watchOS-GameKit.ignore b/tests/xtro-sharpie/watchOS-GameKit.ignore index 6358dd50a7..3d4a0946a2 100644 --- a/tests/xtro-sharpie/watchOS-GameKit.ignore +++ b/tests/xtro-sharpie/watchOS-GameKit.ignore @@ -79,3 +79,14 @@ # Initial result from new rule missing-null-allowed !missing-null-allowed! 'System.String GameKit.GKTurnBasedParticipant::get_PlayerID()' is missing an [NullAllowed] on return type + +# API removed by Apple, marked as deprecated +!unknown-native-enum! GKAuthenticationType bound + +# Xcode 12 beta 3 - these API are missing +# https://github.com/xamarin/maccore/issues/2269 +!missing-selector! GKLeaderboardEntry::context not bound +!missing-selector! GKLeaderboardEntry::date not bound +!missing-selector! GKLeaderboardEntry::formattedScore not bound +!missing-selector! GKLeaderboardEntry::rank not bound +!missing-selector! GKLeaderboardEntry::score not bound diff --git a/tests/xtro-sharpie/watchOS-GameKit.todo b/tests/xtro-sharpie/watchOS-GameKit.todo deleted file mode 100644 index dea2c68952..0000000000 --- a/tests/xtro-sharpie/watchOS-GameKit.todo +++ /dev/null @@ -1,51 +0,0 @@ -!deprecated-attribute-missing! GKLeaderboard::identifier missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::init missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::initWithPlayers: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::isLoading missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::loadScoresWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::localPlayerScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::maxRange missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::playerScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::range missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::scores missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setIdentifier: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setPlayerScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setRange: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::setTimeScope: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboard::timeScope missing a [Deprecated] attribute -!deprecated-attribute-missing! GKLeaderboardSet::loadLeaderboardsWithCompletionHandler: missing a [Deprecated] attribute -!deprecated-attribute-missing! GKScore missing a [Deprecated] attribute -!deprecated-attribute-missing! GKTurnBasedMatch::endMatchInTurnWithMatchData:scores:achievements:completionHandler: missing a [Deprecated] attribute -!missing-enum! GKLeaderboardType not bound -!missing-null-allowed! 'System.String GameKit.GKAchievement::get_PlayerID()' is missing an [NullAllowed] on return type -!missing-selector! +GKLeaderboard::loadLeaderboardsWithIDs:completionHandler: not bound -!missing-selector! +GKLeaderboard::submitScore:context:player:leaderboardIDs:completionHandler: not bound -!missing-selector! GKLeaderboard::baseLeaderboardID not bound -!missing-selector! GKLeaderboard::duration not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayers:timeScope:completionHandler: not bound -!missing-selector! GKLeaderboard::loadEntriesForPlayerScope:timeScope:range:completionHandler: not bound -!missing-selector! GKLeaderboard::loadPreviousOccurrenceWithCompletionHandler: not bound -!missing-selector! GKLeaderboard::nextStartDate not bound -!missing-selector! GKLeaderboard::startDate not bound -!missing-selector! GKLeaderboard::submitScore:context:player:completionHandler: not bound -!missing-selector! GKLeaderboard::type not bound -!missing-selector! GKLeaderboardEntry::context not bound -!missing-selector! GKLeaderboardEntry::date not bound -!missing-selector! GKLeaderboardEntry::formattedScore not bound -!missing-selector! GKLeaderboardEntry::player not bound -!missing-selector! GKLeaderboardEntry::rank not bound -!missing-selector! GKLeaderboardEntry::score not bound -!missing-selector! GKLeaderboardScore::context not bound -!missing-selector! GKLeaderboardScore::leaderboardID not bound -!missing-selector! GKLeaderboardScore::player not bound -!missing-selector! GKLeaderboardScore::setContext: not bound -!missing-selector! GKLeaderboardScore::setLeaderboardID: not bound -!missing-selector! GKLeaderboardScore::setPlayer: not bound -!missing-selector! GKLeaderboardScore::setValue: not bound -!missing-selector! GKLeaderboardScore::value not bound -!missing-selector! GKLeaderboardSet::loadLeaderboardsWithHandler: not bound -!missing-selector! GKTurnBasedMatch::endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler: not bound -!missing-type! GKLeaderboardEntry not bound -!missing-type! GKLeaderboardScore not bound -!unknown-native-enum! GKAuthenticationType bound