Contents

loadFriendsAuthorizationStatus(_:)

Returns whether the player authorizes your game to access their friends list.

Declaration

func loadFriendsAuthorizationStatus(_ completionHandler: @escaping  @Sendable (GKFriendsAuthorizationStatus, (any Error)?) -> Void)
func loadFriendsAuthorizationStatus() async throws -> GKFriendsAuthorizationStatus

Parameters

  • completionHandler:

    The block that GameKit calls when it completes the request.

    The block receives the following parameters:

    authorizationStatus

    A status that indicates if the player authorized or denied your game access to their friends list.

    error

    Describes an error if it occurs, or nil if the operation completes.

    An error occurs if you don’t add the Nsgkfriendlistusagedescription key to the information property list file.

Mentioned in

See Also

Accessing Friends and Recents