GameKit loadPlayers function deprecated

Hello,

I am trying to load a player avatar for a given ID. On the GKPlayer documentation page, it is recommended to use the loadPlayers(forIdentifiers:withCompletionHandler:) method to retrieve GKPlayer objects which can then be used in the loadPhoto(for:withCompletionHandler:) method.

However, the documentation for loadPlayers states, that this function is deprecated since iOS 14.5.

XCode suggests to use the GKLocalPlayer.loadFriends method (documentation). Anyway, this is not a replacement for loadPlayers since loadFriends, as the name suggests, only loads players from the friends list instead of a global list.

It is weird that the GKPlayer docs suggest the use of loadPlayers which is deprecated. Is there a workaround to this?

Best regards

GameKit loadPlayers function deprecated
 
 
Q