Xcode: “Reference to NSString is ambiguous”

2019-09-11 18:28发布

问题:

I don't understand how such a thing can happen: I have created an Xcode project (Xcode 6) and I imported some files from a previous project (a Storyboard, the Images.xcassets file and some .h and .m files)

Now when I import some of those headers in my code, each line using a NSString reports the error "Reference to NSString is ambiguous".

Is this a known issue, how to solve that?

回答1:

Reason: Engineering Index is broken, Rebuild index

Workaround: Xcode -> Window -> Organizer -> select the project, find Derived Data, click on the back of Delete, and then restart XCode can.