2013-12-17 37 views
0

我正在做一個應用程序,在sqlite中保存數據。現在根據最新的要求,我想在我登錄的其他設備上獲取相同的數據。那麼我應該採取什麼樣的方式來保持所有設備的數據通用。應用程序處於離線狀態,我們只能將互聯網用於同步目的。如何在iOS應用中將服務器與sqlite數據進行同步?

I have done some part as : 
1. Make same database on PHP server. 
2. Save local data with flag isSynch=No. 
3. After saving it, when I connect to internet I make txt file of each table by fetching rows with isSynch=NO and on server side all these data gets dumped to database. 
4. After successful insertion of data on server, it makes txt files of all tables with flag isSynch=YES. 
5. Now all files get downloaded to local device and inserted to each table. 

我可以使用iCloud嗎?或者告訴我任何其他解決方案。

回答

相關問題