Xcode doesn't show up in spotlight results, neither search results
Solution 1:
Try Rebuilding Spotlight index. You can do it from the Terminal:
$ sudo mdutil -i on /
Solution 2:
I had a similar problem after upgrading to Xcode 8.3. It simply stopped showing up in the spotlight search result. Rebuilding by adding Application folder to the privacy list in spotlight preferences, didn't help.
Executing sudo touch /Applications/Xcode.app
in the Terminal worked.
Cheers, Jon
Solution 3:
After upgrading from El Capitan to macOS Sierra I had the same problem.
The only command that did the trick was:
sudo mdutil -E # from mdutil usage "Erase and rebuild index"
If that one doesn't work directly, try running this command first:
sudo mdutil -i on # from mdutil usage "Turn indexing on or off"
Solution 4:
Updating the permissions did the trick for me: chown -R $(whoami):staff /Applications/Xcode.app
Suggested from here: https://forums.developer.apple.com/thread/82503