This started happening with Type2Phone, an app from Houdah Software. Every time after I would update the app via the AppStore, Spotlight would no longer find the app (I use Spotlight for app launching). I contacted the developer, and following a series of steps, we found that what is happening is that somehow the updated app is having this attribute added to it:
kMDItemSupportFileType = (
MDSystemFile
)
[This is the output of the mdls command]
This explains why Spotlight is no longer finding the app.
Now logically, he informed me that this command should remove the attribute:
sudo xattr -d com.apple.metadata:kMDItemSupportFileType /Applications/Type2Phone.app
But although the command executes, it doesn't remove the attribute! I.e.
mdls /Applications/Type2Phone.app/ | grep MDSystemFile
Still has MDSystemFile
as output.
I've run Disk Utility to check for directory damage, rebuilt permissions, etc. to no avail. The only solution is to rebuild the Spotlight index completely — but the problem will recur with a new update.
Although it inexplicably only happened every time I updated Type2Phone, now it's happening when I update Tweetbot.
Any insights into this problem which is driving me batty?
Best Answer
I had the same problem with Outbank.app which was driving me nuts, as well.
After a wile I found this site where I was told that writing the attribute with
xattr
actually updates the spotlight metadata. So,should do the trick.