Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Created February 28, 2012 16:21
Show Gist options
  • Save pjaspers/1933441 to your computer and use it in GitHub Desktop.
Save pjaspers/1933441 to your computer and use it in GitHub Desktop.
def xcode_proj_name
File.basename(Dir.glob("*.xcodeproj").first, ".xcodeproj")
end
desc "Reset Xcode's autocompletion"
task :reset_xcode do
home_folder = File.expand_path("~")
project_name = xcode_proj_name
Dir.glob("#{home_folder}/Library/Developer/Xcode/DerivedData/#{project_name}*").each do |folder_path|
puts "Deleting #{folder_path}"
FileUtils.remove_dir(folder_path, true)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment