Include SQLite file in the build

Is It possible to include the DB file in the build of the App. It’s not convenient to provide an app with an attached file.

Many thanks I tried some search but don’t find any relevant answer

depends on which O/S and what type of DB file. We need more information before we can answer you.

Ok Sorry, OS X Yosemite and I work with Sqlite.
It will be more convenient if I can include the Sql file inside the build as people are sometimes removing it.

You can use a Copy Files Build Step (Insert->Build Step->Copy Files) to copy a SQLite file into your OS X app bundle. However, you’ll want your app to copy it out of the bundle (probably to SpecialFolder.ApplicationSupport) before you try to write to it.

Many Thanks Paul I will try it.

if you write to a file inside the app and you submit it to MAS, they will flag it and fail you. It is best practices (something I learned the hard way years ago) that you never modify files inside the .app.

Ahah it took me some time to understand but it works ! Thanks :slight_smile: And also I need to smash myself as I found another topic for the same question.

yeah we all end up doing that from time to time. Do beat yourself up too much.