I am making an app that relies on Core Data. I am able to enter data into a text field and store it.
But I need to know if the data is being stored.
I am try
The other solutions are either old or does not direct you easily or quickly to the SQLite files, so I came up with my own solution using FileManager.SearchPathDirectory.applicationSupportDirectory that gets the exact path where the sqlite file will be.
func whereIsMySQLite() {
let path = FileManager
.default
.urls(for: .applicationSupportDirectory, in: .userDomainMask)
.last?
.absoluteString
.replacingOccurrences(of: "file://", with: "")
.removingPercentEncoding
print(path ?? "Not found")
}
whereIsMySQLite() will print the path which you can simply copy-paste on your Mac here:
Finder > Go > Go to folder