开发者

iOS App Version Upgrade - Does Bundle content get deleted?

开发者 https://www.devze.com 2023-04-08 05:51 出处:网络
Looking for som开发者_开发知识库e concrete detail on how version to version upgrade works in iOS, specifically what happens to bundle content that has been removed in the new version? For example, if

Looking for som开发者_开发知识库e concrete detail on how version to version upgrade works in iOS, specifically what happens to bundle content that has been removed in the new version? For example, if version 1.0 has a file called "foo.png" in the bundle, but version 2.0 does not, does iOS remove the existing foo.png during upgrade? Or does it leave it there? Thanks, alex


The way to think about it is this:

  1. The old bundle (executable, resources, etc) is completely removed.
  2. The new bundle is plunked down in its place.
  3. The app's file system outside the bundle is left untouched.

All your app-stored data, documents, and user defaults stay exactly where the are. The new version of your app will wake up to find all that state still there and need to handle it correctly. But none of the old app bundle's resources are there, though-- you don't need to worry about seeing upgrades and versioning of those things.


Upgrading removes all old files. You will only have the files that belongs to your target in the bundle after updating.

This is actually crucial. Say you delete a nib. If it isn't actually deleted, it will still be initialized from simply being in the file system of the bundle. And you will probably not have IBOutlets etc in your view controller for connections in the xib you deleted. This will cause the application to crash when initializing the nib.

0

精彩评论

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