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) NSURL *_Nonnull realmURL;
Swift
var realmURL: URL { get }
-
A reference to the user object owning the Realm this session corresponds to. If the session object is invalid, this property may automatically be set to
nil
.Declaration
Objective-C
@property (readonly, nonatomic, nullable) RLMSyncUser *parentUser;
Swift
weak var parentUser: RLMSyncUser? { get }
-
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?