Syncing Data Between Offline Mobile Apps
Posted by ThreadHunter on April 15, 2026, 2:38 pm
|
I'm developing a mobile app that needs to work offline. Users can create notes and tasks while they are in the subway, and then the app syncs everything to the server when they get back online. My current problem is that if I use IDs like 1, 2, 3 on the phone, and someone else uses 1, 2, 3 on another phone, the server just overwrites the data during the sync. It's a total mess! How do you guys handle primary keys in "offline-first" apps where the server isn't there to tell the phone what the next ID should be?
|

