您可以更新应用程序捆绑包中的文件吗? [英] Can you update a file in the application bundle?

查看:35
本文介绍了您可以更新应用程序捆绑包中的文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过编程方式更新存储在应用程序捆绑包中的文件?基本上,我想获取一个远程文件并用它覆盖捆绑文件之一(实际上是一个sqlite数据库).

Is it possible to update a file stored in an applications bundle programmatically? Basically I want to get a remote file and overwrite one of the bundle files with it (a sqlite database in fact).

这在模拟器上工作正常,但在设备上却不起作用,尽管它也没有错误(它似乎并没有被覆盖).

This works fine on the simulator but on the device it does not work, though it does not error either (it just doesn't seem to actually overwrite).

我知道我可以解决该问题,方法是将其复制到用户文件夹中,然后在使用捆绑包之前先获取代码以检查文件的第一个文件,但是我很想知道是否可以更新捆绑包文件还是我只是做错了什么?

I know I can work around it by copying it do the user folder instead and then getting the code to check their first for the file before using the bundle one but I was interested to know whether it is possible to update a bundle file at all or am I just doing something wrong?

谢谢

推荐答案

否,捆绑包无法更新.捆绑包中的物品与该应用程序包装在一起,并且该应用程序已进行了数字签名,以便可以通过App Store转售.通过更改分发包的内容,数字签名将不再匹配.

No, the bundle cannot be updated. Items in the bundle are packaged with the app, and the app is digitally signed so as to be able to be resold through the App Store. By changing the bundle contents, the digital signature would no longer match.

这篇关于您可以更新应用程序捆绑包中的文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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