RLMSyncSession
@interface RLMSyncSession : NSObject
An object encapsulating a Realm Object Server session
. Sessions represent the communication between the client (and a
local Realm file on disk), and the server (and a remote Realm at a given URL stored on a Realm Object Server).
Sessions are always created by the SDK and vended out through various APIs. The lifespans of sessions associated with Realms are managed automatically.
-
The session’s current state.
Declaration
Objective-C
@property (readonly, nonatomic) RLMSyncSessionState state;
Swift
var state: RLMSyncSessionState { get }
-
The Realm Object Server URL of the remote Realm this session corresponds to.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSURL *realmURL;
Swift
var realmURL: URL? { get }
-
The user that owns this session.
Declaration
Objective-C
- (nullable RLMSyncUser *)parentUser;
Swift
func parentUser() -> RLMSyncUser?
-
If the session is valid, return a sync configuration that can be used to open the Realm associated with this session.
Declaration
Objective-C
- (nullable RLMSyncConfiguration *)configuration;
Swift
func configuration() -> RLMSyncConfiguration?