1

I have a query like, what actually happens when

  • someone updates an iOS app with latest build file (ipa file)
  • replace already installed app with new iOS build directly without deleting older one

In my app there are global variables (shared instances) and a database available. Values for both having read+write features.

If new build affects these things, then values which are already stored, may cause an problem in app.

What if database structure changes in new build than the older one?

Note: My app supports background running, so while installing new build, it might be possible that user is not quit from the app.

I have already tried to search on this topic, but not found any specific explanation on this. Already referred: iPhone app Update Vs new version

Any help/explanation would be grateful.

Community
  • 1
  • 1
Mrunal
  • 13,672
  • 6
  • 49
  • 93
  • "_while installing new build, it might be possible that user is not quit from the app_" The OS will terminate the app before commencing an install. – neilco Oct 11 '13 at 15:14
  • @neilco: Thanks about this info. What about the stored values and local database? – Mrunal Oct 11 '13 at 15:20
  • `NSUserDefaults` is a file system-based key-value store that's ideal for storing global variable data that needs to persistent between launches of the app. As for the database, when the app launches to need to check that the current database has the schema you expect. If not, then you need to migrate it to the new schema. NSUserDefaults data and database files will persist between different versions of the app as they are stored in a separate location to the app's executable. – neilco Oct 11 '13 at 15:42
  • local database file and all other stored files in documents directory gets deleted and app copies the new db file if you update the application..in short documents directory get cleared while updating app – Preetam Jadakar Oct 14 '13 at 10:48
  • @preetam: Thanks for this one. Is there any solution to transfer data from older db to newer one? And same thing to persist files in document directory? – Mrunal Oct 14 '13 at 13:59
  • I know only one way:server set-up and client-server synchronisation. – Preetam Jadakar Oct 15 '13 at 04:41

0 Answers0