可能的应用排斥在iOS版同步压缩SQLite数据库 [英] Possible app rejection by syncing zipped sqlite database in iOS

查看:160
本文介绍了可能的应用排斥在iOS版同步压缩SQLite数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SQLite数据库,我使用iCloud需要备份。我知道,苹果建议不同步整个数据库,它可能拒绝该应用。可能的解决方法包括: -

I have a SQLite DB that I need to backup using iCloud. I am aware that Apple recommends not to sync the whole DB and it may reject the App. Possible workarounds includes -

1)的切换到核心数据
   - 它的太晚了此选项,并给出了核心日期的学习曲线,我不希望延长时限

1) Switch to Core Data - Its too late for this option and given the learning curve for core date, I do not wish to extend the timelines.

2)的维护日志文件,SQLite和同步日志文件
   - 这个选项是比较有效的,我会努力它作为一个故障安全

2) Maintain log files for SQLite and Sync the log file - This option is more valid and I would be working on it as a fail-safe

3)邮编使用ZipArchive和同步zip文件的DB - 这将是最容易实现的,但我不知道苹果是否会拒绝还是接受。压缩前大小为300KB,并压缩后苏醒过来40KB。

3) Zip the DB using ZipArchive and Sync the zip file - This will be the easiest to implement but I am not sure whether Apple will reject or accept this. The Size before zip was 300kb and after zip it came around 40kb.

有任何人试图压缩方法,并succesffully提交了应用AppStore的?

Has anyone else tried the zip approach and succesffully submitted their app to appstore?

任何其他的建议将是真正有用的。

Any other suggestions would be really helpful.

感谢

推荐答案

那么,严格的链接在谈论的同步的一个SQLite在iCloud上的数据库。你说你想要的备份的。如果你并不需要不同的设备有编辑同一个数据库文件的能力,你可能是好的。

Well, strictly that link is talking about syncing a sqlite database on iCloud. You say you're wanting to backup. IF you don't need different devices to have the ability to edit the same database file you might be ok.

不过,如果你需要不同的设备有到相同的数据库文件(同步)的编辑权限,那么它是不可能通过上载实际的数据库文件中使用SQLite这样做对iCloud的 - 你会最终有一个损坏的数据库。

However, if you need different devices to have edit access to the 'same' database file (syncing), then it's not possible to use sqlite to do this on iCloud by uploading the actual database file - you will end up with a corrupt database.

您必须实现自己的事务日志记录系统 - 在这里你不断分割数据库每个设备上,和你的日志文件被用来保持他们都在相互同步。这实际上是苹果公司确实为他们的核心数据同步解决方案 - 在设备上只存在数据库,而不是在iCloud中 - 只有事务日志文件上载到到iCloud。

You would have to implement your own transaction logging system - where you keep separate databases on each device, and your log files are used to keep them all in sync with each other. This is actually what Apple does for their Core Data syncing solution - the databases only exist on the devices, not in iCloud - only the transaction log files get uploaded to iCloud.

有谁知道,如果有人发明了一种解决方案,已经做到这一点?它不应该是在可能的领域外...

Does anyone know if someone has invented a solution to do this already? It shouldn't be outside the realms of possibility...

其实,这么多的答案pretty我刚刚做同样的事情...

Actually, this answers pretty much the same thing I've just done...

这篇关于可能的应用排斥在iOS版同步压缩SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆