SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

How to Find An SQLite Database with React Native and the iPhone Simulator.

       

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.

Tagged w/ #iphone #react #react-native #mobile #sqlite #grep #find #development

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app