Can you lose local data if a device stays offline for too long?


#1

In this context:

  • Using a full-sync realm
  • iOS swift app
  • A device stays offline for a long time and the app is forced to close in the backgroud by iOS
  • Within the time range of the historyTtl set on ROS

Is there a risk to loose unsynced data that was created while offline?
Or the data will persist locally on the iOS device even if the app is forced to close?
And then the data will sync back to ROS when online?

Thanks,


#2

Is the Realm shared between multiple users/devices or is it generally one Realm per user/device?


#3

The realm is shared between multiple devices and for one user. We also expect to share this realm between multiple user at a later time.


#4

Okay, then there’s a risk of losing data if the app has been offline for longer than the historyTtl. If it has been offline for less than that, then there’s no chance for data loss, unless the server is restored from a backup.

We have a feature in the works that will resolve that problem for devices that stay offline for longer than the historyTtl.