Imported UTI public.markdown should be declared as net.daringfireball.markdown
Description
A user of my app reported to me that it recently stopped displaying Markdown documents correctly. After investigating, I noticed that CotEditor assigns the .md extension to the public.markdown UTI. My app and other apps, including Apple's Xcode, assign .md to net.daringfireball.markdown.
When opening a .md file in Xcode while having CotEditor installed, Xcode doesn't show the default Markdown formatting but shows the Markdown document as plain text.
After uninstalling CotEditor, the Markdown document is displayed correctly again.
To Reproduce
- Install Xcode and CotEditor.
- Open the sample Markdown file in Xcode: markdown.md
Expected behavior
It should display Markdown formatting.
CotEditor version
7.0.0
macOS version
26.4.1
Additional context
No response
@nickasd Thanks for filing the issue. It finally helped me understand what was going on.
I’d recently received similar reports from other users as well, and after trying a few things on my end, switching the Markdown UTI from net.daringfireball.markdown to public.markdown seemed to make the problem go away. That led me to suspect that macOS itself might have changed the Markdown UTI.
But it turns out another application was interfering instead. In my environment, for example, Panic’s Nova assigns public.markdown to Markdown in its Info.plist.
As you pointed out, I agree that net.daringfireball.markdown is the correct identifier for Markdown, so I’ll switch back to net.daringfireball.markdown in 7.0.1, which I’m planning to release this weekend.
Sorry for the trouble this caused.
Just FYI, I am the user and I did not use Nova. But a lot of other Editors, so maybe one of them did that.
Thanks for your prompt response. I was only aware of this issue because I was contacted myself some years ago by someone whose app stopped working correctly when one of mine was installed. I think an app shouldn't be able to interfere in how other apps work, and when I contacted Apple about this, they replied that they're aware of it and that it used to be even worse in the past, but still there doesn't seem to be a fix in macOS today.
What makes the issue even more frustrating is that there doesn't seem to be an easy way to find out what app declares a specific UTI or "claims" a file extension. I was able to find CotEditor by letting the user run this Terminal command:
grep -r --include Info.plist 'public.markdown' /Applications
Thank you guys for the follow-up.
I wasn’t trying to pin the blame on Nova here. As @nickasd said, the tricky part on macOS is that one app’s configuration can affect other apps as well. Document type resolution on macOS has a lot of historical baggage, and together with AppKit’s NSDocument it has ended up as a very complex system. If Apple is aware of the issue, all we can really do is hope it improves over time (though I don’t expect that to happen quickly…).
Thank you for your efforts! <3