Xcode 插件停止工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19110899/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:58:28  来源:igfitidea点击:

Xcode Plugins Stopped Working

xcodepluginsxcode5xcode6

提问by Blaz

Dave Keck's Fixinsstopped working on Xcode. I've already tried rebuilding with no avail. Anybody found a workaround? (I'm mostly longing for CurrentLineHighlighterand DisableAnimations.)

Dave KeckFixins停止了在 Xcode 上工作。我已经尝试重建无济于事。有人找到了解决方法吗?(我最渴望CurrentLineHighlighterDisableAnimations。)

Related question on another plugin: XcodeColors not working in XCode 5

另一个插件的相关问题:XcodeColors not working in XCode 5

回答by Blaz

UPDATE:I've written a longer answer on how to automate upgrading these plugins, Xcode 8 included.

更新:我已经写了一篇关于如何自动升级这些插件的较长答案,包括 Xcode 8



You can get some*plugins to work with Xcode 5 by adding a DVTPlugInCompatibilityUUIDsarray into each plugin's Info.plist. Then add a UUID string to this array.

你可以得到一些*通过添加一个插件在Xcode 5个工作DVTPlugInCompatibilityUUIDs阵列到每个插件的Info.plist。然后向该数组添加一个 UUID 字符串。

<key>DVTPlugInCompatibilityUUIDs</key>
<array>
    <string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
</array>

To get the UUID, execute defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUIDin console.

要获取 UUID,请defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID在控制台中执行。

*E.g. DisableAnimationsand HideDistractionswork, while CurrentLineHighlighterinvariably crashes Xcode.

*例如DisableAnimationsHideDistractions工作,而CurrentLineHighlighter总是使 Xcode 崩溃。

回答by tbaranes

EDIT:Starting with Xcode 8, the plugins system doesn't work anymore, more information. This answer won't work for Xcode 8 and later.

编辑:从 Xcode 8 开始,插件系统不再工作,更多信息。此答案不适用于 Xcode 8 及更高版本。



Original answer:

原答案:

Xcode's plugins stopped working after each update. In order to fix them all quickly, you can use the following command line in your terminal. That will update each plugin and make them compatible with the new update.

每次更新后,Xcode 的插件都会停止工作。为了快速修复它们,您可以在终端中使用以下命令行。这将更新每个插件并使它们与新更新兼容。

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 DVTPlugInCompatibilityUUID`

Note:You have to restart Xcode in order to have your plugins work again

注意:您必须重新启动 Xcode 才能让您的插件再次工作

Note 2:You will have to run this command for each Xcode update

注意 2:您必须为每个 Xcode 更新运行此命令

回答by malex

You can find simple solution here

您可以在这里找到简单的解决方案

You should use another plugins folder

您应该使用另一个插件文件夹

 /Applications/Xcode.app/Contents/PlugIns