2

I need to look my application's database file.I found this question:

How view data stored in Core Data?

In answer he said:

Your app will be folder inside (~ is your home directory): ~/Library/Application Support/iPhone Simulator/User/Applications/

I opened the Application Support folder but there is no iPhone Simulator folder inside this folder.

What should I do ? Here is the screenshot:

enter image description here

Edit:I am using xCode 6 and Yosemite.

Community
  • 1
  • 1
Okan
  • 1,279
  • 1
  • 21
  • 37
  • What is the version of the xcode you are using? also are you using yosemite? that answer seems old location for he simulator files are changed I believe – u.gen Mar 25 '15 at 20:26
  • Xcode 6 and Yosemite. – Okan Mar 25 '15 at 20:26
  • possible duplicate of [Document Directory Path of iOS 8 Beta Simulator](http://stackoverflow.com/questions/25198840/document-directory-path-of-ios-8-beta-simulator) – u.gen Mar 25 '15 at 20:32

4 Answers4

3

The iPhone Simulator files have moved and can be a bit of a pain to find now. Each simulated device has a folder in ~/Library/Developer/CoreSimulator/Devices. You can root around in there until you find the simulator you're looking for. I wrote a tool to help locate the sandbox for each simulated device on which you've installed an app, but it's not perfect. You can find it here: https://github.com/somegeekintn/SimDirs

There is also an app called SimPholders2 that may be able to help you with this problem - http://simpholders.com/

Casey Fleser
  • 5,517
  • 29
  • 43
  • Thank you,I found the folder.But do you know why there is no data folder ? http://prntscr.com/6lbjg5 – Okan Mar 25 '15 at 20:35
2

for me it it is Library/Developer/CoreSimulator/Devices/C7E8D457-BFAB-43DA-8B0C-D9010BBB1D88/data/Containers/Data/Application/6B7DC6FA-2379-468C-A74B-60910A1CDCD1/Documents

device id and application id will be different for you though. this would give you documents directory for your app.

NSArray       *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);  
NSString  *documentsDirectory = [paths objectAtIndex:0];  
NSLog (@"documentsDirectory %@",documentsDirectory);
u.gen
  • 4,757
  • 4
  • 39
  • 76
2

OK The whole Problem lies in the fact that you need to open the Finder >> View >> Show View Options and then click to turn on Library.

Why would someone hide this so deep and obscurely?

user462990
  • 5,162
  • 3
  • 31
  • 33
0

You can use Core Data Lab to automatically find and view the database files of any Core Data app running in the simulator.

Info page: https://betamagic.nl/products/coredatalab.html

Free 14-trial: https://betamagic.nl/downloads/Core%20Data%20Lab%20Trial.zip

Diclaimer: I'm the creator of this tool.

Ely
  • 5,159
  • 1
  • 34
  • 51