SyncUser

public typealias SyncUser = RLMSyncUser
  • Given credentials and a server URL, log in a user and asynchronously return a SyncUser object which can be used to open Realms and Sessions.

    Declaration

    Swift

    public static func logIn(with credentials: SyncCredentials,
                                 server authServerURL: URL,
                                 timeout: TimeInterval = 30,
                                 onCompletion completion: @escaping UserCompletionBlock)
  • all

    A dictionary of all valid, logged-in user identities corresponding to their SyncUser objects.

    Declaration

    Swift

    public static var all: [String: SyncUser]
  • The logged-in user. nil if none exists.

    Warning

    Throws an Objective-C exception if more than one logged-in user exists.

    Declaration

    Swift

    public static var current: SyncUser?
  • Returns an instance of the Management Realm owned by the user.

    This Realm can be used to control access permissions for Realms managed by the user. This includes granting other users access to Realms.

    Declaration

    Swift

    public func managementRealm() throws -> Realm