Loads a photo of this player from Game Center.
- iOS 5.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
A constant that determines the size of the photo to load.
A block to be called when the player data is retrieved from Game Center.
The block receives the following parameters:
An image for the player. If an error occurred, this may still be non-
nil. In this case, the image reflects an image cached by Game Kit on the device.
If an error occurred, this error object describes the error. If the operation completed successfully, this is
Listing 1 shows a typical implementation for loading a player’s photo. There is no property that stores the returned photo. You must write your own code to associate player photos with
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.