Update: I created a tool to automate this
Both for Android and iOS, it is available here.
An old question, but Apple seems to keep changing the logic ...
In macOs Sierra, you can find the database location by issuing the following commands (the simulator should start during the process!)
ps aux | grep 'CoreSimulator/Devices'
As a result, the path to the simulator should be indicated, for example:
/Users/user1/Library/Developer/CoreSimulator/Devices/25C1F5DA-E528-4BC2-B684-A92D382553AC/data/var/run/launchd_bootstrap.plist
Browse to the simulator folder already found:
cd /Users/user1/Library/Developer/CoreSimulator/Devices/25C1F5DA-E528-4BC2-B684-A92D382553AC/Data/Application/
This folder contains all the simulator applications.
From here, if you know the name of the database, just find it, for example:
find ./ -type f -name 'my_db.db'
And viola! You have a database path :)
Nadav96
source share