简体   繁体   English

Xcode 6.3 Swift自动补全

[英]Xcode 6.3 Swift Autocompletion

I just upgraded to the final release of Xcode 6.3, and found that the autocompletion for Swift code is totally nonfunctional. 我刚刚升级到Xcode 6.3的最终版本,发现Swift代码的自动完成功能完全不起作用。 Sometimes, I cannot get the autocompletion popup to appear at all (even when I mash Esc or Ctrl+Space ). 有时,我根本无法显示自动补全弹出窗口(即使我混搭EscCtrl + Space )。 Other times, the autocompletion popup appears, but it does not provide context-sensitive completion suggestions, only “every word that appears in this file” completion (which, by the way, drives me stir-crazy). 在其他时候,会出现自动完成弹出窗口,但它不提供上下文相关的完成建议,仅提供“此文件中出现的每个单词”的完成(顺便说一句,让我发狂。) Autocompletion in Objective-C files works just fine. 在Objective-C文件中自动补全就可以了。

I have tried removing my DerivedData folder, deleting the xcuserdata folders from inside the project package, removing the ~/Library/Caches/com.apple.dt.Xcode directory, and rebooting; 我试过删除DerivedData文件夹,从项目包中删除xcuserdata文件夹,删除~/Library/Caches/com.apple.dt.Xcode目录,然后重新启动; none of these procedures has produced a change in Xcode's behavior. 这些过程都没有改变Xcode的行为。

The first thing I did was to delete the derived data directories in ~/Library/Developer/Xcode/DerivedData. 我要做的第一件事是删除〜/ Library / Developer / Xcode / DerivedData中的派生数据目录。 That didn't fix it. 那没有解决。

So, how to open Xcode and have it not reopen any projects that it had open? 那么,如何打开Xcode并且不重新打开它已经打开的任何项目呢? It seems there are a few ways. 看来有几种方法。

If Xcode is in your dock, you can option-shift click on it and it won't open any projects. 如果Xcode在您的扩展坞中,则可以按住Shift键单击它,它不会打开任何项目。

Or, you can get rid of all your autosave info like this. 或者,您可以摆脱所有这样的自动保存信息。

yes | 是的 rm -r ~/Library/Autosave\\ Information/ rm -r〜/库/自动保存\\信息/

yes | 是的 rm -r ~/Library/Saved\\ Application\\State/com.apple.dt.Xcode.savedState rm -r〜/ Library / Saved \\ Application \\ State / com.apple.dt.Xcode.savedState

Finally, you can open Xcode from the command line with this incantation. 最后,您可以使用此命令从命令行打开Xcode。

open -a /Applications/Xcode.app --args -ApplePersistenceIgnoreState YES 打开-a /Applications/Xcode.app --args -ApplePersistenceIgnoreState是

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM