Failed to update a Mac earlier so I encountered some issues regarding XCode update.

cat /var/log/install.log

This shows the error:

The package "DeveloperTools.pkg" is untrusted. 

This blog post was very helpful but to make your life easy, try this:

cd /App*/Install*/Contents

wget https://raw.github.com/gist/2488097/bb8b3ea3e7b38f3f0dd62cac6cdad89ea0168432/fix_xcode_issues.rb

ruby fix_xcode_issues.rb

Here's the code:

Dir.glob('Packages/*.pkg') do |pkg_file|
  f = pkg_file.gsub("Packages/", "")
  `sudo pkgutil --expand Packages/#{f} /tmp/#{f} && sudo pkgutil --flatten /tmp/#{f} Packages/#{f}`
  p "#{f} updated"
end

You may have to update the path as needed. It worked well for me.

comments powered byDisqus

Hello! I am Kat. I've been a developer for several years. When I'm not sitting down, reading and working for long hours, I am traveling to some place of interest.
If you want to reach out, you can send me an email or add me up on Google Plus.