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

后端 未结 16 1551
陌清茗
陌清茗 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:13

    This problem can cause by setting "Target Membership" for some files are not the same.

    Example:

    A class XYZ put in file "a.swift" and it's used in file "b.swift". But "Target Membership" setting of "a.swift" is not the same "Target Membership" setting of b.swift.

    Check "Target Membership" setting as below:

提交回复
热议问题