Reports the player’s progress to Game Center.
- iOS 4.1–7.0Deprecated
- macOS 10.8–10.10Deprecated
- watchOS 2.0–2.0Deprecated
A block to be called after the operation completes.
The block takes the following parameter:
If the operation was successful, this value is
nil; otherwise, this parameter holds an object that describes the problem that occurred.
When the player makes progress towards completing an achievement, your game communicates the player’s progress to Game Center by calling this method. An achievement object is implicitly tied to the local player that was authenticated when the object was created; your game should only report progress when the same local player is still authenticated on the device.
When the progress is successfully reported, the achievement is made visible if it was previously hidden. The
last property values stored on Game Center are updated if the new
percent value is greater than the value previously stored on Game Center. if the value of the
percent property was equal to
100, then the achievement is marked as completed and a banner may be shown to the player.
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. The background task automatically handles network errors, resending the data until the task completes. When the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.