adruzh
adruzh

Reputation: 1075

Remove old issues in Xcode

I have one trouble with Xcode - sometimes errors and warnings in Issue Navigator persists even when they are fixed. So I have no warnings/errors in log. I can run my project, but in status window and in Issues Navigator I see errors.

I can filter them out using "Show only issues from the latest build", but this is not what I want - I want to see all actual warnings.

Do you know how to keep issues up to date?

Upvotes: 19

Views: 8068

Answers (3)

Aleš Kocur
Aleš Kocur

Reputation: 1908

For anyone dealing with this in 2023: Xcode 15 has Clear All Issues under the Product dropdown.

enter image description here

Upvotes: 5

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

Older answer was to delete Derived Data, which can help. I'd amend this to say delete DD as well as your SPM cache:

rm -Rf ~/Library/Developer/Xcode/DerivedData

...and...

rm -Rf ~/Library/Caches/org.swift.swiftpm


Newer Update (2023): I've found a lot of these that don't go away with Derived Data deletion are down to source files that use symbols from a module the source doesn't import. Xcode seems to get a little confused as to whether an error or warning is actually cleared. Live issues (versus full build) and dependency analysis (of what to rebuild and when) seems to be at play here. If you go through and clean house (and maintain it) with regard to your source files' imports, you may find these go away and stay away.

Upvotes: 16

ben
ben

Reputation: 1501

This is still happening in Xcode 9.4.1. The fix is the same as the previous answer for Xcode 6, but the steps are slightly different:

  1. Close the project in Xcode
  2. Go to Preferences... > Locations
  3. Click the arrow next to the Derived Data path, which will open the folder in Finder, e.g. /Users/xxx/Library/Developer/Xcode/DerivedData
  4. Delete the subfolder relevant to the project you're having trouble with
  5. Reopen the project

Upvotes: 5

Related Questions