How can I access the GameCenter player's photo URL? I know about loadPhotoForSize
but it seems to return UIImage
. I need the URL as I would like to send this URL to my backend and show this photo for users from non-iOS devices.
Asked
Active
Viewed 695 times
0
-
1There is no URL property mentioned in the GKPlayer [reference](https://developer.apple.com/library/prerelease/ios/documentation/GameKit/Reference/GKPlayer_Ref/index.html#//apple_ref/occ/instm/GKPlayer/loadPhotoForSize:withCompletionHandler:). In fact, they even mention that *"You must write your own code to associate player photos with GKPlayer objects."* – Eric Aya Feb 12 '16 at 13:06
-
If there was a URL in GKPlayer I would not have asked this question. It seems that Apple does not want to give the URL of photos at all. The phrase you have cited is referenced to the ```UIImage```. – Seagull Feb 12 '16 at 16:19
1 Answers
2
There is no available GameCenter player's photo URL. It may exist right now, but Apple can change it any moment. And it is not in open access.
Correct way to show player's photo on another non-iOS platforms is to upload this photo to your game servers. Use loadPhotoForSize to obtain UIImage and than upload it to your server. For example you can use answers from here: ios Upload Image and Text using HTTP POST

Community
- 1
- 1

Alexander Ushakov
- 5,139
- 3
- 27
- 50