-1

I have installed my app in my iPad. My app has a sqlite DB.

Now if i add another build ipa to the ipad... does the App DB get replaced ? or is it necessary to delete the prev app and then install the new build ?

There is no versioning check of the DB

MainakChoudhury
  • 502
  • 1
  • 7
  • 23

1 Answers1

0

When you merely replace or update a build on the device / simulator, the files in the sandbox are not replaced. If you saved a database into, say, the Documents folder, it will still be there unchanged when you edit your code and build and run. The same is true for user defaults. That's the case whether you build and run from Xcode or you send your build up to TestFlight and bring it down to the device.

The way to get a clean slate is to delete the app on the simulator / device. That removes the sandbox and all stored data associated with this app. Now download / install the new version, and you will be starting (almost) from scratch.

(I say "almost" because even that will not erase all knowledge of the app. For that, you might need to reset the associated settings. But that's probably another story.)

matt
  • 515,959
  • 87
  • 875
  • 1,141