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
Xcode Plugins Stopped Working
提问by Blaz
Dave Keck's Fixins
stopped working on Xcode. I've already tried rebuilding with no avail. Anybody found a workaround? (I'm mostly longing for CurrentLineHighlighter
and DisableAnimations
.)
Dave KeckFixins
停止了在 Xcode 上的工作。我已经尝试重建无济于事。有人找到了解决方法吗?(我最渴望CurrentLineHighlighter
和DisableAnimations
。)
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 DVTPlugInCompatibilityUUIDs
array 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 DVTPlugInCompatibilityUUID
in console.
要获取 UUID,请defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
在控制台中执行。
*E.g. DisableAnimations
and HideDistractions
work, while CurrentLineHighlighter
invariably crashes Xcode.
*例如DisableAnimations
和HideDistractions
工作,而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 更新运行此命令