开发者

Can you update a file in the application bundle?

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 s开发者_开发问答omething wrong?

Thanks


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 probably won't work because deployed app bundles are cryptographically signed by Apple (even during development). You are not allowed to change them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜