Edytuj

Udostępnij za pośrednictwem


GKAchievement.ReportAchievements Method

Definition

Overloads

ReportAchievements(GKAchievement[], GKChallenge[], Action<NSError>)

Reports the provided achievements and matching challenges to Game Center and then calls completionHandler with an error object that is null if no error occurred..

ReportAchievements(GKAchievement[], Action<NSError>)

Reports the provided achievements to Game Center and then calls completionHandler with an error object that is null if no error occurred.

ReportAchievements(GKAchievement[], GKChallenge[], Action<NSError>)

Reports the provided achievements and matching challenges to Game Center and then calls completionHandler with an error object that is null if no error occurred..

[Foundation.Export("reportAchievements:withEligibleChallenges:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, GameKit.GKChallenge[] challenges, Action<Foundation.NSError> completionHandler);
static member ReportAchievements : GameKit.GKAchievement[] * GameKit.GKChallenge[] * Action<Foundation.NSError> -> unit

Parameters

achievements
GKAchievement[]

Achievements to report to Game Center.

challenges
GKChallenge[]

The corresponding challenges to the achievements.

This parameter can be null.

completionHandler
Action<NSError>

Method to invoke after the achievements have been posted.

This parameter can be null.

Attributes

Remarks

The completion handler is only invoked once, after all the achivements have been posted to Game Center.

Applies to

ReportAchievements(GKAchievement[], Action<NSError>)

Reports the provided achievements to Game Center and then calls completionHandler with an error object that is null if no error occurred.

[Foundation.Export("reportAchievements:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, Action<Foundation.NSError> completionHandler);
[Foundation.Export("reportAchievements:withCompletionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 8, ObjCRuntime.PlatformArchitecture.All, null)]
public static void ReportAchievements (GameKit.GKAchievement[] achievements, Action<Foundation.NSError> completionHandler);
static member ReportAchievements : GameKit.GKAchievement[] * Action<Foundation.NSError> -> unit

Parameters

achievements
GKAchievement[]
completionHandler
Action<NSError>

To be added.

This parameter can be null.

Attributes

Applies to