Xcode 4 autocomplete buggy

前端 未结 5 2341
北荒
北荒 2021-02-19 17:07

do you face also the problems with Xcode 4 autocomplete feature that used to work great on version 3.x.x?

I\'ve imported in the Prefix some classes and Xcode doesn\'t wan

5条回答
  •  半阙折子戏
    2021-02-19 17:41

    EDIT 3: Note that this indexing issues has mostly disappeared in recent versions of Xcode (4.1 for sure, latest pre-Lion 4.0.x I think), and that I do not use this workaround anymore, using pch... And in fact not using Xcode anymore... AppCode ftw! :)


    An easy, but quite dirty workaround imho is not using precompiled header .pch file to do global includes, but instead go a global header .h, that you include... everywhere. That way indexing will work flawlessly...

    I Know that's dirty, don't downvote me please :) I'll delete this answer as soon as someone propose something better! Which I would love.

    Off-topic, but related, read somewhere llvm2 is not supposed to get a gain speed with .pch files. which kind of deprecate them.

    EDIT: Just checked to be sure of my answer, latest version of Xcode (4.0.1 when writing this) looks like fixing that bug for me. Did you upgrade to latest version?

    EDIT 2: Removed my global import header .h, all its references, and moved my global imports into .pch file... That doesn't work as well I expected, latest Xcode 4.0.1 improved on this part but still have some cases where it fails. (I'm working on a project with hundreds of files). Looks like cleaning index/restarting Xcode fix it. I might consider reverting to my dirty workaround...

提交回复
热议问题