46

Today I updated to Xcode 6.3.2 and I can't run the Clang code formatting – it seems like it's not even installed. Everytime I update Xcode, I have to reinstall Alcatraz and most of the packages (why btw?) to make them work on the new version of Xcode.

This time I reinstalled all packages (like VVDocumenter, Color picker, etc), but the ClangFormat doesn't work – it doesn't even appear in the "Edit" menu. Any idea why?

btw. I tried to restart Xcode as well as the Mac itself :)

EDIT (Solution):

Solution for Xcode 6.3.x (If this does not work, use the general solution below.)

In terminal, enter the following:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add 9F75337B-21B4-4ADC-B558-F9CADF7073A7

General solution

Get the new UUID via the terminal:

defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

Add the new UUID to the DVTPlugInCompatibilityUUIDs key in the plugin (your xcplugin file --> show package contents --> Contents/Info.plist

Pavel Smejkal
  • 3,600
  • 6
  • 27
  • 45
  • 1
    After updating Xcode did you also install the updated command line tools? – rmaddy May 20 '15 at 22:11
  • 2
    Xcode will ignore plugins who don't advertise compatibility with that Xcode version's ID, so that's could be what you're seeing. Once the clang-format plugin is updated it should start working again. – Jon Shier May 20 '15 at 22:26
  • @JonShier Oh that makes sense. I was just wondering, because Alcatraz looks like it (re)installs the package without problems. – Pavel Smejkal May 20 '15 at 22:38

9 Answers9

45

Oftentimes, the following helps: Re-install Alcatraz, restart Xcode, de-install and re-install your plugin. Sometimes it helps to restart Xcode again. This worked for me.

If your plugin still does not show up, the problem is probably that the the compatibility key of your new Xcode is not yet included in the list of compatibility keys of your plugin.

Possible solutions:

  • Wait for an update of the plugin that includes the new UUID of Xcode
  • If you do not want to wait (for example, if you installed a beta of Xcode and it would take too long for the plugins to be updated), you may manually add the new UUID of Xcode to the plugin (details on how to do this see below). Of course, there is no guarantee that your plugin will work then. If Xcode has changed so that it is really not compatible anymore, it will, of course, not work. However, oftentimes it will work.

To add the new UUID to the plugin:

In terminal, enter the following if you use Xcode 6.3.2:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add E969541F-E6F9-4D25-8158-72DC3545A6C6

For other versions of Xcode, get the UUID of Xcode via the terminal: defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID and use it to update the UUID in the find command above.

[Instead of using the find command above, you may also manually add the new UUID to the DVTPlugInCompatibilityUUIDs key in the plugin package (your xcplugin file --> show package contents --> Contents/Info.plist)]

Sources: GitHub and post by "ianmasters"

John
  • 8,468
  • 5
  • 36
  • 61
  • 1
    I used the `General solution` and it worked perfectly for me, thanks – Luca D'Alberti May 21 '15 at 15:50
  • 3
    Solution for Xcode 6.3.x seems to work fine still - use step 1 of the General solution to first retrieve the UUID to use (6.3.2 for example is E969541F-E6F9-4D25-8158-72DC3545A6C6). There is however talk that plugin load behaviour is changing in Xcode 6.4 as mentioned in the answer below. – mysticcoder May 22 '15 at 00:50
  • I tried this with Xcode 6.3.2 and it would no longer start. Stack trace showed something about DVT* in the crashed thread. I had to remove all the Alcatraz plugins in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins to get Xcode to restart. Then, I just re-installed Alcatraz and now I see the "Package Manager" option under the Window menu. – DustinB May 22 '15 at 14:02
  • @DustinB: One of your plugins may have been really incompatible. – John May 22 '15 at 14:03
  • For fish I needed single quotes around the occurrences of `{}` – tmandry Oct 23 '15 at 21:46
  • I have used this 1st time and it got rid of the generic "all plugins" alert. after Xcode restart, it only alerted for a specific one (OMColorSense), which also disappearead the 2nd time I've restarted Xcode. (without having to do anything.) – Catarino Jun 04 '16 at 14:57
29

After install Xcode 6.4, I choose "Skip Bundles",I can't find Alcatraz.

Fisrt I try the add UUID,but Alcatraz also no working;

Then try this:

defaults read com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-6.4 

In iTerm show below:

allowed =     {
};
skipped =     {
    "com.mneorr.Alcatraz" =         {
        version = 1;
    };
};

but this file can't edit,so delete:

defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-6.4

Next,I reinstall Alcatraz,Xcode show “Load Bundles" again,this time I will not make wrong,choose "Load Bundles".

wenghengcong
  • 569
  • 5
  • 11
  • Note that you don't need to reinstall Alcatraz. Just reset the defaults and you're back in business. – wasabi Sep 04 '15 at 14:12
  • 1
    This fixed it for me as I had selected not to load the bundles at some point after updating XCode, and I guess XCode saved that selection permanently by marking Alcatraz as skipped – Alex Sep 18 '15 at 19:17
19

You could use this script to update your Xcode's plugin after update (works fine with Xcode 7.3):

#!/bin/bash
xcodeUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
echo $xcodeUUID
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $xcodeUUID

or copy from my gist https://gist.github.com/MaciejGad/86302b6b8bdb1ee25115

Maciej Gad
  • 1,701
  • 16
  • 21
17

It turns out, Xcode now has a whitelist / blacklist of bundles you enable. You can check it from the Terminal by running:

$ defaults read com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-6.3.2
{
allowed =     {
};
skipped =     {
    "com.mneorr.Alcatraz" =         {
        version = 1;
    };
    "com.onevcat.VVDocumenter-Xcode" =         {
        version = 1;
    };
    "com.travisjeffery.ClangFormat" =         {
        version = 1;
    };
};}

The bad news is that the prompt to load the bundles won’t show again, even if you reinstall Alcatraz. The fix is simple though, just delete the whitelist / blacklist by running:

defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-6.3.2

and re-open Xcode to be prompted again (and this time make sure you click “Load Bundles”).

Orignal post here: Re-enable Alcatraz on Xcode 6.3.2 or newer

Elviin Goomez
  • 223
  • 2
  • 7
  • Love this solution! For newer versions just change the number at the end (obviously) – mklb Dec 03 '15 at 22:34
5

Use the general code for "all version" of Xcode in terminal,then restart Xcode ,all will be right:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID

Please attention that the code have combined the code of other answers.

If the version of your Xcode is 6.3.2,the code above is equal to

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add E969541F-E6F9-4D25-8158-72DC3545A6C6

When your Xcode is 6.3 or 6.3.1 ,is equal to:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add 9F75337B-21B4-4ADC-B558-F9CADF7073A7

You can find that the difference is the code at the end,it's the uuid of Xcode,so we can get the new uuid of Xcode use this

 defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID

and change it at the end of that code.

If this still not work,you may have not chosen "load bundle" in the alert of Alcatraz enter image description here

If you have chosen "skip bundle",you can do this

  1. reload Alcatraz
  2. the alert of Alcatraz will appear again, choice load bundle
  3. use the code above in thermal
  4. reload Xcode
  5. successfully !!

EDIT: I've tried,just need to use the general code in terminal again,the alert will show again,choose it ,it'll be ok.

ChenYilong
  • 8,543
  • 9
  • 56
  • 84
3

This has worked for me since Xcode 6.3.2

http://pablin.org/2015/05/27/re-enable-alcatraz-on-xcode-6-dot-3-2-or-newer/

Zappel
  • 1,612
  • 1
  • 22
  • 37
2

Plugin compatibility key did not work for 6.3.2 / 6.4.b2

Let's look into this thread: https://github.com/omz/Dash-Plugin-for-Xcode/issues/37 - they have an issue and solution.

General summary: XCode did change a way to load plugins (custom plugins loads first), so it is necessary to make some code changes.

deksden
  • 774
  • 6
  • 13
0

Try building from the source rather than installing using the curl command! For some reason nothing I did with the curl command worked for me including changing the UUID. So I deleted everything from the plugin folder and downloaded the master and did a build. Restart xCode and accept the dialog. Maybe this will help you.

SmileBot
  • 19,393
  • 7
  • 65
  • 62
0

This script both updates the UDIDs for your plugins and ensures that you are prompted to load bundles:

#!/bin/bash
xcodeUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
echo $xcodeUUID
xcodeVersion=`defaults read /Applications/Xcode.app/Contents/Info.plist CFBundleShortVersionString`
echo $xcodeVersion

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $xcodeUUID

defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-$xcodeVersion
arsenius
  • 12,090
  • 7
  • 58
  • 76