0
votes

I am using Core data in my application and I am trying to see the data I inserted from the terminal.

I am trying to open a sqlite database via terminal as per this document. However, when I try to open it, I am getting the following error. I am not quite sure, what's going on.

I tried removing all other previous versions of my app's database. I tried attaching the database as well using the following command

sqlite> attach "myapplication.sqlite" as db1;

None worked.

unable to open database "/Users/mymacbook/Library/Application Support/iPhone Simulator/6.1/Application/7E563301-F42C-48A5-8C8D-60C6B096DC92/Documents/myapplication.sqlite": unable to open database file

Any help is appreciated.

Thanks

1

1 Answers

2
votes

I find it easier to just do something like this

$ sqlite3 myapplication.sqlite

at the command prompt

Assuming you're in the directory myapplication.sqlite resides.

If you don't want to do it that way

$ cd "/Users/mymacbook/Library/Application Support/iPhone Simulator/6.1/Application/7E563301-F42C-48A5-8C8D-60C6B096DC92/Documents/"
$ sqlite3
> attach "myapplication.sqlite" as db1;