GameCenter 获取 GKPlayer 照片 URL

GameCenter get GKPlayer photo URL

如何访问 GameCenter 玩家的照片 URL?我知道 loadPhotoForSize 但似乎 return UIImage。我需要 URL,因为我想将此 URL 发送到我的后端并向来自非 iOS 设备的用户显示此照片。

没有可用的 GameCenter 玩家照片URL。它可能现在就存在,但 Apple 可以随时更改它。而且它不是开放获取的。

在其他非iOS 平台上显示玩家照片的正确方法是将此照片上传到您的游戏服务器。使用 loadPhotoForSize to obtain UIImage and than upload it to your server. For example you can use answers from here: