RLMClientResetMode
Objective-C
enum RLMClientResetMode : NSUInteger {}
Swift
enum RLMClientResetMode : UInt, @unchecked Sendable
Determines file behavior during a client reset.
-
Data written to the Realm after the local copy of the Realm diverged from the backup remote copy will be present in the local recovery copy of the Realm file. The re-downloaded Realm will initially contain only the data present at the time the Realm was backed up on the server.
- - see: `rlmSync_clientResetBackedUpRealmPath` or `SyncError.clientResetInfo()` for more information on accessing the recovery directory.
Declaration
Objective-C
RLMClientResetModeManual
Swift
case manual = 0
-
All unsynchronized local changes are automatically discarded and the local state is automatically reverted to the most recent state from the server. Unsynchronized changes can then be recovered in the post-client-reset callback block.
If RLMClientResetModeDiscardLocal is enabled but the client reset operation is unable to complete then the client reset process reverts to manual mode. Example) During a destructive schema change this mode will fail and invoke the manual client reset handler.
Declaration
Objective-C
RLMClientResetModeDiscardLocal
Swift
case discardLocal = 1