Xcode 7.3 Syntax Highlighting and Code Completion issues with Swift

前端 未结 5 572
抹茶落季
抹茶落季 2020-12-23 20:34

I am having an extremely frustrating issue with XCode 7.3 (however, this issue has persisted since I installed XCode 7.2) and Swift code, and I am hoping others have had thi

5条回答
  •  -上瘾入骨i
    2020-12-23 21:04

    I have the same problem. But finally solved it. I make two change, not sure which is the key point but you can try them all.

    1. delete the module cache

    Within the same folder as your project's Derived Data is a Module Cache. When Code Completion stopped working, deleting this fixed it.

    Close Xcode and delete the ~/Library/Developer/Xcode/DerivedData/ModuleCache directory.

    1. change the Enable Modules value

    Go to the Build Settings of your target, then search Enable Modules

    If it's Yes, change it to No, and you may get some build error, just change it back to Yes.

    After two steps above you should Clean(Shift+Command+K) your project.

    For now you may fixed the problem.

提交回复
热议问题