Question: 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?

Answer: 
I had the same problem with Outbank.app which was driving me nuts, as well.

After a wile I found [this site](http://scottlab.ucsc.edu/~wgscott/xtal/wiki/index.php/Extended_Attributes#A_convenient_shell_script_for_changing_Spotlight_metadata_on_a_file "this site") where I was told that *writing* the attribute with `xattr` actually updates the spotlight metadata. So,

```
sudo xattr -w com.apple.metadata:kMDItemSupportFileType "" /Applications/Type2Phone.app 

```

should do the trick.
You can try giving read-write permission to your App, its sub-modules, their sub-modules, theirs etc.

```
$ sudo chmod -R 777 .   

```

(Don't forget the dot "." at the end)

-R stands for recursion. 777 is for "read-write-execute" for owner, group and everyone.

Remember, checking if permission is causing the problem first is advised. In Mac, go to the path of trouble file path, right click, click "Get info", scroll down, see which permission is given (Read Only, Read&Write, Custom etc.). If the problem is not permission, giving high access level may cause security issues.