ParseApple

public struct ParseApple<AuthenticatedUser> : ParseAuthentication where AuthenticatedUser : ParseUser

Provides utility functions for working with Apple User Authentication and ParseUser‘s. Be sure your Parse Server is configured for sign in with Apple. For information on acquiring Apple sign-in credentials to use with ParseApple, refer to Apple’s Documentation.

  • Declaration

    Swift

    public static var __type: String { get }
  • Declaration

    Swift

    public init()

Async/Await

  • Login a ParseUser asynchronously using Apple authentication.

    Throws

    An error of type ParseError.

    Declaration

    Swift

    func login(user: String,
               identityToken: Data,
               options: API.Options = []) async throws -> AuthenticatedUser

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    An instance of the logged in ParseUser.

  • Login a ParseUser asynchronously using Apple authentication.

    Throws

    An error of type ParseError.

    Declaration

    Swift

    func login(authData: [String: String],
               options: API.Options = []) async throws -> AuthenticatedUser

    Parameters

    authData

    Dictionary containing key/values.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    An instance of the logged in ParseUser.

  • Link the current ParseUser asynchronously using Apple authentication.

    Throws

    An error of type ParseError.

    Declaration

    Swift

    func link(user: String,
              identityToken: Data,
              options: API.Options = []) async throws -> AuthenticatedUser

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    An instance of the logged in ParseUser.

  • Link the current ParseUser asynchronously using Apple authentication.

    Throws

    An error of type ParseError.

    Declaration

    Swift

    func link(authData: [String: String],
              options: API.Options = []) async throws -> AuthenticatedUser

    Parameters

    authData

    Dictionary containing key/values.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    An instance of the logged in ParseUser.

Combine

  • Login a ParseUser asynchronously using Apple authentication. Publishes when complete.

    Declaration

    Swift

    func loginPublisher(user: String,
                        identityToken: Data,
                        options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • Login a ParseUser asynchronously using Apple authentication. Publishes when complete.

    Declaration

    Swift

    func loginPublisher(authData: [String: String],
                        options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    authData

    Dictionary containing key/values.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • Link the current ParseUser asynchronously using Apple authentication. Publishes when complete.

    Declaration

    Swift

    func linkPublisher(user: String,
                       identityToken: Data,
                       options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • Link the current ParseUser asynchronously using Apple authentication. Publishes when complete.

    Declaration

    Swift

    func linkPublisher(authData: [String: String],
                       options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    authData

    Dictionary containing key/values.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

Login

  • Login a ParseUser asynchronously using Apple authentication.

    Declaration

    Swift

    func login(user: String,
               identityToken: Data,
               options: API.Options = [],
               callbackQueue: DispatchQueue = .main,
               completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    The block to execute.

  • Declaration

    Swift

    func login(authData: [String: String],
               options: API.Options = [],
               callbackQueue: DispatchQueue = .main,
               completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)

Link

  • Link the current ParseUser asynchronously using Apple authentication.

    Declaration

    Swift

    func link(user: String,
              identityToken: Data,
              options: API.Options = [],
              callbackQueue: DispatchQueue = .main,
              completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)

    Parameters

    user

    The user from ASAuthorizationAppleIDCredential.

    identityToken

    The identityToken from ASAuthorizationAppleIDCredential.

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    The block to execute.

  • Declaration

    Swift

    func link(authData: [String: String],
              options: API.Options = [],
              callbackQueue: DispatchQueue = .main,
              completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)