2

What exactly will get updated when someone updates their app? Does it update external data files in the bundle, overwrite them, replace them...?

Marty
  • 5,926
  • 9
  • 53
  • 91

1 Answers1

4

First off, there are no "external data files in the bundle" - the bundle is your application binary and some authentication data, etc. and is replaced when the app is upgraded. However, any data that you transfer from your bundle to your application's document directory, or simply write directly to the document directory is retained when the app is upgraded.

In short:

  1. Your application bundle is replaced in it's entirety.

  2. Data stored in your application's document directory is retained.

John Parker
  • 54,048
  • 11
  • 129
  • 129
  • 1
    Wouldn't you say the app (binary) is part of the bundle. Like the resource files are part of the bundle? Not the bundle is part of the app? – Black Frog May 28 '11 at 20:36
  • @Black Good point, my description is in the wrong order - I'll update it. Thanks for the heads up. :-) – John Parker May 28 '11 at 20:39
  • is there a way to manually add something to the documents directory so that it's there before the first time the app is ever run? I want to have a check if a certain file is there, and I want it to be there before the app starts up the first time. – Marty May 28 '11 at 20:47
  • @marty Do you mean for the purposes of testing? (Me confused.) You can check on startup if a file is present in the document directory (and copy it from the bundle, etc. if it's not, if so required), but this isn't possible "before the first time the app is ever run". – John Parker May 28 '11 at 20:51
  • I'm trying to find a way to check what version of the app is being used. – Marty May 28 '11 at 20:57
  • @marty I'd be tempted to ask another question, explaining what you're trying to achieve, rather than asking how/if you can do 'x'). :-) – John Parker May 28 '11 at 21:02
  • http://stackoverflow.com/questions/6164370/how-to-check-what-version-of-the-app-is-being-used – Marty May 28 '11 at 21:13