简体   繁体   English

XCode 6自动完成停止工作

[英]XCode 6 autocomplete stopped working

XCode 6 Beta 5 and autocomplete stopped working. XCode 6 Beta 5和自动完成功能停止工作。 I thought problem in Beta 5 but I've reinstall to Beta 4 and it's still not work but it did before. 我认为Beta 5中有问题,但我重新安装到Beta 4,它仍然无法正常工作但之前就已经完成了。 I check preferences for "suggests" and I tried to delete Derived Data but it doesn't help 我检查“建议”的偏好,我试图删除衍生数据,但它没有帮助

  1. Clear derived data. 清除派生数据。
  2. Under build settings, select Always Search User Paths to "YES". 在构建设置下,选择始终搜索用户路径为“是”。
  3. Clean the project. 清理项目。

This happened to me recently because I had a /* */ style comment after the @end of my @implementation. 这件事最近发生在我身上,因为我在@implementation的@end后面有一个/ * * / style注释。

Not sure why that would break autocomplete but moving the comment into the implementation fixed autocomplete. 不确定为什么会破坏自动完成但将注释移动到实现固定自动完成中。

There seems to be a lot of reasons autocomplete breaks. 自动完成中断似乎有很多原因。 Just adding to the list.. 只需添加到列表..

I found the solution. 我找到了解决方案。 Problem was in an array. 问题出在一个数组中。 I have big array like: let array:[NSString] = ["first","second"...] I changed it to var array = ["first","second"...] I don't why it's happened but it works. 我有大数组: let array:[NSString] = ["first","second"...]我把它改成var array = ["first","second"...]我不知道为什么发生但它的确有效。 It was so hard to find the problem. 很难找到问题所在。

I was having this problem. 我遇到了这个问题。

This is what worked for me. 这对我有用。

  1. Clear derived data. 清除派生数据。

Window -> Organizer -> "Select you project" -> Delete Derived Data. 窗口 - >管理器 - >“选择项目” - >删除派生数据。

  1. Clean the project 清理项目

  2. Quit Xcode ----- this is very important. 退出Xcode -----这非常重要。 You might have to restart you computer. 您可能必须重新启动计算机。

  3. Open Xcode again 再次打开Xcode

Hope this works for you. 希望这对你有用。 This worked on 2/9/2015 这工作于2015年2月9日

检查.m文件是否已在“目标成员资格”中签入

Tried to clean/delete derived data multiple times. 试图多次清理/删除派生数据。 Autocomplete was disabled in some files, but not App Delegate. 某些文件中禁用了自动填充,但App Delegate未禁用。 After a while I saw red libraries int he project navigator. 过了一会儿,我在项目导航器中看到了红色图书馆。 Those are managed by cocoapods. 这些由cocoapods管理。 The solution turned out to be: 解决方案原来是:

  • Navigate to the project root folder 导航到项目根文件夹
  • Delete "Pods" directory 删除“Pods”目录
  • open terminal, type cd 打开终端,输入cd
  • drag the project folder there to get full path 将项目文件夹拖到那里以获得完整路径
  • run pod install 运行pod安装

Upon reinstalling pods, syntax highlighting and code completion is restored in the affected files. 重新安装pod后,将在受影响的文件中恢复语法突出显示和代码完成。

For me it was because it was a new problem since upgrading my version of Xcode. 对我来说,这是因为升级我的Xcode版本后出现了一个新问题。 After downloading the documentation again, everything worked fine. 再次下载文档后,一切正常。

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

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