如果我的核心数据存储区为只读,我可以将其保留在捆绑软件中吗? [英] Can I keep my Core data store on the Bundle if its readonly

查看:53
本文介绍了如果我的核心数据存储区为只读,我可以将其保留在捆绑软件中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用核心数据存储区的通常方法是在首次启动时将其复制到documents目录中.

The usual way to use a core data store is to copy it into the documents directory on first launch.

但是,随着iOS 5的出现,

However, with the advent of iOS 5, users can choose to have the documents directory synced, wich has caused some problems. Basically, the documents directory should not have too much data in.

现在,我拥有一个无需更改的大型核心数据存储.所以我的问题是,如果不调用save方法,是否可以让我从捆绑商店中打开商店?

Now I have a large core data store that does not need to be changed. So my question is, will it let me open the store from the bundle if I dont call the save method?

推荐答案

是的,您可以将只读的Core Data存储放入捆绑包中,然后就可以访问它们了.只要您不必更改商店,就可以.如果您的数据需要更改,则必须更新二进制文件.

Yes, you can put read-only Core Data stores in the bundle and access them just fine. As long as you never have to change the store, you're OK. If your data ever needs to change, you'll have to update the binary.

这篇关于如果我的核心数据存储区为只读,我可以将其保留在捆绑软件中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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