需要在 iPhone/iPad/iPod Touch 等之间同步 iPhone 应用程序。如何实现?云?兹同步? Dropbox?

发布于 2024-10-29 03:07:09 字数 500 浏览 2 评论 0原文

我收到了对我的 iPhone 应用程序的请求,希望能够在一个人的 iPhone 和 iPad 之间,或者在同一个家庭的两部 iPhone 之间同步它,等等。我现在已经在网上搜索了一段时间,这仍然不清楚我。我是一个相当新的开发人员,我知道足够的知识来发布应用程序,但我不是专业的程序员。

我知道 DropBox 和 SugarSync 使用“云”,但我还没有使用它们,并且我不确定如何为我的 Core Data 数据库实现它们。我还观看了 Marcus Zarra 的 ZSync 的视频,看起来棒极了,但我还没有桌面应用程序,我不确定这是否适合我。

我下载了 DropBox api 和示例应用程序,并开始使用它,但如果我要沿着兔子小道走,我不想浪费太多时间。如果 iOS 提供某种同步选项,我会很高兴,但我查看了一下,我很确定它没有。

这看起来是相当复杂的事情。如果有人能指出我正确的方向,我会很高兴。如果有的话,甚至可能是一个教程。只是为了保持核心数据数据库在多个(甚至可能超过 2 个)iDevice 之间同步。任何帮助将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晨光如昨 2024-11-05 03:07:09

看来,正如预期的那样,如果不编写自己的算法,就没有现成的同步选项。即便如此,当您添加用户和设备时,它似乎充其量只是碰运气。

我决定对我来说,目前最好的选择是 DropBox,并使用简单的文件备份/恢复。当您下载 DropBox SDK 时,其中有一个 iPhone 应用程序示例,很好地演示了如何将其合并到您的应用程序中。

我现在遇到的问题与核心数据有关。一旦我覆盖 SQLite 文件,我就很难刷新数据。如果我关闭并重新启动应用程序,它就可以正常工作,但我不想让用户这样做。

我已经尝试了该网站上的许多解决方案,但没有一个对我来说完全有效。我知道我必须删除并重新创建持久存储,并且我必须删除并重新创建我的对象,并且我可能必须删除并重新创建选项卡栏中的视图控制器。可能还有我的 MOC 和 MOM。

我了解有关删除和重新创建持久存储的部分。我可以删除我的对象,但我不知道如何重新创建它们。我认为我的问题是我有一个选项卡栏控制器,并且我的顶级视图没有被释放。我到处都找到了代码片段,但还无法将它们拼凑在一起以形成解决方案,我所拥有的只是一大堆注释掉的代码。

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.

灯角 2024-11-05 03:07:09

只是一个更新,以及同步问题的答案:iCloud 似乎实际上会同步应用程序。我还没有尝试过,但正在计划实施。然而,由于用户只有有限的免费 iCloud 存储空间,而且许多人不愿意付费,因此我还实施了 Dropbox 来进行备份/恢复(仅)。希望这有帮助!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文