Search code examples
swiftrealmrealm-object-server

Check if object has been synced to the Realm Object Server


Is there a way to check if the new object/edited object has been synced yet? I need to put an indicator that shows if the edited object has been successfully synced or is still only saved locally. I'm using Realm Object Server v1.0.


Solution

  • This information isn't available at an object level granularity due to the way that synchronization works. Synchronization processes transactions at a time. You can use SyncSession.addProgressNotification(for:mode:block:) with the forCurrentlyOutstandingWork progress mode to be notified when the changes made in a given write transaction have been uploaded.