Created
November 23, 2025 23:06
-
-
Save cedricvidal/dad33c9cecdd1e82a79443ee1f2cd7f5 to your computer and use it in GitHub Desktop.
Find File Provider Storage folder for Files app on iOS Simulator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Find the File Provider Storage folder for the Files app on the booted simulator | |
| # Get the list of apps and find com.apple.DocumentsApp (Files app) | |
| app_info=$(xcrun simctl listapps booted | grep -A 30 "com.apple.DocumentsApp") | |
| if [ -z "$app_info" ]; then | |
| echo "Error: Files app (com.apple.DocumentsApp) not found on booted simulator" >&2 | |
| exit 1 | |
| fi | |
| # Extract the group.com.apple.FileProvider.LocalStorage path | |
| group_container=$(echo "$app_info" | grep "group.com.apple.FileProvider.LocalStorage" | sed -n 's/.*"\(file:\/\/.*\)";/\1/p' | tr -d '"' | sed 's/file:\/\///') | |
| if [ -z "$group_container" ]; then | |
| echo "Error: Could not find FileProvider.LocalStorage group container path" >&2 | |
| exit 1 | |
| fi | |
| # The File Provider Storage is in the group container | |
| file_provider_storage="${group_container}File Provider Storage" | |
| if [ -d "$file_provider_storage" ]; then | |
| echo "$file_provider_storage" | |
| else | |
| echo "Error: File Provider Storage directory not found at: $file_provider_storage" >&2 | |
| echo "Group container path: $group_container" >&2 | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment