更新Xcode后插件失效问题

Xcode更新后插件会失效,这个时候需要给插件的Info.plist文件添加新Xcode的UUID

一、首先找到更新后的Xcode的DVTPlugInCompatibilityUUID:

打开路径: /应用程序/Xcode/右键显示包内容/Contents/Info.plist 找到DVTPlugInCompatibilityUUID对应的值并复制保存。

二、插件添加UUID步骤:

1.前往到插件安装目录:~/Library/Application Support/Developer/Shared/Xcode/Plug-ins;

2.右键插件==》显示包内容==》双击Contents==》打开Info.plist文件;

3.找到DVTPlugInCompatibilityUUIDs,点击+按钮,将刚才复制的UUID添加进去;

4.保存文件并重启xcode,插件可用。

5.给每个插件都重复上述步骤。

====================================================================

后来在stackoverflow上看到一个小哥用一段命令就把上面所有的步骤都完成了,找不到原来的链接了,所幸命令被我记在一个临时的文档里了,在终端输入下面命令即可批量操作:

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`

原文地址:https://www.cnblogs.com/tbfirstone/p/3610953.html