Xcode 8 syntax highlighting doesn't work

2019-02-01 20:34发布

The code above has correct syntax highlighting in Xcode 7. It is mix of Obj-C + Swift:

enter image description here

I've updated project to support Xcode 8 and only few things was changed:

  • In Build Settings Swift 2.3 support enter image description here

  • And have fixed few errors related to implicitly unwrapped properties in UIKit enter image description here

After all the project is compiled fine for Xcode 8.

But Obj-C code integrated in Swift doesn't have any syntax highlighting and vice versa:

enter image description here

And there is << error type >> problem with autocomplete: enter image description here

Derived data deleting doesn't help, Xcode restart either :) CocoaPods version 0.38.2, iOS 7

8条回答
疯言疯语
2楼-- · 2019-02-01 20:58

Setting Use Legacy Swift Language Version to YES in the Build Settings helped me to solve similar issue

查看更多
一夜七次
3楼-- · 2019-02-01 21:05

Commenting and then uncommenting the affected lines worked for me.

查看更多
登录 后发表回答