Xcode Symbol navigator has duplicate classes after restructuring subclasses

Bug: Xcode 13.3 Symbol navigator lists duplicate classes in the left column after I restructured the hierarchy. I changed the superclass of a number of classes in my Objective-C project and the changed classes now appear inside the old superclass and the new superclass in the Hierarchical view.

Is there a workaround or fix for this?

I tried Clean Build Folder, quitting and relaunching Xcode, but these actions do not solve the problem.

  • How did you restructure ? In Xcode ? In Finder ? Do you see the duplicate when, you look at folders in Finder ?

  • I changed the class hierarchy in Xcode by reassigning the super class of several classes to a different superclass.

    I also just now deleted ModuleCache.noindex at 

    /Users/myusername/Library/Developer/Xcode/DerivedData/ModuleCache.noindex

    Maybe that solved it? The symbols now appear correctly in Xcode's Symbol navigator.

Add a Comment

Accepted Reply

Deleting the ModuleCache.noindex at /Users/myusername/Library/Developer/Xcode/DerivedData/ModuleCache.noindex seems to fix this problem.

Replies

Thanks for the feedback and great you found a solution. Each in Xcode may sometimes cause bizarre behaviour. Normally Clean Build Folder should solve it, unless a more radical deletion of all derivedData is needed.

You should close the thread now.

Deleting the ModuleCache.noindex at /Users/myusername/Library/Developer/Xcode/DerivedData/ModuleCache.noindex seems to fix this problem.