Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GabrielSilveiraa/0af99afffc68e4645b7b506ab33886bb to your computer and use it in GitHub Desktop.
Save GabrielSilveiraa/0af99afffc68e4645b7b506ab33886bb to your computer and use it in GitHub Desktop.
Script to find all Swift files present in your project folder but not referenced in your xcode project
find /path/to/excode/project -type f -name "*.swift" -print0 | while IFS= read -r -d '' file; do
filename=$(basename "$file")
if ! grep -qF "$filename" /path/to/excode/project/project.pbxproj; then
echo "Swift file '$file' exists but is not in the Xcode project."
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment