I need to remove the reference to some files from my Xcode project from command line. I'm trying with the ruby lib Xcodeproj, but I can't understand how to do it:
proj = Xcodeproj::Project.open(project_file)
proj.targets.each do |target|
path = "../Pods/MyFolder/Externals/**/*"
dir = Dir.glob(path).select{ |e| File.file? e }
dir.each do |file|
proj.files.delete(file)
end
end
proj.save
After running the script nothing is changed inside my project.