From 879d03547d117f3a2f2724065707b018e666b13f Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 24 Sep 2026 10:21:07 +0200 Subject: [PATCH 01/11] Enable nullable context for binding definition compilers Compile the repository's API-definition and binding-attribute assemblies with full nullable context, matching the already-enabled core and platform assemblies. Restore the inherited context after Foundation's locally annotated callback and remove an obsolete HealthKit warning suppression. Enable annotations in both bgen's fallback compilation and the binding-project MSBuild target without imposing new nullable warnings on consuming projects. This covers direct csc response files and the separate binding-tool routes while keeping generated bindings buildable across all four platforms. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- msbuild/Xamarin.Shared/Xamarin.Shared.targets | 3 ++- src/Makefile | 1 + src/Makefile.generator | 2 +- src/bgen/BindingTouch.cs | 2 ++ src/foundation.cs | 2 +- src/healthkit.cs | 2 -- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index 900e3f229786..1822e994f3b8 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -2041,7 +2041,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. Condition="'$(IsBindingProject)' == 'true' And '$(_DisableBindingProjectBuild)' != 'true'" > - + we want to be able to write xml comments in api definition code for APIs that don't exist until all the code has been generated, so we ignore these warnings. cargs.Add ("-nowarn:CS1574"); // "XML comment has cref attribute '...' that could not be resolved" => we want to be able to write xml comments in api definition code for APIs that don't exist until all the code has been generated, so we ignore these warnings. diff --git a/src/foundation.cs b/src/foundation.cs index 16ebf7f843f2..30e63922c13e 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -11070,7 +11070,7 @@ partial interface NSUrlSessionTaskDelegate { [Export ("URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:")] #nullable enable void WillPerformHttpRedirection (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response, NSUrlRequest newRequest, Action completionHandler); -#nullable disable +#nullable restore /// To be added. /// To be added. diff --git a/src/healthkit.cs b/src/healthkit.cs index 73ce7af0dfdd..d41d610fbb20 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -5746,9 +5746,7 @@ interface HKVerifiableClinicalRecordQuery { [iOS (15, 4)] [MacCatalyst (15, 4)] [Export ("initWithRecordTypes:sourceTypes:predicate:resultsHandler:")] -#pragma warning disable 8632 // warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. IntPtr Constructor (string [] recordTypes, [BindAs (typeof (HKVerifiableClinicalRecordSourceType []))] NSString [] sourceTypes, [NullAllowed] NSPredicate predicate, Action resultsHandler); -#pragma warning restore } [iOS (15, 0)] From 987551f7eb1c81d397be3ea0570e45546fac4d5b Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 24 Sep 2026 10:24:32 +0200 Subject: [PATCH 02/11] Update --- src/foundation.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/foundation.cs b/src/foundation.cs index 30e63922c13e..03102ffc2bba 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -11068,9 +11068,7 @@ partial interface NSUrlSessionTaskDelegate { /// To be added. /// To be added. [Export ("URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:")] -#nullable enable void WillPerformHttpRedirection (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response, NSUrlRequest newRequest, Action completionHandler); -#nullable restore /// To be added. /// To be added. From a9223f2060dcf0cbb67ae9dea670209e95621948 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 24 Sep 2026 10:49:39 +0200 Subject: [PATCH 03/11] Share nullable compiler mode across source build rules Put -nullable+ in DOTNET_FLAGS so core, platform, API-definition, and binding-attribute compiler invocations use the same setting. Remove redundant switches from the core and platform response files and the attribute-library command; keep it in the API-definition response files because they are separately consumed by generated analysis projects. Track changes to Makefile when deciding whether to rebuild the binding-attribute assembly, so a future change to shared compiler flags also recompiles that direct-csc output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/Makefile | 4 +--- src/Makefile.generator | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index b658ba8dd0c7..0dc9777bb063 100644 --- a/src/Makefile +++ b/src/Makefile @@ -58,7 +58,7 @@ DOTNET_REFERENCES = \ /r:$(DOTNET_BCL_DIR)/System.Xml.ReaderWriter.dll \ DOTNET_OR_GREATER_DEFINES:=$(foreach version,$(shell seq 6 $(firstword $(subst ., ,$(subst net,,$(DOTNET_TFM))))),/define:NET$(version)_0_OR_GREATER) -DOTNET_FLAGS=/warnaserror+ /nostdlib+ /deterministic /features:strict /nologo /target:library /debug /unsafe /define:NET $(DOTNET_OR_GREATER_DEFINES) $(DOTNET_REFERENCES) /fullpaths +DOTNET_FLAGS=/warnaserror+ /nostdlib+ /deterministic /features:strict /nologo /target:library /debug /unsafe /define:NET $(DOTNET_OR_GREATER_DEFINES) $(DOTNET_REFERENCES) /fullpaths -nullable+ ifeq ($(XCODE_IS_STABLE),true) DOTNET_FLAGS+=/define:XCODE_IS_STABLE @@ -282,7 +282,6 @@ $($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp: Makefile frameworks.sources $($(2)_DOTNE $($(2)_DEFINES) \ -d:COREBUILD \ $($(2)_DOTNET_CORE_SOURCES) \ - -nullable+ \ -warnaserror+ \ -nowarn:1591 \ -nowarn:$(XML_DOCS_WARNINGS) \ @@ -477,7 +476,6 @@ $($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp: Makefile frameworks.sources $(RSP_D -res:$($(2)_DOTNET_BUILD_DIR)/ILLink.LinkAttributes.xml \ -res:$($(2)_DOTNET_BUILD_DIR)/ILLink.Substitutions.xml \ -warnaserror+ \ - -nullable+ \ $$($(2)_DOTNET_SOURCES) \ @$$(abspath $($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources) \ -out:$($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1).dll \ diff --git a/src/Makefile.generator b/src/Makefile.generator index 04feabad085d..b14cb1974f3d 100644 --- a/src/Makefile.generator +++ b/src/Makefile.generator @@ -75,6 +75,6 @@ $(RSP_DIR)/dotnet/%-defines-dotnet.rsp: frameworks.sources Makefile.generator $( $(Q) $(GENERATE_DEFINES_EXEC) $@.tmp '$(filter-out $(DOTNET_REMOVED_$(shell echo $* | tr a-z A-Z)_FRAMEWORKS),$($(shell echo $* | tr a-z A-Z)_FRAMEWORKS))' $(Q) mv $@.tmp $@ -$(DOTNET_BUILD_DIR)/Xamarin.Apple.BindingAttributes.dll: bgen/Attributes.cs bgen/PlatformName.cs bgen/DotNetGlobals.cs Makefile.generator | $(DOTNET_BUILD_DIR) - $(Q_DOTNET_BUILD) $(DOTNET_CSC) $(DOTNET_FLAGS) -nullable+ -d:BINDING_ATTRIBUTES_DLL -out:$@ bgen/Attributes.cs bgen/PlatformName.cs bgen/DotNetGlobals.cs +$(DOTNET_BUILD_DIR)/Xamarin.Apple.BindingAttributes.dll: bgen/Attributes.cs bgen/PlatformName.cs bgen/DotNetGlobals.cs Makefile Makefile.generator | $(DOTNET_BUILD_DIR) + $(Q_DOTNET_BUILD) $(DOTNET_CSC) $(DOTNET_FLAGS) -d:BINDING_ATTRIBUTES_DLL -out:$@ bgen/Attributes.cs bgen/PlatformName.cs bgen/DotNetGlobals.cs From 6c56f29e7d0da6d0941aa9a9f238bcd9da4a08da Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 09:09:02 +0200 Subject: [PATCH 04/11] Updates --- src/foundation.cs | 8 -------- src/xkit.cs | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/foundation.cs b/src/foundation.cs index e96180c6fb14..8d7d1c7d209e 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -18412,23 +18412,17 @@ partial interface NSFilePresenter { /// To be added. /// To be added. [Export ("savePresentedItemChangesWithCompletionHandler:")] -#nullable enable void SavePresentedItemChanges (Action completionHandler); -#nullable disable /// To be added. /// To be added. /// To be added. [Export ("accommodatePresentedItemDeletionWithCompletionHandler:")] -#nullable enable void AccommodatePresentedItemDeletion (Action completionHandler); -#nullable disable [NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("accommodatePresentedItemEvictionWithCompletionHandler:")] -#nullable enable void AccommodatePresentedItemEviction (Action completionHandler); -#nullable disable /// To be added. /// To be added. @@ -18464,9 +18458,7 @@ partial interface NSFilePresenter { /// To be added. /// To be added. [Export ("accommodatePresentedSubitemDeletionAtURL:completionHandler:")] -#nullable enable void AccommodatePresentedSubitemDeletion (NSUrl url, Action completionHandler); -#nullable disable /// To be added. /// To be added. diff --git a/src/xkit.cs b/src/xkit.cs index 9cd9b6e9c3d2..418bfe35bd0f 100644 --- a/src/xkit.cs +++ b/src/xkit.cs @@ -3953,9 +3953,7 @@ interface NSTextElementProvider { [Abstract] [Export ("synchronizeToBackingStore:")] -#nullable enable void Synchronize ([NullAllowed] Action completionHandler); -#nullable disable [Export ("locationFromLocation:withOffset:")] [return: NullAllowed] @@ -4004,9 +4002,7 @@ interface NSTextContentManager : NSTextElementProvider, NSSecureCoding { [Async] [Export ("synchronizeTextLayoutManagers:")] -#nullable enable void SynchronizeTextLayoutManagers ([NullAllowed] Action completionHandler); -#nullable disable [Export ("textElementsForRange:")] NSTextElement [] GetTextElements (NSTextRange range); From 38859059a8573889cc702df64394efb613c3c75d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 11:30:54 +0200 Subject: [PATCH 05/11] [Network] Document ten network state and result enums (#26791) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document ten active Network enums and all 42 of their values, with one commit for each type. Remove the corresponding 42 Cecil documentation known-failure entries. 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Network/NWEnums.cs | 62 ++++++++++++++++--- .../Documentation.KnownFailures.txt | 42 ------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/Network/NWEnums.cs b/src/Network/NWEnums.cs index 485140a756c1..6e4a921fe951 100644 --- a/src/Network/NWEnums.cs +++ b/src/Network/NWEnums.cs @@ -17,103 +17,145 @@ namespace Network { + /// Describes changes between two network browse results. [Flags] [MacCatalyst (13, 1)] public enum NWBrowseResultChange : ulong { + /// The change is invalid. Invalid = 0x00, + /// The browse results are identical. Identical = 0x01, + /// A browse result was added. ResultAdded = 0x02, + /// A browse result was removed. ResultRemoved = 0x04, + /// The TXT record changed. TxtRecordChanged = 0x20, + /// The service became discoverable on another interface. InterfaceAdded = 0x08, + /// The service is no longer discoverable on an interface. InterfaceRemoved = 0x10, } + /// Describes the state of a network browser. [MacCatalyst (13, 1)] public enum NWBrowserState { + /// The browser state is invalid. Invalid = 0, + /// The browser can receive endpoint updates. Ready = 1, + /// The browser has failed and cannot be restarted. Failed = 2, + /// The browser was cancelled and cannot be restarted. Cancelled = 3, } + /// Describes the state of a network connection. [MacCatalyst (13, 1)] public enum NWConnectionState { - /// To be added. + /// The connection state is invalid. Invalid = 0, - /// To be added. + /// The connection is waiting for a usable network. Waiting = 1, - /// To be added. + /// The connection is being established. Preparing = 2, - /// To be added. + /// The connection can send and receive data. Ready = 3, - /// To be added. + /// The connection has irrecoverably failed or closed. Failed = 4, - /// To be added. + /// The connection was cancelled. Cancelled = 5, } + /// Describes the state of a network connection group. [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] public enum NWConnectionGroupState { + /// The connection group state is invalid. Invalid = 0, + /// The group is waiting for a usable network. Waiting = 1, + /// The group can receive and process incoming messages. Ready = 2, + /// The group has irrecoverably failed. Failed = 3, + /// The group was cancelled. Cancelled = 4, } + /// Describes whether a network data transfer report is still collecting data. [MacCatalyst (13, 1)] public enum NWDataTransferReportState { + /// The report is collecting transfer data. Collecting = 1, + /// The report has finished collecting transfer data. Collected = 2, } + /// Identifies the kind of network endpoint. [MacCatalyst (13, 1)] public enum NWEndpointType { - /// To be added. + /// The endpoint type is invalid. Invalid = 0, - /// To be added. + /// An IP address and port. Address = 1, - /// To be added. + /// A hostname and port. Host = 2, - /// To be added. + /// A Bonjour service name, type, and domain. BonjourService = 3, + /// A URL endpoint. [MacCatalyst (13, 1)] Url = 4, } + /// Identifies where a network name resolution result came from. [MacCatalyst (13, 1)] public enum NWReportResolutionSource { + /// The result came from a network query. Query = 1, + /// The result came from a cached response. Cache = 2, + /// The result came from an expired cached response. ExpiredCache = 3, } + /// Describes the state of an Ethernet channel. [NoTV, NoiOS] [NoMacCatalyst] [NativeName ("nw_ethernet_channel_state_t")] public enum NWEthernetChannelState { + /// The channel state is invalid. Invalid = 0, + /// The channel is waiting for a usable network. Waiting = 1, + /// The channel is being established. Preparing = 2, + /// The channel can send and receive data. Ready = 3, + /// The channel has irrecoverably failed or closed. Failed = 4, + /// The channel was cancelled. Cancelled = 5, } // from System/Library/Frameworks/Network.framework/Headers/framer_options.h: + /// Specifies options for creating a custom framer protocol. [Flags] [MacCatalyst (13, 1)] public enum NWFramerCreateFlags : uint { + /// Use the default framer protocol options. Default = 0x00, } // from System/Library/Frameworks/Network.framework/Headers/framer_options.h: + /// Indicates when a custom framer protocol becomes ready. [MacCatalyst (13, 1)] public enum NWFramerStartResult { + /// The result is unknown. Unknown = 0, + /// The protocol is marked ready when the start handler returns. Ready = 1, + /// The start handler will mark the protocol ready later. WillMarkReady = 2, } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index bee6781175cd..e90b2064fd45 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -5346,36 +5346,7 @@ F:NearbyInteraction.NINearbyObjectVerticalDirectionEstimate.AboveOrBelow F:NearbyInteraction.NINearbyObjectVerticalDirectionEstimate.Below F:NearbyInteraction.NINearbyObjectVerticalDirectionEstimate.Same F:NearbyInteraction.NINearbyObjectVerticalDirectionEstimate.Unknown -F:Network.NWBrowseResultChange.Identical -F:Network.NWBrowseResultChange.InterfaceAdded -F:Network.NWBrowseResultChange.InterfaceRemoved -F:Network.NWBrowseResultChange.Invalid -F:Network.NWBrowseResultChange.ResultAdded -F:Network.NWBrowseResultChange.ResultRemoved -F:Network.NWBrowseResultChange.TxtRecordChanged -F:Network.NWBrowserState.Cancelled -F:Network.NWBrowserState.Failed -F:Network.NWBrowserState.Invalid -F:Network.NWBrowserState.Ready -F:Network.NWConnectionGroupState.Cancelled -F:Network.NWConnectionGroupState.Failed -F:Network.NWConnectionGroupState.Invalid -F:Network.NWConnectionGroupState.Ready -F:Network.NWConnectionGroupState.Waiting -F:Network.NWDataTransferReportState.Collected -F:Network.NWDataTransferReportState.Collecting -F:Network.NWEndpointType.Url F:Network.NWErrorDomain.WiFiAware -F:Network.NWEthernetChannelState.Cancelled -F:Network.NWEthernetChannelState.Failed -F:Network.NWEthernetChannelState.Invalid -F:Network.NWEthernetChannelState.Preparing -F:Network.NWEthernetChannelState.Ready -F:Network.NWEthernetChannelState.Waiting -F:Network.NWFramerCreateFlags.Default -F:Network.NWFramerStartResult.Ready -F:Network.NWFramerStartResult.Unknown -F:Network.NWFramerStartResult.WillMarkReady F:Network.NWInterfaceRadioType.CellCdma F:Network.NWInterfaceRadioType.CellEndcMmw F:Network.NWInterfaceRadioType.CellEndcSub6 @@ -5418,9 +5389,6 @@ F:Network.NWReportResolutionProtocol.Tcp F:Network.NWReportResolutionProtocol.Tls F:Network.NWReportResolutionProtocol.Udp F:Network.NWReportResolutionProtocol.Unknown -F:Network.NWReportResolutionSource.Cache -F:Network.NWReportResolutionSource.ExpiredCache -F:Network.NWReportResolutionSource.Query F:Network.NWResolverConfigEndpointType.Https F:Network.NWResolverConfigEndpointType.Tls F:Network.NWTxtRecordFindKey.EmptyValue @@ -58243,28 +58211,19 @@ T:Network.NWBrowserChangesDelegate T:Network.NWBrowserCompleteChangesDelegate T:Network.NWBrowserDescriptor T:Network.NWBrowseResult -T:Network.NWBrowseResultChange -T:Network.NWBrowserState T:Network.NWConnectionGroup T:Network.NWConnectionGroupReceiveDelegate -T:Network.NWConnectionGroupState T:Network.NWConnectionGroupStateChangedDelegate T:Network.NWConnectionReceiveReadOnlySpanCompletion -T:Network.NWConnectionState T:Network.NWDataTransferReport -T:Network.NWDataTransferReportState -T:Network.NWEndpointType T:Network.NWErrorDomain T:Network.NWEstablishmentReport T:Network.NWEthernetChannel T:Network.NWEthernetChannelReceiveDelegate -T:Network.NWEthernetChannelState T:Network.NWFramer -T:Network.NWFramerCreateFlags T:Network.NWFramerInputDelegate T:Network.NWFramerMessage T:Network.NWFramerParseCompletionDelegate -T:Network.NWFramerStartResult T:Network.NWInterfaceRadioType T:Network.NWInterfaceType T:Network.NWIPEcnFlag @@ -58292,7 +58251,6 @@ T:Network.NWQuicMetadata T:Network.NWQuicStreamType T:Network.NWRelayHop T:Network.NWReportResolutionProtocol -T:Network.NWReportResolutionSource T:Network.NWResolutionReport T:Network.NWResolverConfig T:Network.NWResolverConfigEndpointType From 4c40f9b732f5f13a2110047eee5e4c25a69e0d17 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 12:47:30 +0200 Subject: [PATCH 06/11] [GameKit] Correct nullable authentication callback parameters Annotate both view controller and error as nullable in the local player's authentication handler for iOS, Mac Catalyst, tvOS, and macOS. Keep the existing nullable handler contract while the file is not yet nullable-enabled. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/gamekit.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gamekit.cs b/src/gamekit.cs index 011d8274b11a..99c4cbd7b187 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -1113,14 +1113,16 @@ interface GKLocalPlayer [Notification] NSString AuthenticationDidChangeNotificationName { get; } +#nullable enable [NullAllowed] // by default this property is null [Export ("authenticateHandler", ArgumentSemantic.Copy)] [MacCatalyst (13, 1)] #if !MONOMAC - Action AuthenticateHandler { get; set; } + Action AuthenticateHandler { get; set; } #else - Action AuthenticateHandler { get; set; } + Action AuthenticateHandler { get; set; } #endif +#nullable restore [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("isPresentingFriendRequestViewController")] From 2f2a7cc08f2c0b1aa1c99484723ab94b6ba09e3a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 12:50:10 +0200 Subject: [PATCH 07/11] [GameKit] Annotate nullable completion-handler results Match the nullable result and error parameters declared by GameKit's SDK headers across its completion callbacks. Keep enum and value-type arguments nonnullable, and annotate the optional best-host responses as nullable. With PR #26746 enabling nullable annotations in API definitions globally, these annotations flow through bgen without local nullable directives. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/gamekit.cs | 142 ++++++++++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 72 deletions(-) diff --git a/src/gamekit.cs b/src/gamekit.cs index 99c4cbd7b187..f60ab468c448 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -487,7 +487,7 @@ interface GKLeaderboard { A task that represents the asynchronous SetDefaultLeaderboard operation To be added. """)] - void SetDefaultLeaderboard ([NullAllowed] string leaderboardIdentifier, [NullAllowed] Action notificationHandler); + void SetDefaultLeaderboard ([NullAllowed] string leaderboardIdentifier, [NullAllowed] Action notificationHandler); [Export ("groupIdentifier", ArgumentSemantic.Retain)] string GroupIdentifier { get; [NotImplemented] set; } @@ -505,7 +505,7 @@ interface GKLeaderboard { To be added. """)] - void LoadLeaderboards ([NullAllowed] Action completionHandler); + void LoadLeaderboards ([NullAllowed] Action completionHandler); [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] @@ -562,7 +562,7 @@ interface GKLeaderboard { [Static] [Export ("submitScore:context:player:leaderboardIDs:completionHandler:")] [Async] - void SubmitScore (nint score, nuint context, GKPlayer player, string [] leaderboardIds, Action completionHandler); + void SubmitScore (nint score, nuint context, GKPlayer player, string [] leaderboardIds, Action completionHandler); [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] @@ -606,7 +606,7 @@ interface GKLeaderboard { [MacCatalyst (14, 0)] [Export ("submitScore:context:player:completionHandler:")] [Async] - void SubmitScore (nint score, nuint context, GKPlayer player, Action completionHandler); + void SubmitScore (nint score, nuint context, GKPlayer player, Action completionHandler); [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] @@ -717,7 +717,7 @@ interface GKBasePlayer : NSCopying { interface GKCloudPlayer { [Static] [Export ("getCurrentSignedInPlayerForContainer:completionHandler:")] - void GetCurrentSignedInPlayer ([NullAllowed] string containerName, Action handler); + void GetCurrentSignedInPlayer ([NullAllowed] string containerName, Action handler); } [MacCatalyst (13, 1)] @@ -880,7 +880,7 @@ interface GKScore : NSSecureCoding { A task that represents the asynchronous ReportScore operation To be added. """)] - void ReportScore ([NullAllowed] Action errorHandler); + void ReportScore ([NullAllowed] Action errorHandler); [Export ("context", ArgumentSemantic.Assign)] ulong Context { get; set; } @@ -903,7 +903,7 @@ interface GKScore : NSSecureCoding { A task that represents the asynchronous ReportScores operation To be added. """)] - void ReportScores (GKScore [] scores, [NullAllowed] Action completionHandler); + void ReportScores (GKScore [] scores, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null @@ -919,7 +919,7 @@ interface GKScore : NSSecureCoding { To be added. To be added. """)] - void ReportScores (GKScore [] scores, GKChallenge [] challenges, [NullAllowed] Action completionHandler); + void ReportScores (GKScore [] scores, GKChallenge [] challenges, [NullAllowed] Action completionHandler); [iOS (14, 0)] [TV (14, 0)] @@ -927,7 +927,7 @@ interface GKScore : NSSecureCoding { [Static] [Async] [Export ("reportLeaderboardScores:withEligibleChallenges:withCompletionHandler:")] - void ReportLeaderboardScores (GKLeaderboardScore [] scores, GKChallenge [] eligibleChallenges, [NullAllowed] Action completionHandler); + void ReportLeaderboardScores (GKLeaderboardScore [] scores, GKChallenge [] eligibleChallenges, [NullAllowed] Action completionHandler); [NoMac] [NoTV] @@ -1081,7 +1081,7 @@ interface GKLocalPlayer A task that represents the asynchronous Authenticate operation To be added. """)] - void Authenticate ([NullAllowed] Action handler); + void Authenticate ([NullAllowed] Action handler); [MacCatalyst (13, 1)] [Async (XmlDocs = """ @@ -1092,7 +1092,7 @@ interface GKLocalPlayer To be added. """)] [Export ("loadRecentPlayersWithCompletionHandler:")] - void LoadRecentPlayers ([NullAllowed] Action completionHandler); + void LoadRecentPlayers ([NullAllowed] Action completionHandler); [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'LoadRecentPlayers' instead.")] @@ -1113,7 +1113,6 @@ interface GKLocalPlayer [Notification] NSString AuthenticationDidChangeNotificationName { get; } -#nullable enable [NullAllowed] // by default this property is null [Export ("authenticateHandler", ArgumentSemantic.Copy)] [MacCatalyst (13, 1)] @@ -1122,7 +1121,6 @@ interface GKLocalPlayer #else Action AuthenticateHandler { get; set; } #endif -#nullable restore [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("isPresentingFriendRequestViewController")] @@ -1149,7 +1147,7 @@ interface GKLocalPlayer To be added. """)] - void LoadDefaultLeaderboardIdentifier ([NullAllowed] Action completionHandler); + void LoadDefaultLeaderboardIdentifier ([NullAllowed] Action completionHandler); [Deprecated (PlatformName.iOS, 26, 2, message: "No longer supported.")] [Deprecated (PlatformName.MacOSX, 26, 2, message: "No longer supported.")] @@ -1163,7 +1161,7 @@ interface GKLocalPlayer A task that represents the asynchronous SetDefaultLeaderboardIdentifier operation To be added. """)] - void SetDefaultLeaderboardIdentifier (string leaderboardIdentifier, [NullAllowed] Action completionHandler); + void SetDefaultLeaderboardIdentifier (string leaderboardIdentifier, [NullAllowed] Action completionHandler); [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'LoadDefaultLeaderboardIdentifier' instead.")] @@ -1178,7 +1176,7 @@ interface GKLocalPlayer To be added. """)] - void LoadDefaultLeaderboardCategoryID ([NullAllowed] Action completionHandler); + void LoadDefaultLeaderboardCategoryID ([NullAllowed] Action completionHandler); [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'SetDefaultLeaderboardIdentifier' instead.")] @@ -1192,7 +1190,7 @@ interface GKLocalPlayer A task that represents the asynchronous SetDefaultLeaderboardCategoryID operation To be added. """)] - void SetDefaultLeaderboardCategoryID ([NullAllowed] string categoryID, [NullAllowed] Action completionHandler); + void SetDefaultLeaderboardCategoryID ([NullAllowed] string categoryID, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("registerListener:")] @@ -1243,27 +1241,27 @@ interface GKLocalPlayer """)] [Export ("loadFriendPlayersWithCompletionHandler:")] - void LoadFriendPlayers ([NullAllowed] Action completionHandler); + void LoadFriendPlayers ([NullAllowed] Action completionHandler); [NoTV] [MacCatalyst (13, 1)] [Export ("fetchSavedGamesWithCompletionHandler:")] - void FetchSavedGames ([NullAllowed] Action handler); + void FetchSavedGames ([NullAllowed] Action handler); [NoTV] [MacCatalyst (13, 1)] [Export ("saveGameData:withName:completionHandler:")] - void SaveGameData (NSData data, string name, [NullAllowed] Action handler); + void SaveGameData (NSData data, string name, [NullAllowed] Action handler); [NoTV] [MacCatalyst (13, 1)] [Export ("deleteSavedGamesWithName:completionHandler:")] - void DeleteSavedGames (string name, [NullAllowed] Action handler); + void DeleteSavedGames (string name, [NullAllowed] Action handler); [NoTV] [MacCatalyst (13, 1)] [Export ("resolveConflictingSavedGames:withData:completionHandler:")] - void ResolveConflictingSavedGames (GKSavedGame [] conflictingSavedGames, NSData data, [NullAllowed] Action handler); + void ResolveConflictingSavedGames (GKSavedGame [] conflictingSavedGames, NSData data, [NullAllowed] Action handler); [MacCatalyst (13, 1)] [Export ("multiplayerGamingRestricted")] @@ -1272,7 +1270,7 @@ interface GKLocalPlayer [MacCatalyst (13, 1)] [Export ("loadChallengableFriendsWithCompletionHandler:")] [Async] - void LoadChallengeableFriends ([NullAllowed] Action completionHandler); + void LoadChallengeableFriends ([NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Static] @@ -1290,19 +1288,19 @@ interface GKLocalPlayer [MacCatalyst (14, 5)] [Async] [Export ("loadFriendsAuthorizationStatus:")] - void LoadFriendsAuthorizationStatus (Action completionHandler); + void LoadFriendsAuthorizationStatus (Action completionHandler); [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Async] [Export ("loadFriends:")] - void LoadFriendsList (Action completionHandler); + void LoadFriendsList (Action completionHandler); [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Async] [Export ("loadFriendsWithIdentifiers:completionHandler:")] - void LoadFriendsList (string [] identifiers, Action completionHandler); + void LoadFriendsList (string [] identifiers, Action completionHandler); } /// Contains information that is needed to locate and load a saved game. @@ -1336,7 +1334,7 @@ interface GKSavedGame : NSCopying { To be added. """)] - void LoadData ([NullAllowed] Action handler); + void LoadData ([NullAllowed] Action handler); } /// Application developers override this class to respond to conflicts or player modifications in saved games. @@ -1436,7 +1434,7 @@ interface GKMatch { To be added. """)] - void ChooseBestHostPlayer (Action completionHandler); + void ChooseBestHostPlayer (Action completionHandler); [MacCatalyst (13, 1)] [Export ("rematchWithCompletionHandler:")] @@ -1447,7 +1445,7 @@ interface GKMatch { To be added. """)] - void Rematch ([NullAllowed] Action completionHandler); + void Rematch ([NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("players")] @@ -1465,7 +1463,7 @@ interface GKMatch { To be added. """)] - void ChooseBestHostingPlayer (Action completionHandler); + void ChooseBestHostingPlayer (Action completionHandler); [MacCatalyst (13, 1)] [Export ("sendData:toPlayers:dataMode:error:")] @@ -1826,7 +1824,7 @@ interface GKMatchmaker { A task that represents the asynchronous AddPlayers operation To be added. """)] - void AddPlayers (GKMatch toMatch, GKMatchRequest matchRequest, [NullAllowed] Action completionHandler); + void AddPlayers (GKMatch toMatch, GKMatchRequest matchRequest, [NullAllowed] Action completionHandler); [Export ("cancel")] void Cancel (); @@ -1862,7 +1860,7 @@ interface GKMatchmaker { [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [Async] [Export ("queryQueueActivity:withCompletionHandler:")] - void QueryQueueActivity (string queueName, [NullAllowed] Action completionHandler); + void QueryQueueActivity (string queueName, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("matchForInvite:completionHandler:")] @@ -1874,7 +1872,7 @@ interface GKMatchmaker { To be added. """)] - void Match (GKInvite invite, [NullAllowed] Action completionHandler); + void Match (GKInvite invite, [NullAllowed] Action completionHandler); [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'CancelPendingInvite' instead.")] @@ -1917,12 +1915,12 @@ interface GKMatchmaker { To be added. """)] - void FindPlayersForHostedRequest (GKMatchRequest request, [NullAllowed] Action completionHandler); + void FindPlayersForHostedRequest (GKMatchRequest request, [NullAllowed] Action completionHandler); [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [Async] [Export ("findMatchedPlayers:withCompletionHandler:")] - void FindMatchedPlayers (GKMatchRequest request, Action completionHandler); + void FindMatchedPlayers (GKMatchRequest request, Action completionHandler); // Not truly an [Async] method since the handler can be called multiple times, for each player found [MacCatalyst (13, 1)] @@ -2177,7 +2175,7 @@ interface GKAchievement : NSSecureCoding { A task that represents the asynchronous ResetAchivements operation To be added. """)] - void ResetAchivements ([NullAllowed] Action completionHandler); + void ResetAchivements ([NullAllowed] Action completionHandler); /// Default constructor that initializes a new instance of this class with no parameters. /// @@ -2207,7 +2205,7 @@ interface GKAchievement : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] - void ReportAchievement ([NullAllowed] Action completionHandler); + void ReportAchievement ([NullAllowed] Action completionHandler); [Export ("showsCompletionBanner", ArgumentSemantic.Assign)] bool ShowsCompletionBanner { get; set; } @@ -2220,7 +2218,7 @@ interface GKAchievement : NSSecureCoding { A task that represents the asynchronous ReportAchievements operation To be added. """)] - void ReportAchievements (GKAchievement [] achievements, [NullAllowed] Action completionHandler); + void ReportAchievements (GKAchievement [] achievements, [NullAllowed] Action completionHandler); [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Pass 'GKPlayers' to 'ChallengeComposeController(GKPlayer[] players, string message, ...)' and present the view controller instead.")] @@ -2244,7 +2242,7 @@ interface GKAchievement : NSSecureCoding { To be added. """)] - void SelectChallengeablePlayerIDs ([NullAllowed] string [] playerIDs, [NullAllowed] Action completionHandler); + void SelectChallengeablePlayerIDs ([NullAllowed] string [] playerIDs, [NullAllowed] Action completionHandler); [NoMac] [NoTV] @@ -2265,7 +2263,7 @@ string PlayerID { To be added. To be added. """)] - void ReportAchievements (GKAchievement [] achievements, GKChallenge [] challenges, [NullAllowed] Action completionHandler); + void ReportAchievements (GKAchievement [] achievements, GKChallenge [] challenges, [NullAllowed] Action completionHandler); [NullAllowed] [MacCatalyst (13, 1)] @@ -2342,7 +2340,7 @@ string PlayerID { """)] [Export ("selectChallengeablePlayers:withCompletionHandler:")] - void SelectChallengeablePlayers (GKPlayer [] players, [NullAllowed] Action completionHandler); + void SelectChallengeablePlayers (GKPlayer [] players, [NullAllowed] Action completionHandler); [NoMac] [NoTV] @@ -2851,7 +2849,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous Remove operation To be added. """)] - void Remove ([NullAllowed] Action onCompletion); + void Remove ([NullAllowed] Action onCompletion); [Export ("loadMatchDataWithCompletionHandler:")] [Async (XmlDocs = """ @@ -2876,7 +2874,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous EndTurnWithNextParticipant operation To be added. """)] - void EndTurnWithNextParticipant (GKTurnBasedParticipant nextParticipant, NSData matchData, [NullAllowed] Action noCompletion); + void EndTurnWithNextParticipant (GKTurnBasedParticipant nextParticipant, NSData matchData, [NullAllowed] Action noCompletion); [NoTV] [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] @@ -2892,7 +2890,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous ParticipantQuitInTurn operation To be added. """)] - void ParticipantQuitInTurn (GKTurnBasedMatchOutcome matchOutcome, GKTurnBasedParticipant nextParticipant, NSData matchData, [NullAllowed] Action onCompletion); + void ParticipantQuitInTurn (GKTurnBasedMatchOutcome matchOutcome, GKTurnBasedParticipant nextParticipant, NSData matchData, [NullAllowed] Action onCompletion); [Export ("participantQuitOutOfTurnWithOutcome:withCompletionHandler:")] [Async (XmlDocs = """ @@ -2901,7 +2899,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous ParticipantQuitOutOfTurn operation To be added. """)] - void ParticipantQuitOutOfTurn (GKTurnBasedMatchOutcome matchOutcome, [NullAllowed] Action onCompletion); + void ParticipantQuitOutOfTurn (GKTurnBasedMatchOutcome matchOutcome, [NullAllowed] Action onCompletion); [Export ("endMatchInTurnWithMatchData:completionHandler:")] [Async (XmlDocs = """ @@ -2910,7 +2908,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous EndMatchInTurn operation To be added. """)] - void EndMatchInTurn (NSData matchData, [NullAllowed] Action onCompletion); + void EndMatchInTurn (NSData matchData, [NullAllowed] Action onCompletion); [Static] [Export ("loadMatchWithID:withCompletionHandler:")] @@ -2922,7 +2920,7 @@ interface GKTurnBasedMatch { To be added. """)] - void LoadMatch (string matchId, [NullAllowed] Action completionHandler); + void LoadMatch (string matchId, [NullAllowed] Action completionHandler); [Export ("acceptInviteWithCompletionHandler:")] [Async (XmlDocs = """ @@ -2932,7 +2930,7 @@ interface GKTurnBasedMatch { To be added. """)] - void AcceptInvite ([NullAllowed] Action completionHandler); + void AcceptInvite ([NullAllowed] Action completionHandler); [Export ("declineInviteWithCompletionHandler:")] [Async (XmlDocs = """ @@ -2942,7 +2940,7 @@ interface GKTurnBasedMatch { To be added. """)] - void DeclineInvite ([NullAllowed] Action completionHandler); + void DeclineInvite ([NullAllowed] Action completionHandler); [Export ("matchDataMaximumSize")] nint MatchDataMaximumSize { get; } @@ -2956,7 +2954,7 @@ interface GKTurnBasedMatch { To be added. """)] - void Rematch ([NullAllowed] Action completionHandler); + void Rematch ([NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("endTurnWithNextParticipants:turnTimeout:matchData:completionHandler:")] @@ -2968,7 +2966,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous EndTurn operation To be added. """)] - void EndTurn (GKTurnBasedParticipant [] nextParticipants, double timeoutSeconds, NSData matchData, [NullAllowed] Action completionHandler); + void EndTurn (GKTurnBasedParticipant [] nextParticipants, double timeoutSeconds, NSData matchData, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("participantQuitInTurnWithOutcome:nextParticipants:turnTimeout:matchData:completionHandler:")] @@ -2981,7 +2979,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous ParticipantQuitInTurn operation To be added. """)] - void ParticipantQuitInTurn (GKTurnBasedMatchOutcome matchOutcome, GKTurnBasedParticipant [] nextParticipants, double timeoutSeconds, NSData matchData, [NullAllowed] Action completionHandler); + void ParticipantQuitInTurn (GKTurnBasedMatchOutcome matchOutcome, GKTurnBasedParticipant [] nextParticipants, double timeoutSeconds, NSData matchData, [NullAllowed] Action completionHandler); [Export ("saveCurrentTurnWithMatchData:completionHandler:")] [Async (XmlDocs = """ @@ -2990,7 +2988,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous SaveCurrentTurn operation To be added. """)] - void SaveCurrentTurn (NSData matchData, [NullAllowed] Action completionHandler); + void SaveCurrentTurn (NSData matchData, [NullAllowed] Action completionHandler); /// Represents the value associated with the constant GKTurnTimeoutDefault /// @@ -3059,7 +3057,7 @@ interface GKTurnBasedMatch { To be added. To be added. """)] - void EndMatchInTurn (NSData matchData, [NullAllowed] GKScore [] scores, [NullAllowed] GKAchievement [] achievements, [NullAllowed] Action completionHandler); + void EndMatchInTurn (NSData matchData, [NullAllowed] GKScore [] scores, [NullAllowed] GKAchievement [] achievements, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("saveMergedMatchData:withResolvedExchanges:completionHandler:")] @@ -3070,7 +3068,7 @@ interface GKTurnBasedMatch { A task that represents the asynchronous SaveMergedMatchData operation To be added. """)] - void SaveMergedMatchData (NSData matchData, GKTurnBasedExchange [] exchanges, [NullAllowed] Action completionHandler); + void SaveMergedMatchData (NSData matchData, GKTurnBasedExchange [] exchanges, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("sendExchangeToParticipants:data:localizableMessageKey:arguments:timeout:completionHandler:")] @@ -3086,7 +3084,7 @@ interface GKTurnBasedMatch { To be added. """)] - void SendExchange (GKTurnBasedParticipant [] participants, NSData data, string localizableMessage, NSObject [] arguments, double timeout, [NullAllowed] Action completionHandler); + void SendExchange (GKTurnBasedParticipant [] participants, NSData data, string localizableMessage, NSObject [] arguments, double timeout, [NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("sendReminderToParticipants:localizableMessageKey:arguments:completionHandler:")] @@ -3101,14 +3099,14 @@ interface GKTurnBasedMatch { To be added. """)] - void SendReminder (GKTurnBasedParticipant [] participants, string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); + void SendReminder (GKTurnBasedParticipant [] participants, string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); [iOS (14, 0)] [TV (14, 0)] [MacCatalyst (14, 0)] [Export ("endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler:")] [Async] - void EndMatchInTurn (NSData matchData, GKLeaderboardScore [] scores, NSObject [] achievements, Action completionHandler); + void EndMatchInTurn (NSData matchData, GKLeaderboardScore [] scores, NSObject [] achievements, Action completionHandler); } [MacCatalyst (13, 1)] @@ -3259,7 +3257,7 @@ interface GKChallenge : NSSecureCoding { To be added. """)] - void LoadReceivedChallenges ([NullAllowed] Action completionHandler); + void LoadReceivedChallenges ([NullAllowed] Action completionHandler); [MacCatalyst (13, 1)] [Export ("issuingPlayer", ArgumentSemantic.Copy)] @@ -3609,7 +3607,7 @@ interface GKTurnBasedExchange { A task that represents the asynchronous Cancel operation To be added. """)] - void Cancel (string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); + void Cancel (string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); [Export ("replyWithLocalizableMessageKey:arguments:data:completionHandler:")] [Async (XmlDocs = """ @@ -3623,7 +3621,7 @@ interface GKTurnBasedExchange { To be added. """)] - void Reply (string localizableMessage, NSObject [] arguments, NSData data, [NullAllowed] Action completionHandler); + void Reply (string localizableMessage, NSObject [] arguments, NSData data, [NullAllowed] Action completionHandler); /// Represents the value associated with the constant GKExchangeTimeoutDefault /// @@ -3865,7 +3863,7 @@ interface GKGameSession { """)] [Static] [Export ("createSessionInContainer:withTitle:maxConnectedPlayers:completionHandler:")] - void CreateSession ([NullAllowed] string containerName, string title, nint maxPlayers, Action completionHandler); + void CreateSession ([NullAllowed] string containerName, string title, nint maxPlayers, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3877,7 +3875,7 @@ interface GKGameSession { """)] [Static] [Export ("loadSessionsInContainer:completionHandler:")] - void LoadSessions ([NullAllowed] string containerName, Action completionHandler); + void LoadSessions ([NullAllowed] string containerName, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3889,7 +3887,7 @@ interface GKGameSession { """)] [Static] [Export ("loadSessionWithIdentifier:completionHandler:")] - void LoadSession (string identifier, Action completionHandler); + void LoadSession (string identifier, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3899,7 +3897,7 @@ interface GKGameSession { """)] [Static] [Export ("removeSessionWithIdentifier:completionHandler:")] - void RemoveSession (string identifier, Action completionHandler); + void RemoveSession (string identifier, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3909,7 +3907,7 @@ interface GKGameSession { To be added. """)] [Export ("getShareURLWithCompletionHandler:")] - void GetShareUrl (Action completionHandler); + void GetShareUrl (Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3919,7 +3917,7 @@ interface GKGameSession { To be added. """)] [Export ("loadDataWithCompletionHandler:")] - void LoadData (Action completionHandler); + void LoadData (Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3930,7 +3928,7 @@ interface GKGameSession { To be added. """)] [Export ("saveData:completionHandler:")] - void SaveData (NSData data, Action completionHandler); + void SaveData (NSData data, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3939,7 +3937,7 @@ interface GKGameSession { To be added. """)] [Export ("setConnectionState:completionHandler:")] - void SetConnectionState (GKConnectionState state, Action completionHandler); + void SetConnectionState (GKConnectionState state, Action completionHandler); [Export ("playersWithConnectionState:")] GKCloudPlayer [] GetPlayers (GKConnectionState state); @@ -3952,7 +3950,7 @@ interface GKGameSession { To be added. """)] [Export ("sendData:withTransportType:completionHandler:")] - void SendData (NSData data, GKTransportType transport, Action completionHandler); + void SendData (NSData data, GKTransportType transport, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3965,7 +3963,7 @@ interface GKGameSession { To be added. """)] [Export ("sendMessageWithLocalizedFormatKey:arguments:data:toPlayers:badgePlayers:completionHandler:")] - void SendMessage (string key, string [] arguments, [NullAllowed] NSData data, GKCloudPlayer [] players, bool badgePlayers, Action completionHandler); + void SendMessage (string key, string [] arguments, [NullAllowed] NSData data, GKCloudPlayer [] players, bool badgePlayers, Action completionHandler); [Async (XmlDocs = """ To be added. @@ -3977,7 +3975,7 @@ interface GKGameSession { """)] [Export ("clearBadgeForPlayers:completionHandler:")] - void ClearBadge (GKCloudPlayer [] players, Action completionHandler); + void ClearBadge (GKCloudPlayer [] players, Action completionHandler); [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GKLocalPlayer.RegisterListener' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKLocalPlayer.RegisterListener' instead.")] From 26ac998fb3426b165ad3120f06cb757eaa8d91e2 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 13:27:53 +0200 Subject: [PATCH 08/11] [xtro] Drop resolved GameKit nullable callback suppressions Remove the now-obsolete missing-null-allowed entries for GameKit callbacks and the local-player authentication handler. The managed annotations now match the nullable callback arguments in the native headers across Apple platforms. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../MacCatalyst-GameKit.ignore | 11 ----- .../common-GameKit.ignore | 48 ------------------- .../api-annotations-dotnet/iOS-GameKit.ignore | 11 ----- .../macOS-GameKit.ignore | 11 ----- .../tvOS-GameKit.ignore | 2 - 5 files changed, 83 deletions(-) diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore index 0bc05657aca7..4a773bd74ca2 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore @@ -1,14 +1,3 @@ -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::DeleteSavedGames(System.String,System.Action`1)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore index 7cd8e60e2485..5d2ee97ce709 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore @@ -1,50 +1,2 @@ -## All GKSessionError values were deprecated in iOS7 and we never bound then (no point in adding it now) - ## enum size declared after the enum, e.g. `typedef NSInteger GKInviteeResponse;`, so we miss the metadata !unknown-native-enum! GKInviteeResponse bound - -# results from initial block parameter nullability analysis -!missing-null-allowed! 'System.Void GameKit.GKAchievement::ReportAchievements(GameKit.GKAchievement[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKAchievement::ResetAchivements(System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::SubmitScore(System.IntPtr,System.UIntPtr,GameKit.GKPlayer,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::SubmitScore(System.IntPtr,System.UIntPtr,GameKit.GKPlayer,System.String[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadChallengeableFriends(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadChallengeableFriends(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadFriendsAuthorizationStatus(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadFriendsList(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadFriendsList(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadFriendsList(System.String[],System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadFriendsList(System.String[],System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadRecentPlayers(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::LoadRecentPlayers(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKMatch::ChooseBestHostingPlayer(System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatch::Rematch(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatch::Rematch(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::AddPlayers(GameKit.GKMatch,GameKit.GKMatchRequest,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::FindMatchedPlayers(GameKit.GKMatchRequest,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::FindMatchedPlayers(GameKit.GKMatchRequest,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::FindPlayersForHostedRequest(GameKit.GKMatchRequest,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::FindPlayersForHostedRequest(GameKit.GKMatchRequest,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::Match(GameKit.GKInvite,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::Match(GameKit.GKInvite,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKMatchmaker::QueryQueueActivity(System.String,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedExchange::Cancel(System.String,Foundation.NSObject[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedExchange::Reply(System.String,Foundation.NSObject[],Foundation.NSData,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::AcceptInvite(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::AcceptInvite(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::DeclineInvite(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::EndMatchInTurn(Foundation.NSData,GameKit.GKLeaderboardScore[],Foundation.NSObject[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::EndMatchInTurn(Foundation.NSData,System.Action`1)' is missing a '?' on parameter 'onCompletion' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::EndTurn(GameKit.GKTurnBasedParticipant[],System.Double,Foundation.NSData,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::LoadMatch(System.String,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::LoadMatch(System.String,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::ParticipantQuitInTurn(GameKit.GKTurnBasedMatchOutcome,GameKit.GKTurnBasedParticipant[],System.Double,Foundation.NSData,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::ParticipantQuitOutOfTurn(GameKit.GKTurnBasedMatchOutcome,System.Action`1)' is missing a '?' on parameter 'onCompletion' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::Rematch(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::Rematch(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::Remove(System.Action`1)' is missing a '?' on parameter 'onCompletion' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SaveCurrentTurn(Foundation.NSData,System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SaveMergedMatchData(Foundation.NSData,GameKit.GKTurnBasedExchange[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SendExchange(GameKit.GKTurnBasedParticipant[],Foundation.NSData,System.String,Foundation.NSObject[],System.Double,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SendExchange(GameKit.GKTurnBasedParticipant[],Foundation.NSData,System.String,Foundation.NSObject[],System.Double,System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SendReminder(GameKit.GKTurnBasedParticipant[],System.String,Foundation.NSObject[],System.Action`1)' is missing a '?' on parameter 'completionHandler' block parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore index 0bc05657aca7..4a773bd74ca2 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore @@ -1,14 +1,3 @@ -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::DeleteSavedGames(System.String,System.Action`1)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore index edbba7968455..ef0dee65958b 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore @@ -5,15 +5,4 @@ # We have bound GKVoiceChatServiceError as GKVoiceChatServiceError which has no support for macOS # https://developer.apple.com/documentation/gamekit/gkvoicechatserviceerror?language=objc -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::DeleteSavedGames(System.String,System.Action`1)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::FetchSavedGames(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::ResolveConflictingSavedGames(GameKit.GKSavedGame[],Foundation.NSData,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::SaveGameData(Foundation.NSData,System.String,System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKSavedGame::LoadData(System.Action`2)' is missing a '?' on parameter 'handler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #1 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore index 78f967213c53..f9db37ea4b2e 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore @@ -1,5 +1,3 @@ -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLocalPlayer::set_AuthenticateHandler(System.Action`2)' is missing a '?' on parameter 'value' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 !missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 !missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 From 18e440de466988460224dae2fbf69be18cf32cbf Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 16:02:57 +0200 Subject: [PATCH 09/11] [GameKit] Fix remaining nullable delegate callbacks Mark the image, photo, and challenge-definition results nullable in the named GameKit completion delegates, matching the native SDK headers. Remove the resolved xtro suppressions and delete the platform ignore files that are now empty. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/gamekit.cs | 6 +++--- .../api-annotations-dotnet/MacCatalyst-GameKit.ignore | 9 --------- .../api-annotations-dotnet/iOS-GameKit.ignore | 9 --------- .../api-annotations-dotnet/macOS-GameKit.ignore | 1 - .../api-annotations-dotnet/tvOS-GameKit.ignore | 5 ----- 5 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore diff --git a/src/gamekit.cs b/src/gamekit.cs index f60ab468c448..977f1d4126ac 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -101,12 +101,12 @@ namespace GameKit { /// To be added. /// A delegate passed to that defines behavior after the image has been loaded. /// To be added. - delegate void GKImageLoadedHandler (UIImage image, NSError error); + delegate void GKImageLoadedHandler ([NullAllowed] UIImage image, [NullAllowed] NSError error); /// To be added. /// To be added. /// A delegate used with to specify behavior after the photo is loaded. /// To be added. - delegate void GKPlayerPhotoLoaded (UIImage photo, NSError error); + delegate void GKPlayerPhotoLoaded ([NullAllowed] UIImage photo, [NullAllowed] NSError error); /// To be added. /// To be added. /// To be added. @@ -4344,7 +4344,7 @@ public enum GKReleaseState : ulong { delegate void GKChallengeDefinitionLoadImageHandler ([NullAllowed] UIImage image, [NullAllowed] NSError error); [MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)] - delegate void GKChallengeDefinitionLoadDefinitionsHandler (GKChallengeDefinition [] definitions, [NullAllowed] NSError error); + delegate void GKChallengeDefinitionLoadDefinitionsHandler ([NullAllowed] GKChallengeDefinition [] definitions, [NullAllowed] NSError error); [MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)] delegate void GKChallengeDefinitionHasActiveChallengesHandler (bool hasActiveChallenges, [NullAllowed] NSError error); diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore deleted file mode 100644 index 4a773bd74ca2..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-GameKit.ignore +++ /dev/null @@ -1,9 +0,0 @@ -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboardSet::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboardSet::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #1 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore deleted file mode 100644 index 4a773bd74ca2..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-GameKit.ignore +++ /dev/null @@ -1,9 +0,0 @@ -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboard::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboardSet::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKLeaderboardSet::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'completionHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #1 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore index ef0dee65958b..ea84da76034d 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-GameKit.ignore @@ -5,4 +5,3 @@ # We have bound GKVoiceChatServiceError as GKVoiceChatServiceError which has no support for macOS # https://developer.apple.com/documentation/gamekit/gkvoicechatserviceerror?language=objc -!missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore deleted file mode 100644 index f9db37ea4b2e..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-GameKit.ignore +++ /dev/null @@ -1,5 +0,0 @@ -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKAchievementDescription::LoadImage(GameKit.GKImageLoadedHandler)' is missing a '?' on parameter 'imageLoadedHandler' block parameter #1 -!missing-null-allowed! 'System.Void GameKit.GKChallengeDefinition::LoadDefinitions(GameKit.GKChallengeDefinitionLoadDefinitionsHandler)' is missing a '?' on parameter 'completionHandler' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #0 -!missing-null-allowed! 'System.Void GameKit.GKPlayer::LoadPhoto(GameKit.GKPhotoSize,GameKit.GKPlayerPhotoLoaded)' is missing a '?' on parameter 'onCompleted' block parameter #1 From 19e4e9ce516d88450b8e17490515fb6050c13f84 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 1 Oct 2026 17:33:07 +0200 Subject: [PATCH 10/11] [GameKit] Defer the incorrect DeclineInvite callback signature Restore the existing DeclineInvite callback contract and its xtro suppression. Apple's native completion block has a different arity, which requires a separate compatibility-safe binding fix rather than a nullable annotation in this PR. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/gamekit.cs | 2 +- tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gamekit.cs b/src/gamekit.cs index 977f1d4126ac..2ea7079c312e 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -2940,7 +2940,7 @@ interface GKTurnBasedMatch { To be added. """)] - void DeclineInvite ([NullAllowed] Action completionHandler); + void DeclineInvite ([NullAllowed] Action completionHandler); [Export ("matchDataMaximumSize")] nint MatchDataMaximumSize { get; } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore index 5d2ee97ce709..d67dc9823b06 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-GameKit.ignore @@ -1,2 +1,3 @@ ## enum size declared after the enum, e.g. `typedef NSInteger GKInviteeResponse;`, so we miss the metadata !unknown-native-enum! GKInviteeResponse bound +!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::DeclineInvite(System.Action`2)' is missing a '?' on parameter 'completionHandler' block parameter #0 From 658f0211e935b8b40d5ef33f664a6d0cd452a821 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Oct 2026 17:57:37 +0200 Subject: [PATCH 11/11] [GameKit] Update deprecation guidance for nullable callbacks Match the migration signatures for ReportAchievements, ParticipantQuitInTurn, and EndMatchInTurn to the nullable NSError callback annotations. Update every platform-specific deprecation message so callers receive consistent guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- src/gamekit.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gamekit.cs b/src/gamekit.cs index 2ea7079c312e..ba38d1cf4b2c 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -2201,10 +2201,10 @@ interface GKAchievement : NSSecureCoding { To be added. """)] [NoTV] - [Deprecated (PlatformName.iOS, 7, 0, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] + [Deprecated (PlatformName.iOS, 7, 0, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] + [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] void ReportAchievement ([NullAllowed] Action completionHandler); [Export ("showsCompletionBanner", ArgumentSemantic.Assign)] @@ -2877,10 +2877,10 @@ interface GKTurnBasedMatch { void EndTurnWithNextParticipant (GKTurnBasedParticipant nextParticipant, NSData matchData, [NullAllowed] Action noCompletion); [NoTV] - [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] - [Deprecated (PlatformName.MacOSX, 10, 9, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] + [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 9, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] + [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ParticipantQuitInTurn (GKTurnBasedMatchOutcome, GKTurnBasedParticipant[], double, NSData, Action)' instead.")] [Export ("participantQuitInTurnWithOutcome:nextParticipant:matchData:completionHandler:")] [Async (XmlDocs = """ To be added. @@ -3043,11 +3043,11 @@ interface GKTurnBasedMatch { [Export ("setLocalizableMessageWithKey:arguments:")] void SetMessage (string localizableMessage, [NullAllowed] 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.")] - [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] + [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.")] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] + [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action)' instead.")] [Export ("endMatchInTurnWithMatchData:scores:achievements:completionHandler:")] [Async (XmlDocs = """ To be added.