Xcode 7.3 Syntax Highlighting and Code Completion issues with Swift

前端 未结 5 574
抹茶落季
抹茶落季 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条回答
  •  执念已碎
    2020-12-23 20:46

    We had the same issue in a mixed ObjC/Swift project. Tried all the suggestions about deleting derived data etc, to no avail. Sometimes it helped, but not in a reproducible way and after some time it stopped working. The post of Galvin in this post put me on the track of the Module related build settings. However it was another setting that solved the code completion/coloring in a reproducible way: setting DEFINES_MODULE (under Packaging) from YES to NO for our main project was the solution.

    Notes:

    • I expected this to break the ObjC/Swift interoperability in our project, but that still works. It seems that setting is only to be used for framework targets. (https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html)
    • This project setting has not been changed for months, but the code completion issues came up only recently, both for my colleague and me.

提交回复
热议问题