~/Library/Developer/CoreSimulator/Devices/<Device-UUID>/data/Containers/Data/Application/<App-UUID>/. You can get the exact folder immediately by pausing execution in Xcode and running po NSHomeDirectory() in the LLDB console, or by running xcrun simctl get_app_container booted <your.bundle.id> data in Terminal.Why this happens
Every simulated device managed by CoreSimulator has its own sandboxed filesystem on your Mac, isolated by a unique device UUID. Inside that simulated device, each installed app is also assigned its own container UUID rather than a folder named after your app or bundle identifier.
Because both the device folder and the application data folder use long UUIDs, browsing ~/Library/Developer/CoreSimulator/Devices/ manually in Finder is slow and error-prone. Worse, reinstalling an app or erasing a simulator can generate a new UUID, making any previously bookmarked folder path stale.
When you need to inspect a SQLite database, Core Data store, SwiftData store, or cached file, you need a reliable way to resolve the current container path for the running simulator and app.
How to fix it
1. Print the container path in Xcode with LLDB
If you are already running the app in Xcode, the fastest method is to ask the running process for its home directory in the debugger:
- Set a breakpoint anywhere in your app, or click the Pause program execution button in Xcode’s debug bar.
- In the LLDB console at the bottom of Xcode, type the following command and press Return:
po NSHomeDirectory()
- LLDB prints the full path to your app’s data container, which looks like this:
/Users/yourname/Library/Developer/CoreSimulator/Devices/4734F8C7-B90F-4566-8E89-5060505E387F/data/Containers/Data/Application/395818BB-6D0F-499F-AAFE-068A783D9753
- Copy that path. In Finder, press
Cmd + Shift + G, paste the path, and press Return to open the container directly.
Inside that folder, you will find the standard iOS sandbox subdirectories:
Documents/— user-facing files and custom databases saved to the Documents directory.Library/Application Support/— the default location for Core Data, SwiftData, and many SQLite setups.Library/Preferences/— your app’sUserDefaults.plistfile.Library/Caches/andtmp/— temporary and cached files.
2. Get the path from Terminal with xcrun simctl
If you do not want to pause the debugger—or if you want to open the folder from a script—use simctl in Terminal. Replace com.example.yourapp with your app’s bundle identifier:
xcrun simctl get_app_container booted com.example.yourapp data
To open that folder directly in Finder, wrap it in open:
open "$(xcrun simctl get_app_container booted com.example.yourapp data)"
If you have multiple simulators booted at the same time, list them first to grab the specific device UUID:
xcrun simctl list devices booted
Then pass that UUID instead of booted:
xcrun simctl get_app_container <DEVICE-UUID> com.example.yourapp data
You can also swap data for app to locate the compiled .app bundle, or groups to print any App Group shared container paths.
3. Log the database directory on launch in Swift
If you inspect your SQLite database frequently during development, print the path in your app startup code wrapped in a simulator compiler check so it never runs on physical devices or in release builds:
import Foundation
func logSimulatorDataPath() {
#if targetEnvironment(simulator)
if let supportURL = FileManager.default.urls(
for: .applicationSupportDirectory,
in: .userDomainMask
).first {
print("App Support Path:", supportURL.path)
}
#endif
}
Call logSimulatorDataPath() once during app startup and click or copy the printed path from Xcode’s console.
4. Find the path manually in Finder
For Xcode 6 and all modern versions of Xcode, CoreSimulator stores device data at:
~/Library/Developer/CoreSimulator/Devices/<Device-UUID>/data/Containers/Data/Application/<App-UUID>/
To identify <Device-UUID> without Terminal, open Window > Devices and Simulators in Xcode, select Simulators, click your simulator in the left sidebar, and copy the Identifier value.
If you are working with legacy documentation for Xcode 5 or older, note that older simulators used ~/Library/Application Support/iPhone Simulator/ instead. Modern Xcode installations no longer use that directory.
How to prevent it
- Use
xcrun simctlaliases instead of hardcoding UUIDs: Deleting a simulator or reinstalling an app can change the UUIDs, so avoid hardcoding fullCoreSimulatorpaths in scripts or database viewer bookmarks. - Copy all SQLite sidecar files: When inspecting a SQLite database with an external viewer, make sure you open the file in place or copy the
.sqlite,.sqlite-wal, and.sqlite-shmfiles together so recent uncommitted WAL transactions are included. - Keep Xcode’s Devices and Simulators window handy: Use Window > Devices and Simulators to quickly look up a simulator’s Identifier or download an app container from a physical device when needed.
FAQ
Why does the Simulator app container UUID change?
CoreSimulator assigns a fresh <App-UUID> folder when an app is uninstalled and reinstalled, or when a simulator is reset via Device > Erase All Content and Settings. Use xcrun simctl get_app_container booted <bundle-id> data to always resolve the current path.
Where are UserDefaults stored in the iOS Simulator?
UserDefaults values are saved inside the app’s data container under Library/Preferences/<bundle-id>.plist. Once you open the container with po NSHomeDirectory() or simctl, you can inspect or edit that .plist file directly in Xcode.
How do I find an App Group shared container in the iOS Simulator?
Run xcrun simctl get_app_container booted <your.bundle.id> groups in Terminal. It prints the paths for every App Group container associated with that app, located under .../data/Containers/Shared/AppGroup/.
Parts of this guide are adapted from content licensed under CC BY-SA 2.5; this article is shared under the same license.
