Skip to content

Instantly share code, notes, and snippets.

@cedricvidal
Created November 23, 2025 23:06
Show Gist options
  • Select an option

  • Save cedricvidal/dad33c9cecdd1e82a79443ee1f2cd7f5 to your computer and use it in GitHub Desktop.

Select an option

Save cedricvidal/dad33c9cecdd1e82a79443ee1f2cd7f5 to your computer and use it in GitHub Desktop.
Find File Provider Storage folder for Files app on iOS Simulator
#!/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