Xcode sets itself als default application to open markdown files even if prompted not to, apparently at login.

After Xcode broke my git installation for intractable reasons, removing the present git executable from my PATH (there are StackOverflow posts about this dating back to 2017!), which took me hours to figure out, I now have another problem caused by Xcode.


Xcode sets itself as the default application to open a bunch of file types, most importantly for me:

JSON and Markdown.


I repeatedly right-clicked markdown files in Finder, selected "Open with...", then changed "Recommended applications" to "All applications", selected QLMarkdown, which is the application I want to use and which was grayed out for intractable reasons as well, then I checked the box "Always open with".


This works for one session if I'm lucky, but after closing the lid of my MacBook and opening it again the default is already reset to Xcode.


This is not acceptable:

Xcode is a dog-slow application even on an M1 Pro with 32GB of RAM and is absolutely unsuitable to open Markdown files for viewing because it takes ages to start and uses a lot of battery.


I want to keep my defaults and I would very much like Xcode to not break my system settings, as it is a required application to do lots of stuff on macOS.



As far as I am concerned, this is clearly a bug, not even a bug in Xcode but a bug that makes Xcode break other applications, which should be fixed with high priority. Would send this to feedback but first:


Does anyone know a workaround or possible cause for this?


I read something about reinstalling Xcode but honestly that's not something I am willing to invest time in.

I'd prefer to remove it altogether and try to work around that, but it seems Apple wants to make this hard for developers of even non iOS-/macOS applications.


Thanks

MacBook Pro 14″

Posted on Apr 5, 2023 10:17 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 9, 2024 9:32 PM

TLDR: you must launch Finder, go to File > Get Info, then select a markdown file to permanently set the app of your choice as the file association.


  • Bringing up the file association dialog when you open a particular file will not work.
  • You do not need to install or reinstall Xcode, git, or anything else.


A very non-intuitive Mac/Finder behavior that took me months to figure out. Thanks @moritz116 for drawing attention to this.

Similar questions

16 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Xcode sets itself als default application to open markdown files even if prompted not to, apparently at login.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.