Skip to content

app_get_container

Retrieves the absolute filesystem path to an application’s container directory on a simulator device. You can request the app bundle container, the data container (where documents, caches, and preferences are stored), or a specific App Group shared container. This is essential for inspecting app data, debugging file storage issues, or verifying Core Data databases.

ParameterTypeRequiredDefaultDescription
deviceIdstringYesThe UDID of the target simulator device.
bundleIdstringYesThe bundle identifier of the installed app.
containerstringNo"app"The container type to retrieve. Accepted values: "app" (the app bundle), "data" (the data/sandbox directory), "groups" (list all App Group containers), or a specific App Group identifier (e.g., "group.com.example.shared").

“Where is the WeatherApp bundle installed on the simulator?”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"bundleId": "com.example.weatherapp"
}

“Show me the data directory for the WeatherApp so I can inspect its database.”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"bundleId": "com.example.weatherapp",
"container": "data"
}

“Find the shared container used by the app and its widget extension.”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"bundleId": "com.example.weatherapp",
"container": "group.com.example.weatherapp.shared"
}

“Show me all the App Group containers for this app.”

{
"deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789",
"bundleId": "com.example.weatherapp",
"container": "groups"
}
Container path retrieved.
Device: F3A1B2C3-D4E5-6789-ABCD-EF0123456789
Bundle ID: com.example.weatherapp
Container: data
Path: /Users/dev/Library/Developer/CoreSimulator/Devices/F3A1B2C3-D4E5-6789-ABCD-EF0123456789/data/Containers/Data/Application/8E7F6A5B-4C3D-2E1F-0A9B-8C7D6E5F4A3B
  • app_install — Install the app whose container you want to inspect.
  • app_list — List installed apps to confirm the bundle ID.
  • app_uninstall — Uninstall the app, which removes all container directories.
  • diagnostics — Collect a diagnostic report that may include container info.