GKAchievement.ReportAchievements Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReportAchievements(GKAchievement[], GKChallenge[], Action<NSError>) |
Reports the provided achievements and matching challenges to Game Center and then calls |
ReportAchievements(GKAchievement[], Action<NSError>) |
Reports the provided achievements to Game Center and then calls |
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
.
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[]
- Attributes