问题
I have an app that uses a CoreData
database the contents of which I view using sqlite
. The database path is the same:
/Users/Comp1/Library/Application Support/iPhone Simulator/7.0.3/Applications/16226A0A-575C-4356-BFAA-6B1A009C0585/Documents
and I can see the database file. But when I open it in sqlite there appears to be no data, although I can read through the app.
It was working fine until I loaded Xcode 5. Does anyone know why this might be?
No tables shown:
回答1:
What happens when you launch the app a second time, can you see the data in your app?
In iOS 7, SQLite now has journaling turned on. I wonder if the journalling is causing a confusion (data is there but not in the sqlite file yet).
If you see data on the second launch then don't worry about it. The journaling just hasn't flushed.
来源:https://stackoverflow.com/questions/22538547/coredata-database-not-showing-in-sqlite-since-moving-to-xcode-5