Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where Does Simulator 8.0 Store Files

I cannot find the directory for the new simulator data in Xcode-6 Beta for IOS 8

It is not in ~/Library/Application Support/IPhone Simulator/

Where does the iPhone Simulator store its data?

like image 945
Ryan Heitner Avatar asked Jun 03 '14 18:06

Ryan Heitner


People also ask

Where are simulator files saved?

You also may just go to the ~/Library/Developer/CoreSimulator/Devices/ folder in Finder ( Shift+Cmd+G ), and then click on the Date modified tab on the top of the folder menu. You'll get the most recently used simulator folder without UDID.

Where are iOS simulators stored?

~/Library/Application Support/iPhone Simulator/User/ Show activity on this post.

How do I change simulator location?

Change location when the application is runningStart running ⇧ F10 or debugging ⇧ F9 the application. Select a desired location from the list that opens. This location will be simulated on your device, but won't be saved in the list. If you want to add custom locations to the list, use GPX files.


4 Answers

Something like this:

/Users/{YOUR NAME}/Library/Developer/CoreSimulator/Devices/{DEVICE ID}/data/Containers/Data/Application/{APPLICATION ID}/

The Device ID can be a bit hard to find (basically, there's one folder with a random-looking name for each simulator you have). To get to the correct folder, I used this terminal command:

find ~ -name myFile.txt

Where myFile.txt was one of the files in my application. The terminal then printed out the full location—this might be more useful to you then checking each one-by-one, if you have a file (or, can make one) that you can search for.

like image 57
username tbd Avatar answered Jan 01 '23 07:01

username tbd


In XCode 6 it's really hard to find out. But I do this in the simple way:

With XCode opened just write this in Debug Area:

po [NSBundle mainBundle]

Or logging:

NSLog(@"%@", [NSBundle mainBundle]);

The result is something like that: enter image description here

After that you can open Terminal app and go to path with this command:

open yourAppPath...


[Update]

I found an amazing app to do this: http://simpholders.com/

like image 26
Salmo Avatar answered Jan 01 '23 05:01

Salmo


To locate the Documents folder of an app in iOS 8 Simulator, you can first write a file in the Documents folder:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fileName = [documentsDirectory stringByAppendingPathComponent:@"Words.txt"];
NSString *content = @"Apple";
[content writeToFile:fileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil];

say, in didFinishLaunchingWithOptions.

Then you can open a Terminal and find the folder:

$ find ~/Library -name Words.txt
like image 45
ohho Avatar answered Jan 01 '23 06:01

ohho


Ok, I was frustrated trying to find things manually. Ill keep my notes above to show what does NOT seem to work.

What DOES work, and is a great relief to me, is SimPHolders. Google it. Download it. Run it. Enjoy.

like image 22
Nathan Gopen Avatar answered Jan 01 '23 06:01

Nathan Gopen