1

I need to include a sqlite database in my app (pre-made) and make changes further into it as the app is used. So my question is, is there any way to include a pre populated sqlite DB in the app's working environment and then use the native sqlite framework to edit/update/delete data from it ?

Some tutorial references for this will be appreciated.

3
  • What stops you for running a search? Commented Mar 12, 2016 at 22:39
  • @ElTomato i already did. Not to waste time, can we get an answer ? Commented Mar 13, 2016 at 13:39
  • Show us what you have done so far, then. Commented Mar 13, 2016 at 22:31

2 Answers 2

1

I was looking for something like this Sqlite. Although it isn't upto the mark as i needed a tool or something for easily creating a large DB which i could later embed in my app. But still this tutorial does clear away some confusion.

P.S. there is a tool which you can use to view your DB. I don't believe we can edit a DB using it. Its called SQLite Client. Its available on the app store.

Sign up to request clarification or add additional context in comments.

Comments

0

Yes, you can include pre-populated SQLite file in your app.

Steps to include sqlite

  1. Drag and drop the sqlite file(with the data) to the app bundle. Add the framework libsqlite3.dylib
  2. Using NSFileManager, copy the file to documents directory to modify the sqlite data.
  3. Then do your changes using sql queries.

Refer this link for more details->Sqlite tutorial

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.