xcodexcode9xcode9.3

Xcode Symbol navigator - Symbols displayed twice once each for iOS device and iOS Simulator


The Xcode Symbol navigator is listing the framework supplied symbols twice; once each for iOS and Simulator.

For instance, here's NSObject listed for Simulator

enter image description here

and NSObject listed for iOS Device

enter image description here

Similarly, here's UIDevice listed for Simulator

enter image description here

and UIDevice listed for iOS Device

enter image description here

As I recall, this never used to be the case. The symbols should be listed only once.

I am using Xcode Version 9.3 (9E145), running on macOS High Sierra 10.13.4 (17E202).

Update: I am using Xcode Version 9.4.1 (9F2000), running on macOS High Sierra 10.13.5 (17F77) (both of them current as of this writing).

How do I get back to the default behaviour of showing each symbol only once?

I have already tried:

The behaviour is observed in every project that I open with Xcode.


Solution

  • Since the issue only appears on your user account, try:

    1. Flushing Xcode preferences plist file ~/Library/Preferences/com.apple.dt.Xcode.plist. (Warning: This will reset all the custom user preferences).

    2. Run the following reset script from here:

      #!/bin/bash
      killall Xcode
      xcrun -k
      xcodebuild -alltargets clean
      rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
      rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
      rm -rf ~/Library/Developer/Xcode/DerivedData/*
      rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
      open /Applications/Xcode.app
      

    Most likely some setting got switched on that you can't figure out how to switch off. If you would like to figure out what the setting exactly is you can probably compare the plists.