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

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

    I was having issues with a library installed via cocoapods. Going to Build Settings and searching for 'Allow Non-modular Includes In Framework Modules' then setting it to Yes did the trick.

    0 讨论(0)
  • 2020-12-23 14:24

    Open build settings and set "Precompile Prefix Header" to "No", that solved my problem.

    Kudos for: https://stackoverflow.com/a/7035492/936957

    0 讨论(0)
  • 2020-12-23 14:24

    Not bad, If you follow these Steps-

    1-Clean Xcode(Cmd+Shif+K).

    2- Clear Derived Data(Cmd+Shift+G).

    Enter this path( ~/Library/Developer/Xcode/DerivedData/).

    3- Quit and open again Xcode.

    0 讨论(0)
  • 2020-12-23 14:24

    After update to Xcode 11, I met the same problem. I tried all the mentioned advices (cleaning folders, turning on/off different settings, restarting xCode), but nothing helped. Also, I have a big project in C, so, I'd like to keep using precompiled headers.

    Finally I found that simple restart of Mac OS solves the problem! It's really weird behaviour, but I'm happy anyway that I found a solution – it's hard to code when lots of colourful error messages float around.

    0 讨论(0)
提交回复
热议问题