i want to apologize if this is the wrong place to ask this but i have a problem with setting a game center profile pic, and because of this i can't test the code. i looked in settings/ game center/ profile but there is not a way to set up avatar photo.
the code in question is this:
player.loadPhoto(forSize: .min, withCompletionHandler: {(photo: UIImage?, error: Error?) -> Void in
if !(error != nil) {
let playerImage = UIImageView()
playerImage.image! = photo!
Constants.playerPhoto = playerImage.image!
}
else {
print("Error loading image")
Constants.playerPhoto = UIImage(named: "userPhoto.png")!
}
})
and i'll appreciate if someone take a look and can find some kind of error.
edit: i see i wasn't clear, so the main question is: Is there a way to set up a new game center avatar photo?
It seems that Game Center photos were killed server-side.