1

I'm seeing a problem with the latest released version of XCode 7, where if I create a brand new Swift project, and build it, the full index is not being created. This means things like Superclasses, Callers, and Callees in the Assistant Editor are not being populated. If I create a brand new Objective-C project, all of this information is generated correctly. If I download older projects from Github, for example, even if they are in Swift, the information is generated. It just seems like projects that are more recently created (say, in the last 6-8 months), are not indexing properly. This includes projects downloaded from Github, for example, and not just projects I have created. I have re-installed Xcode, which didn't help. I did try out the newest Beta version, and that seems to work, but I can't submit apps using that version, so would like to figure out what is going wrong with the released version of XCode.

I haven't seen any reports of anyone having a similar problem. I deleted all XCode plugins, but that also didn't help. It seems like normally the indexing process happens after the build process finishes. In the cases where I don't get an index generated, I don't see the "Indexing.." message show up in the XCode toolbar.

Any thoughts? Thanks!

Laura
  • 431
  • 2
  • 6
  • Did you try to remove DerivedData folder? – heximal Mar 03 '16 at 14:18
  • Yes, multiple times. I even deleted the entire DerivedData folder (not just for the current project) since that had been mentioned as a possible fix. It looks like there used to be a defaults command to turn on/off indexing for XCode, that was was only mentioned for older versions. – Laura Mar 03 '16 at 14:23
  • May be it would be useful to restart Spotlight indexing. – heximal Mar 03 '16 at 14:28
  • Perhaps, although indexing for Objective-C and older Swift projects works just fine. I think the XCode index is separate. The odd thing is that XCode *does* know about my symbols - I can look them up with fast-open, they autocomplete, etc. It's just the higher-level call-graph info that seems to be missing. – Laura Mar 03 '16 at 14:48
  • 1
    And now I think I see the problem. It is more that the indexing is very slow - when I was clicking on various classes, if I waited there for a while, eventually the index info would show up in the assistant editor. It also appears that Swift structs are not indexed. You can't get caller/callee information for functions declared on a Swift struct. However, this is definitely available in the newest Beta of XCode, so I'll just have to wait until then! – Laura Mar 03 '16 at 14:56

0 Answers0