[gamekit] Add nullability to (generated and manual) bindings (#10800)
See [HOWTO](https://github.com/xamarin/xamarin-macios/wiki/Nullability)
This commit is contained in:
Родитель
bccef33d3f
Коммит
a4d4195baf
|
@ -309,6 +309,7 @@ namespace GameKit {
|
|||
string Category { get; set; }
|
||||
|
||||
[Export ("title", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string Title { get; }
|
||||
|
||||
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")]
|
||||
|
@ -323,6 +324,7 @@ namespace GameKit {
|
|||
[Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")]
|
||||
[Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")]
|
||||
[Export ("scores", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKScore [] Scores { get; }
|
||||
|
||||
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")]
|
||||
|
@ -330,6 +332,7 @@ namespace GameKit {
|
|||
[Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")]
|
||||
[Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")]
|
||||
[Export ("localPlayerScore", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKScore LocalPlayerScore { get; }
|
||||
|
||||
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")]
|
||||
|
@ -657,6 +660,7 @@ namespace GameKit {
|
|||
long Value { get; set; }
|
||||
|
||||
[Export ("formattedValue", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string FormattedValue { get; }
|
||||
|
||||
[NoWatch]
|
||||
|
@ -1582,15 +1586,19 @@ namespace GameKit {
|
|||
[Watch (3,0)]
|
||||
interface GKAchievementDescription : NSSecureCoding {
|
||||
[Export ("identifier", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string Identifier { get; }
|
||||
|
||||
[Export ("title", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string Title { get; }
|
||||
|
||||
[Export ("achievedDescription", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string AchievedDescription { get; }
|
||||
|
||||
[Export ("unachievedDescription", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
string UnachievedDescription { get; }
|
||||
|
||||
[Export ("maximumPoints", ArgumentSemantic.Assign)]
|
||||
|
@ -1610,6 +1618,7 @@ namespace GameKit {
|
|||
void LoadImage ([NullAllowed] GKImageLoadedHandler imageLoadedHandler);
|
||||
|
||||
[Export ("groupIdentifier", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
string GroupIdentifier { get; }
|
||||
|
||||
[Export ("replayable", ArgumentSemantic.Assign)]
|
||||
|
@ -1777,6 +1786,7 @@ namespace GameKit {
|
|||
interface GKTurnBasedParticipant {
|
||||
[iOS (8,0)][Mac (10,10)]
|
||||
[Export ("player", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKPlayer Player { get; }
|
||||
|
||||
[NoTV]
|
||||
|
@ -1787,6 +1797,7 @@ namespace GameKit {
|
|||
string PlayerID { get; }
|
||||
|
||||
[Export ("lastTurnDate", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
NSDate LastTurnDate { get; }
|
||||
|
||||
[Export ("status")]
|
||||
|
@ -1796,6 +1807,7 @@ namespace GameKit {
|
|||
GKTurnBasedMatchOutcome MatchOutcome { get; set; }
|
||||
|
||||
[Export ("timeoutDate", ArgumentSemantic.Copy)]
|
||||
[NullAllowed]
|
||||
NSDate TimeoutDate { get; }
|
||||
}
|
||||
|
||||
|
@ -1860,21 +1872,26 @@ namespace GameKit {
|
|||
[BaseType (typeof (NSObject))]
|
||||
interface GKTurnBasedMatch {
|
||||
[Export ("matchID")]
|
||||
[NullAllowed]
|
||||
string MatchID { get; }
|
||||
|
||||
[Export ("creationDate")]
|
||||
[NullAllowed]
|
||||
NSDate CreationDate { get; }
|
||||
|
||||
[Export ("participants", ArgumentSemantic.Retain)]
|
||||
GKTurnBasedParticipant []Participants { get; }
|
||||
[NullAllowed]
|
||||
GKTurnBasedParticipant [] Participants { get; }
|
||||
|
||||
[Export ("status")]
|
||||
GKTurnBasedMatchStatus Status { get; }
|
||||
|
||||
[Export ("currentParticipant", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKTurnBasedParticipant CurrentParticipant { get; }
|
||||
|
||||
[Export ("matchData", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
NSData MatchData { get; }
|
||||
|
||||
[NullAllowed] // by default this property is null
|
||||
|
@ -1893,7 +1910,7 @@ namespace GameKit {
|
|||
|
||||
[Export ("removeWithCompletionHandler:")]
|
||||
[Async]
|
||||
void Remove (Action<NSError> onCompletion);
|
||||
void Remove ([NullAllowed] Action<NSError> onCompletion);
|
||||
|
||||
[Export ("loadMatchDataWithCompletionHandler:")]
|
||||
[Async]
|
||||
|
@ -1966,14 +1983,17 @@ namespace GameKit {
|
|||
|
||||
[iOS (7,0)][Mac (10,10)]
|
||||
[Export ("exchanges", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKTurnBasedExchange [] Exchanges { get; }
|
||||
|
||||
[iOS (7,0)][Mac (10,10)]
|
||||
[Export ("activeExchanges", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKTurnBasedExchange [] ActiveExchanges { get; }
|
||||
|
||||
[iOS (7,0)][Mac (10,10)]
|
||||
[Export ("completedExchanges", ArgumentSemantic.Retain)]
|
||||
[NullAllowed]
|
||||
GKTurnBasedExchange [] CompletedExchanges { get; }
|
||||
|
||||
[iOS (7,0)][Mac (10,10)]
|
||||
|
@ -1986,7 +2006,7 @@ namespace GameKit {
|
|||
|
||||
[iOS (7,0)][Mac (10,10)]
|
||||
[Export ("setLocalizableMessageWithKey:arguments:")]
|
||||
void SetMessage (string localizableMessage, params NSObject [] arguments);
|
||||
void SetMessage (string localizableMessage, [NullAllowed] params NSObject [] arguments);
|
||||
|
||||
[Deprecated (PlatformName.iOS, 14, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action<NSError>)' instead.")]
|
||||
[Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'EndMatchInTurn (NSData, GKLeaderboardScore[], NSObject[], Action<NSError>)' instead.")]
|
||||
|
@ -2294,33 +2314,42 @@ namespace GameKit {
|
|||
interface GKTurnBasedExchange
|
||||
{
|
||||
[Export ("exchangeID")]
|
||||
[NullAllowed]
|
||||
string ExchangeID { get; }
|
||||
|
||||
[Export ("sender")]
|
||||
[NullAllowed]
|
||||
GKTurnBasedParticipant Sender { get; }
|
||||
|
||||
[Export ("recipients")]
|
||||
[NullAllowed]
|
||||
GKTurnBasedParticipant [] Recipients { get; }
|
||||
|
||||
[Export ("status", ArgumentSemantic.Assign)]
|
||||
GKTurnBasedExchangeStatus Status { get; }
|
||||
|
||||
[Export ("message")]
|
||||
[NullAllowed]
|
||||
string Message { get; }
|
||||
|
||||
[Export ("data")]
|
||||
[NullAllowed]
|
||||
NSData Data { get; }
|
||||
|
||||
[Export ("sendDate")]
|
||||
[NullAllowed]
|
||||
NSDate SendDate { get; }
|
||||
|
||||
[Export ("timeoutDate")]
|
||||
[NullAllowed]
|
||||
NSDate TimeoutDate { get; }
|
||||
|
||||
[Export ("completionDate")]
|
||||
[NullAllowed]
|
||||
NSDate CompletionDate { get; }
|
||||
|
||||
[Export ("replies")]
|
||||
[NullAllowed]
|
||||
GKTurnBasedExchangeReply [] Replies { get; }
|
||||
|
||||
[Export ("cancelWithLocalizableMessageKey:arguments:completionHandler:")]
|
||||
|
@ -2344,16 +2373,20 @@ namespace GameKit {
|
|||
interface GKTurnBasedExchangeReply
|
||||
{
|
||||
[Export ("recipient")]
|
||||
[NullAllowed]
|
||||
GKTurnBasedParticipant Recipient { get; }
|
||||
|
||||
[Export ("message")]
|
||||
[NullAllowed]
|
||||
string Message { get; }
|
||||
|
||||
[Export ("data")]
|
||||
[NullAllowed]
|
||||
NSData Data { get; }
|
||||
|
||||
[iOS (8,0)]
|
||||
[Export ("replyDate")]
|
||||
[NullAllowed]
|
||||
NSDate ReplyDate { get; }
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
!extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0
|
||||
!incorrect-protocol-member! GKMatchmakerViewControllerDelegate::matchmakerViewController:didFindPlayers: is OPTIONAL and should NOT be abstract
|
||||
!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:didFindMatch: is OPTIONAL and should NOT be abstract
|
||||
!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:playerQuitForMatch: is OPTIONAL and should NOT be abstract
|
||||
|
|
|
@ -18,49 +18,12 @@
|
|||
!missing-selector! GKLeaderboardEntry::rank not bound
|
||||
!missing-selector! GKLeaderboardEntry::score not bound
|
||||
|
||||
## properties are null by default (not changing their behaviour to remain compatible)
|
||||
!extra-null-allowed! 'System.Void GameKit.GKScore::set_LeaderboardIdentifier(System.String)' has a extraneous [NullAllowed] on parameter #0
|
||||
!extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0
|
||||
|
||||
## unsorted
|
||||
|
||||
!incorrect-protocol-member! GKMatchmakerViewControllerDelegate::matchmakerViewController:didFindHostedPlayers: is OPTIONAL and should NOT be abstract
|
||||
!incorrect-protocol-member! GKMatchmakerViewControllerDelegate::matchmakerViewController:didFindMatch: is OPTIONAL and should NOT be abstract
|
||||
!missing-selector! GKVoiceChat::playerVoiceChatStateDidChangeHandler not bound
|
||||
|
||||
# Initial result from new rule extra-null-allowed
|
||||
!extra-null-allowed! 'System.Void GameKit.GKScore::set_LeaderboardIdentifier(System.String)' has a extraneous [NullAllowed] on parameter #0
|
||||
|
||||
# Initial result from new rule missing-null-allowed
|
||||
!missing-null-allowed! 'Foundation.NSData GameKit.GKTurnBasedExchange::get_Data()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSData GameKit.GKTurnBasedExchangeReply::get_Data()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSData GameKit.GKTurnBasedMatch::get_MatchData()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedExchange::get_CompletionDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedExchange::get_SendDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedExchange::get_TimeoutDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedExchangeReply::get_ReplyDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedMatch::get_CreationDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedParticipant::get_LastTurnDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'Foundation.NSDate GameKit.GKTurnBasedParticipant::get_TimeoutDate()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKPlayer GameKit.GKTurnBasedParticipant::get_Player()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKScore GameKit.GKLeaderboard::get_LocalPlayerScore()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKScore[] GameKit.GKLeaderboard::get_Scores()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedExchange[] GameKit.GKTurnBasedMatch::get_ActiveExchanges()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedExchange[] GameKit.GKTurnBasedMatch::get_CompletedExchanges()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedExchange[] GameKit.GKTurnBasedMatch::get_Exchanges()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedExchangeReply[] GameKit.GKTurnBasedExchange::get_Replies()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedParticipant GameKit.GKTurnBasedExchange::get_Sender()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedParticipant GameKit.GKTurnBasedExchangeReply::get_Recipient()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedParticipant GameKit.GKTurnBasedMatch::get_CurrentParticipant()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedParticipant[] GameKit.GKTurnBasedExchange::get_Recipients()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'GameKit.GKTurnBasedParticipant[] GameKit.GKTurnBasedMatch::get_Participants()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKAchievementDescription::get_AchievedDescription()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKAchievementDescription::get_GroupIdentifier()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKAchievementDescription::get_Identifier()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKAchievementDescription::get_Title()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKAchievementDescription::get_UnachievedDescription()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKLeaderboard::get_Title()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKScore::get_FormattedValue()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKTurnBasedExchange::get_ExchangeID()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKTurnBasedExchange::get_Message()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKTurnBasedExchangeReply::get_Message()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.String GameKit.GKTurnBasedMatch::get_MatchID()' is missing an [NullAllowed] on return type
|
||||
!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::Remove(System.Action`1<Foundation.NSError>)' is missing an [NullAllowed] on parameter #0
|
||||
!missing-null-allowed! 'System.Void GameKit.GKTurnBasedMatch::SetMessage(System.String,Foundation.NSObject[])' is missing an [NullAllowed] on parameter #1
|
||||
|
|
|
@ -4,8 +4,5 @@
|
|||
!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:didFindMatch: is OPTIONAL and should NOT be abstract
|
||||
!incorrect-protocol-member! GKTurnBasedMatchmakerViewControllerDelegate::turnBasedMatchmakerViewController:playerQuitForMatch: is OPTIONAL and should NOT be abstract
|
||||
|
||||
## property is null by default
|
||||
!extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0
|
||||
|
||||
# API removed by Apple, marked as deprecated
|
||||
!unknown-native-enum! GKAuthenticationType bound
|
||||
|
|
|
@ -19,8 +19,5 @@
|
|||
# This selector does not exist in macOS, confirmed by intro.
|
||||
!missing-selector! GKLeaderboardSet::loadImageWithCompletionHandler: not bound
|
||||
|
||||
## property is null by default
|
||||
!extra-null-allowed! 'System.Void GameKit.GKVoiceChat::set_PlayerStateUpdateHandler(GameKit.GKPlayerStateUpdateHandler)' has a extraneous [NullAllowed] on parameter #0
|
||||
|
||||
# API removed by Apple, marked as deprecated
|
||||
!unknown-native-enum! GKAuthenticationType bound
|
||||
|
|
Загрузка…
Ссылка в новой задаче