Search code examples
iosdata-persistence

When an app gets updated, is it just the binary that gets updated, and not the data files?


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


Solution

  • 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.