0

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 Answer 1

2

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;
Sign up to request clarification or add additional context in comments.

6 Comments

Thank you for the response. I tried doing that, did not work though. One more thing is when I try to access /Users/mymacbook/Library/Application Support/iPhone Simulator through sqlitepro firefox plugin, I am not able to locate the part from /Library/Application Support/ ... Any thoughts on that ?
@codeinzone - Sounds like you need to figure out where the file is.
@codeinzone - (Keep in mind that, if you pass a full path, the embedded blank will foul up some accesses.)
could you please explain " the embedded blank will foul up some accesses"?
@codeinzone - I don't see any "red flags" in the above stuff, but many tools simply can't readily handle a path with a blank in it, at least not unless the blank is "escaped" with `\`. This problem occurs because parameters in a list are parsed apart at blanks.
|

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.