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 openRealm
s and retrieveSyncSession
s.Declaration
Swift
public static func logIn(with credentials: SyncCredentials, server authServerURL: URL, timeout: TimeInterval = 30, onCompletion completion: @escaping UserCompletionBlock)
-
The logged-in user.
nil
if none exists. Only use this property if your application expects no more than one logged-in user at any given time.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
-
Returns an instance of the Permission Realm owned by the user.
This read-only Realm contains
SyncPermission
objects reflecting the synchronized Realms and permission details this user has access to.Declaration
Swift
public func permissionRealm() throws -> Realm