开发者

Need to Sync iPhone App between iPhone/iPad/iPod Touch etc. How? Cloud? Zsync? Dropbox?

I have received requests for my iPhone app, to be able to sync it between a person's iPhone and iPad, or between two iPhones in the same family, etc. I have been searching online now for some time, and this still is not clear to me. I am a pretty new developer, and I know enough to have gotten an app released, but I am not a professional programmer.

I know that DropBox and SugarSync use "the cloud", but I have not used them as yet and I am not sure how I would implement them for my Core Data database. I also watched a video for Marcus Zarra's ZSync, which looks awesome, but I do not have a desktop application yet, and I'm not sure that that is the solution for me.

I downloaded the DropBox api and sample app and am starting to play with it, but I don't want to waste too much开发者_运维技巧 time if I am heading down a rabbit trail. I would love if the iOS offered some sort of a sync option but I looked and I'm pretty sure it doesn't.

This seems like pretty complicated stuff. I would love if someone could point me in the right direction. Maybe even a tutorial if there is one. Just to keep Core Data database synced between multiple (maybe even more than 2) iDevices. Any help would be greatly appreciated.


It seems that, as expected, there is no readily available sync option without writing your own algorithm. Even then, it seems to be hit and miss at best as you add users and devices.

I have decided that for me, for now, the best option is DropBox, and using a simple file backup/restore. When you download the DropBox SDK, there is an iPhone App example in there that well demonstrates how to incorporate it into your app.

The issue I am now having has to do with Core Data. Once I overwrite my SQLite file, I am having a difficult time refreshing my data. It works fine if I close and restart the app, but I don't want to have the user do that.

I have tried many solutions from this site, and none of them have worked completely for me yet. I understand that I have to delete and recreate the persistent store, and that I have to delete and recreate my objects, and that I might have to delete and recreate my view controllers in my tab bar. And possibly also my MOC and MOM.

I understand the part about deleting and recreating the persistent store. I can delete my objects, but I am not sure how to re-create them. I think my issue is that I have a tab bar controller and my top level views do not get dealloc-ed. I have found snippets of code here and there but have not been able to piece them together for a solution yet and all I have is one giant mess of commented out code.


Just an update, and an answer to the syncing issue: iCloud seems like it will actually app syncing. I haven't tried it yet, but am planning to implement it. However, since users will only have limited free iCloud storage, and many won't want to pay, I am also implementing Dropbox for Backup/Restore (only). Hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜