Search code examples
macoscocoa

Can I preserve the database file during an app update?


I am new to programming cocoa apps so please be patient if this is a stupid question.

I am setting up a database with the core framework. My app will have frequent updates and bug fixes. How can I prevent that an update of my application overwrites the database? Can I update everything BUT the database?


Solution

  • Updating the application will overwrite only the application bundle (i.e. Yourprogram.app folder). It will not do anything with ~/Library/ and ~/Documents, where all your databases should be stored.