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.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
deviceId | string | Yes | — | The UDID of the target simulator device. |
bundleId | string | Yes | — | The bundle identifier of the installed app. |
container | string | No | "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"). |
Usage Examples
Section titled “Usage Examples”Get the app bundle container
Section titled “Get the app bundle container”“Where is the WeatherApp bundle installed on the simulator?”
{ "deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789", "bundleId": "com.example.weatherapp"}Get the data container
Section titled “Get the data container”“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"}Get a specific App Group container
Section titled “Get a specific App Group container”“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"}List all App Group containers
Section titled “List all App Group containers”“Show me all the App Group containers for this app.”
{ "deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789", "bundleId": "com.example.weatherapp", "container": "groups"}Example Output
Section titled “Example Output”Container path retrieved.Device: F3A1B2C3-D4E5-6789-ABCD-EF0123456789Bundle ID: com.example.weatherappContainer: dataPath: /Users/dev/Library/Developer/CoreSimulator/Devices/F3A1B2C3-D4E5-6789-ABCD-EF0123456789/data/Containers/Data/Application/8E7F6A5B-4C3D-2E1F-0A9B-8C7D6E5F4A3BRelated Tools
Section titled “Related Tools”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.