Why is XCode reporting issues (or errors) twice sometime?
Using XCode Version 13.1 (13A1030d).
For example (dummy example), XCode starts by showing just 1 error:
and then, seconds later it shows this:
I tried unsetting/setting "Build Active Architecture Only" (ONLY_ACTIVE_ARCH). But it did have an effect.
Moreover the problem is erratic - sometimes the error is reported once only; and then on a second build it shows errors twice.
Ok... I think I may know why it's happening:
-
One report is from the build
-
the other one is from the "Show live issues" option (Preferences -> General)
Disabling "Show live issues" removes one occurence of the report.
I had this option off previously; I guess when I installed the new XCode this option got reset (or I reset it by mistake); but I don't recall seeing this problem in previous XCode versions...?
You can also filter out "Show only issues from the lastest build" (this will only filter in the Navigator, not in the Editor)