Typically, the sqlite store file for core data apps is located in
Library>Application Support>iPhone Simulator>7.1(or whichever version you are using)>Applications>(Whichever folder contains your app)>Documents
folder, but I can't find it in IOS 8. I would assume they would just add an 8.0 folder inside the iPhone Simulator folder, but it's not there. Has anybody been able to locate it?
None of the answers mentioned the simplest way to actually get the location of the DB file.
It doesn't even require you to modify your source code, as it's a simple run time switch in XCode.
Choose Edit Scheme... next to the Run button.
Select Run / Arguments and add the following two options:
Run the app, and you'll see in the logs:
For SWIFT 3 :
Copy paste this code in didFinishLaunchingWithOptions
I wrote a bash script for finding the location of your Application folder and the Application data folder within a simulator, you can download it here. Once you have unzipped the script you can navigate to the folder the script is in and use it. If you call it with no options it will give you a list of installed iOS simulators. You can then use the options to find your program. Writing:
will find the application folder and home area folder for your app on the iPad Air iOS 8 simulator. Here's an example:
Update
There's an update to the original script which allows you to search based on the device type using a -d option. I've also written another script which makes a series of sensibly named folders so you can find your application and application documents. This script will make a folder called iOS_SIMULATORS in your home area and you can easily navigate to your application from there.
I was able to locate simulators folder with the next console output:
in my case it was (Xcode 6 beta)
Swift 4.x
If you haven't specified any directory then you can use the below code to print default directory:
print(NSPersistentContainer.defaultDirectoryURL())