App

extension App
  • Login to a user for the Realm app.

    @param credentials The credentials identifying the user. @param completion A callback invoked after completion.

    Declaration

    Swift

    public func login(credentials: Credentials, completion: @escaping RLMUserCompletionBlock)
  • Sets the ASAuthorizationControllerDelegate to be handled by App

    Usage:

    let app = App(id: "my-app-id")
    let appleIDProvider = ASAuthorizationAppleIDProvider()
    let request = appleIDProvider.createRequest()
    request.requestedScopes = [.fullName, .email]
    
    let authorizationController = ASAuthorizationController(authorizationRequests: [request])
    app.setASAuthorizationControllerDelegate(controller: authorizationController)
    authorizationController.presentationContextProvider = self
    authorizationController.performRequests()
    

    Declaration

    Swift

    public func setASAuthorizationControllerDelegate(for controller: ASAuthorizationController)

    Parameters

    controller

    The ASAuthorizationController in which you want App to consume its delegate.

  • Login to a user for the Realm app. @param credentials The credentials identifying the user. @returns A publisher that eventually return User or Error.

    Declaration

    Swift

    func login(credentials: Credentials) -> Future<User, Error>