My app imports files from a particular open standard that has a published Uniform Type Identifier (UTI). Recently, another mac app store app added some erroneous UTI declarations for files with the standard file extension for that file type. Using yet another app (non-app-store) to save data off in this common open file format, the system picked one of the erroneous UTI's from the app store app, and now my app and another (major gold-standard) app cannot open the file. Running mdls on the file reveals the kMDItemContentType is a wrong value, and of the 6 apps on my machine that can open and save that format, only the app from the store app is declaring the erroneous UTI value the system picked. Changing the file extension to something else and back to the right thing doesn't work. Changing the default app to open the file didn't work. How do I change the system's incorrect inference of the kMDItemContentType? How can my users do so? My app can't open the file (it's grayed-out in the file browser), but it can open other apps with the same file extension (which perhaps had their content-types set before the app store app with the erroneous definitions was updated to include erroneous definitions). Would merely deleting the offending app fix, or are these files permanently unopenable?
How does a user fix an errant kMDItemContentType?
I documented the problems their app was causing, sent the documentation to the offending app. They promised to fix it in their next update. In the mean time, I have deleted their app off my machine and the bugs caused by their incorrect UTI declarations are gone. This doesn't answer the question of how to correct the mdls entry, but it is a workaround.