Xcode shows many errors but program compiles and runs fine (in both simulator and device)

后端 未结 16 1491
陌清茗
陌清茗 2020-12-23 13:46

After installing the CocoaLumberjack\' log compressor class I\'ve been getting this annoying behavior: Xcode complains that there are many undeclared identifiers and gives m

16条回答
  •  感情败类
    2020-12-23 14:15

    I've been running into these issues constantly on all the latest versions of Xcode, in both Objective-C and Swift.

    I noticed today that I was getting the errors in one particular class file. I removed it from some extra targets it was in and the errors finally went away!

    I think Xcode has some fundamental bugs with it's handling of multiple targets right now. My theory is that if the other target is not built, you will essentially see errors from that target. Anyway hope this helps someone.

提交回复
热议问题