Xcode is crazy! when coding, it loses classes, links and does not autocomplete, often giving the << error type >>

After installing the latest version of xcode, I have a very nasty problem.

While I am coding, xcode is going crazy. Without me, nothing strange, just typing the code, xcode stops recognizing classes.

For example: I want to add a UITableViewDelegate to my class, but it does not recognize it. After I type it manually, sometimes it recognizes it and it displays in purple, and another time it doesnโ€™t. But in both cases this will not be considered, therefore, if I try to write down the method of this delegate, it will not show it.

In other cases, if I try to call a variable of a certain class, trying to autocomplete it, it shows <>.

In other cases, if I try to call some class, let's say I try to enter var test = UIActionSheet , it just displays a few items in the autocomplete list (source types, primitives, classes of my main project, but itโ€™s not) t shows most classes).

As if there is no documentation and a link with the main frameworks ...

I have been working on a simple tabbed application since yesterday, and the third time I started all over again because of this problem, believing that the beginning would fix the problem, but it does not work.

If I open another project while the problem continues, another project works (but I have transcoded my entire application, so this is not a problem, and I also have the same problem for another project ... it just does not affect 2 projects at the same time) I tried to delete the received data I tried to restart both xcode and comp

What's happening?

Here are two screenshots where you can see what is happening:

enter image description here

enter image description here

+5
source share
4 answers

I had the same problem before.

Close Xcode and delete the Derived Data folder here ~/Library/Developer/Xcode Reboot Xcode and you should see that autocomplete works again.

+2
source

You need to learn how to disassemble it and combine it.

Reinstall Xcode, if this does not help, create a new project. Then copy the source files one by one and see when it breaks.

+1
source

Reinstall the Xcode IDE version 6.1

0
source
  • Use CMD + F to find all _element .
  • Make sure that if you name one variable _element

The following code may reproduce the error:

 class _element:NSObject { } let _element:UIImage = UIImage() // type _element under this line 
0
source

Source: https://habr.com/ru/post/1205857/


All Articles