In iOS 7, the document directory of the iOS simulators can be found in:
/Users/Sabo/Library/Application Support/iPhone Simulator/
However, in iOS 8 Beta Simulator, I can't find the corresponding directory for iOS 8 in the directory above.
Where's the document directory path for the iOS 8 Simulator?
I faced the same issue when I stored the full path using CoreData. When retrieving the full path, it return null because the document folder UUID is different every time the app restarts. Following is my resolution:
Despite the fact that here are many answers, none of them provides an understanding of how the folder structure of the iOS 8.3 simulators have changed and are not providing a quick way to find the App's Data (Documents folder).
Since iOS 8 the Data storage folder(s) of an App are separate from the App's executable files while the iOS 7 and below are having the same folder structure, the only difference being the fact that all the simulators (different types and versions) are now in one, big folder.
So, the path to an iOS 8,7,6 simulator is the following:
Every simulator is now contained in a folder named with an unique identifier which changes at every reset of a simulator.
You can find the
Identifier
for each of your devices & simulators by going toXcode > Window > Devices
(the first 3 or 4 characters of the identifier are more than enough to remember).To find the one on which you have installed your app(s) on, take a look at your
Run scheme > devices
(screen 2).Now, after you identify your simulator, depending on its version the folder structure is very different:
On iOS 8 the executable and the data folder of an app are in different folders:
Executable:
~/Library/Developer/CoreSimulator/Devices/[simID]/data/Containers/Bundle/Application/[appID]
Data Folder:
~/Library/Developer/CoreSimulator/Devices/[simID]/data/Containers/Data/Application/[appID]/
Documents Folder:
~/Library/Developer/CoreSimulator/Devices/[simID]/data/Containers/Data/Application/[appID]/Documents
On iOS 7 and below the folder structure is the same as before only remember that now every simulator is in the same folder (see above).
The best way to find the path is to do via code.
Using Swift, just paste the code below inside the function application in your AppDelegate.swift
For Obj-C code, look answer from @Ankur
Where is the Documents Directory for the iOS 8 Simulator
You may have noticed that the iPhone Simulator has changed with Xcode 6, and with it – of course – the path to your simulated apps’ Documents Directory. At times we may need to take a look at it.
Finding that path is not as easy as it was once, namely Library/Application Support/iPhone Simulator/7.1/Applications/ followed by a cryptic number representing your app.
As of Xcode 6 and iOS 8 you’ll find it here: Library/Developer/CoreSimulator/Devices/cryptic number/data/Containers/Data/Application/cryptic number
http://pinkstone.co.uk/where-is-the-documents-directory-for-the-ios-8-simulator/
With the adoption of CoreSimulator in Xcode 6.0, the data directories are per-device rather than per-version. The data directory is ~/Library/Developer/CoreSimulator/Devices//data where can be determined from 'xcrun simctl list'
Note that you can safely delete ~/Library/Application Support/iPhone Simulator and ~/Library/Logs/iOS Simulator if you don't plan on needing to roll back to Xcode 5.x or earlier.
For Swift 3.x