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?
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.
~/Library/Application Support/iPhone Simulator/User/ Show activity on this post.
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.
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.
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:
Or logging:
NSLog(@"%@", [NSBundle mainBundle]);
The result is something like that:
After that you can open Terminal app and go to path with this command:
[Update]
I found an amazing app to do this: http://simpholders.com/
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With