Contents

loadFriendsObsoleted(completionHandler:)

Retrieves a list of player identifiers for the local player’s friends.

Declaration

func loadFriendsObsoleted(completionHandler: (@Sendable ([String]?, (any Error)?) -> Void)? = nil)
func loadFriendsObsoleted() async throws -> [String]

Parameters

  • completionHandler:

    A block to call when the request completes.

    The block receives the following parameters:

    friendIDs

    An array of NSString objects containing the player identifiers for the players who are friends of the local player. If an error occurs, this value can be non-nil. In that case, the array contains the data that GameKit downloads before the error occurs.

    error

    If an error occurs, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil.

Discussion

After this call completes, the friends property of the shared local player object is the same list of players that the completion handler returns.

See Also

Related Documentation

Deprecated methods