Xcode 7.3 autocomplete is so frustrating

前端 未结 11 846
小鲜肉
小鲜肉 2020-12-04 07:55

There is a new autocomplete in Xcode. Probably might be useful because it checks not only beginning of names etc. But I found that very often it doesn\'t find a class name o

相关标签:
11条回答
  • 2020-12-04 08:49

    This is by no means an adequate solution, BUT it has allowed me to (barely) maintain my sanity the past few days: After every build, you need to trash your Derived Data folder. You can find this folder in Xcode > Preferences > Locations > Derived Data. Just trash the whole thing and it'll kick off a re-indexing step that should restore proper autocomplete functionality. Unfortunately, I've found that once I build, the autocomplete behavior reverts to its broken state.

    0 讨论(0)
  • 2020-12-04 08:50

    Closed Xcode, opened Xcode, let it index, it worked.

    0 讨论(0)
  • 2020-12-04 08:55

    I ran into this issue while trying to make an OS X app and I was able to fix this issue by making sure that the Xcode 7.3 documentation and the OS X 10.11.4 documentation was actually downloaded. Doing this fully restored my autocomplete functionality. My full instructions are below as well as in my answer to a similar question: https://stackoverflow.com/a/39420664/3444925

    I had this problem myself and after looking through all the other similar questions & answers about this, I couldn't find a solution. However, I finally found what worked for me.

    Go to Xcode -> Preferences -> Components. There you will probably find a screen that looks like the following:

    This shows that the documentation has not has not been downloaded and therefore, any attempts to re-index or re-build the application without downloading the documentation would prevent you from being able to use the autocompletion functionality.

    Once I downloaded the Xcode 7.3 Documentation and the OSX 10.11.4 Documentation, this was enough for me to get the autocomplete functionality back (I was trying to build an OS X app, so feel free to download as much documentation as is relevant for you).

    0 讨论(0)
  • 2020-12-04 08:59

    Xcode 7.3.1

    I will share another posible reason, that after couple of days we found out. We have multiple schemes, and in one of them, the bridging header was importing a file that didn't exist anymore. So, it didn't break while compiling and running (the header belongs to another scheme) but it caused the autocompletion to break (couldn't find any objective-c class).

    Hope it would help someone!

    0 讨论(0)
  • 2020-12-04 08:59

    After having tried different methods:

    • Delete Derived Data
    • Switching Module Enabled off in Build Settings
    • Full Clean
    • Relaunch

    Only this worked:

    • Find any commented out (/* abc */) code after @end in your files and delete.

    Credit to Max_B: https://forums.developer.apple.com/thread/7439

    In my case, other projects were auto-completing correctly. If all your projects fail to correctly predict code, then it might be a different issue, and the other answers might work.

    0 讨论(0)
提交回复
热议问题