I am trying to build an iOS swift application that uses SQLITE and syncs it to my PHP backend server .
I can build API that reads and write data from server . I can read and write data with swift from server making HTTP requests .
What I am trying to accomplish here is : saving data to local database and sync it to the server database , the local database is user specific and the server database contains all users data .
Local DB
--------------------------
| maint item | due date |
| abc | 29-3-2018
| DNA | 24-1-2017
| boy | 17-2-2017
--------------------------
Server DB
---------------------------
| Maine item | due date | user
| abc | 29-3-2018| Jane
| DNA | 24-1-2017| Jane
| boy | 17-2-2017| Jane
| amc | 22-7-2017| cameleon
How can I achieve that in swift and if possible please post example project .