Code loses syntax color in Xcode 4

前端 未结 4 949
暗喜
暗喜 2020-12-24 03:56

I have just upgraded to the new Xcode 4 and the code is not colored has it ought to be.

For instance, the string NSString is not colore

4条回答
  •  囚心锁ツ
    2020-12-24 04:26

    I had the same problem with mine. Its a cocos2d game with box and chipmunk. It was a hell of a mess getting the project to recognize and find the user search paths in the first place so I wasn't about to mess with those.

    What I wanted to point out is that I DO HAVE recursive paths and I do have relative paths and I still got the issue. It happened when I added a new version of a 3rd party SDK I was using. It was Testflight 083 which I updagraded to 1.0. I erased my old version but only removed references. Then I manually deleted it from finder. Imported the new SDKv1 folder and readded it to my project and removed the old SDK0 folder path leaving only the newly added SDK1 folder path. For some reason I noticed that even though in v083 I had used a #import in my Prefix.pch file, it still wasn't recognizing a call to a method from AppDelegate. Which means the #import in Prefix.pch for some reason was not working. I had to add #import to my AppDelegate file individually. This gave me duplicate #imports as Jeeva said above. That sounded an alarm in my head.

    So the solution was to go and effectively remove the duplicate #import in Prefix.pch therefore only leaving the one in AppDelegate. It reindexed and CodeSense works again. Thanks Jeeva!

提交回复
热议问题