Skip to content

Instantly share code, notes, and snippets.

@mkuliszkiewicz
Created March 22, 2015 14:41
Show Gist options
  • Select an option

  • Save mkuliszkiewicz/d251c00c6272c2551af2 to your computer and use it in GitHub Desktop.

Select an option

Save mkuliszkiewicz/d251c00c6272c2551af2 to your computer and use it in GitHub Desktop.
require 'plist'
# xcode 6.2 A16FF353-8441-459E-A50C-B071F53F51B7
plugins_path = File.expand_path('~') + "/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/"
Dir.foreach(plugins_path) do |fname|
if fname != '.' && fname != '..' && fname != '.DS_Store'
plist_path = plugins_path + fname.to_s + '/Contents/Info.plist'
if File.exist?(plist_path)
application_plist = Plist::parse_xml(plist_path)
current_uuids = application_plist['DVTPlugInCompatibilityUUIDs']
# puts current_uuids
if !current_uuids.include?("A16FF353-8441-459E-A50C-B071F53F51B7")
current_uuids << "A16FF353-8441-459E-A50C-B071F53F51B7"
application_plist['DVTPlugInCompatibilityUUIDs'] = current_uuids
File.open(plist_path, 'w') { |file| file.write(application_plist.to_plist) }
print "Updated " + fname
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment