I spent a few hours digging around my file system using find
and grep
hunting for my SQLite database that the iPhone Simulator was using for my React Native project. And no luck.
But I found a simple solution was to use react-native log-ios
and grep the logs for my database name. This will return the complete path to the database..
react-native log-ios | grep -i myapps.db
And whala..
/Users/myname/Library/Developer/CoreSimulator/Devices/4CE/data/Containers/Data/Application/0D9/Library/LocalDatabase/myapps.db
You can then use this as the argument to the sqlite3
(in my case) shell. It will load the file and you can query the database the iPhone Simulator is using. This will let you inspect writes and run queries against a real data. Very useful.
Just finishing up brewing up some fresh ground comments...