[go: nahoru, domu]

Skip to content
Håvard Fossli edited this page Apr 27, 2018 · 9 revisions

Every once in a while, Apple upgrades Xcode and "breaks" XcodeColors. Here's how to fix it.

FIRST: Check to see if you have the latest version of the XcodeColors project. Perhaps this has already been fixed. See the commit logs.

If there's a commit that fixes the problem, then just grab the latest version of the code, and follow the installation instructions in the Readme again.

No luck on existing commits? Fear not! This is an easy fix.


Here's why it breaks:

XcodeColors is a plugin for Xcode. And plugins have to specify which versions of Xcode they support. This is done by having the plugin specify the supported versions in its Info.plist file. But it's not as easy as specifying version numbers. (That would be too easy, right?) So instead, each major version of Xcode is assigned a UUID. And plugins have to reference the UUID in their "list of supported versions".

Here's what it looks like:

XcodeUpdates 1


The easy way

The XcodeColors project comes with a script that will automatically add the Xcode UUID (for the version of Xcode you have installed) to the Info.plist. All you have to do is run it (via command line):

$ ./update_compat.sh 

The manual way

The screenshot above includes support for Xcode 4 & 5.0.X.

But it does NOT include support for Xcode 5.1 Beta 5! Gasp! Let's fix it.

Just open your Finder, and navigate to the shiny new version of Xcode. Then right-click, and select "Show Package Contents"

XcodeUpdates 2

Then navigate to Xcode's Info.plist file.

XcodeUpdates 3

Open the Info.plist file, and find the value for DVTPlugInCompatibilityUUID.

XcodeUpdates 4

It will be some long UUID. In the picture above, this value is 640F884E-CE55-4B40-87C0-8869546CAB7A. Copy whatever the UUID value is from the Info.plist file.

An alternative way to get this UUID is via the Terminal, using a command similar to this:
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

Now open the XcodeColors project, and paste this new UUID value into the Info.plist value as a new array item under DVTPlugInCompatibilityUUIDs.

XcodeUpdates 5

We're just about done!

Now build the XcodeColors project.
When you do this, the Xcode plugin is automatically copied to the proper location.
This is done via the build settings. You can validate the plugin was copied to:

  • ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin

Now completely Quit Xcode.
(You need to quit so Xcode can reload the new version of the plugin that was installed.)

Re-Launch Xcode, and re-open the XcodeColors project.
Now run the TestXcodeColors target.
This will test your installation, and you should see colors in your Xcode console.


Are you one of the first developers to add the UUID for the latest version of Xcode?

Send us a pull-request on GitHub and give back to the community. (You'll feel all warm and tingly inside!)

Clone this wiki locally