Why are my Xcode plugins (such as clang format) installed with Alcatraz no longer working after updating to new version of Xcode?

前端 未结 9 1377
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 19:40

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 mo

相关标签:
9条回答
  • 2021-01-29 20:05

    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
    
    0 讨论(0)
  • 2021-01-29 20:09

    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

    0 讨论(0)
  • 2021-01-29 20:09

    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
    0 讨论(0)
提交回复
热议问题