The hard part of offline sync is not storing data locally — it is deciding what happens when the same…