How to Fix the SwiftFormat Xcode Extension Not Showing or Not Working

The SwiftFormat Source Editor extension can fail to appear in Xcode's menu or do nothing when clicked. Here is how to diagnose and fix it.

The Symptom

You installed the SwiftFormat for Xcode app, but the formatting command does not appear under Xcode's Editor menu, or it appears and does nothing when you click it. This is one of the most common friction points with the Source Editor extension.

Source Editor extensions in Xcode have specific requirements that differ from the command-line tool. The extension not showing up is usually a system configuration issue rather than a problem with SwiftFormat itself.

Because macOS gates these extensions behind explicit permission and Xcode discovers them only at launch, there are a few predictable places where the chain breaks. Almost every case traces back to one of them.

The fixes are straightforward once you know what Xcode expects.

Work through them in order and the extension should appear and function. Following the sequence matters, because a later step often only takes effect once an earlier one is in place.

Understand the Two Separate Things

It helps to be clear that there are two distinct pieces here. The SwiftFormat command-line tool is one thing, and the SwiftFormat for Xcode application, which provides the Source Editor extension, is another.

Installing the CLI, for example through Homebrew, does not install the Xcode extension. The extension comes from the separate macOS app, which you obtain and run to register the extension with the system.

These are genuinely independent installs with independent update paths. Upgrading the CLI through Homebrew does nothing for the extension, and vice versa, which can lead to version drift if you rely on both.

Many people are confused when the CLI works fine but the Editor menu shows nothing. That is expected, because the menu item comes from the app, not the command-line tool.

Make sure you have actually installed the app that provides the extension. If you only ran a Homebrew install, the Editor menu entry was never going to appear, and that alone explains a large share of reports.

Enable the Extension in System Settings

macOS requires you to explicitly enable Source Editor extensions before Xcode will show them. This is a security and privacy control, and it is the single most common reason the SwiftFormat command does not appear.

Open System Settings and navigate to the Extensions area, where you can find Xcode Source Editor extensions. Enable the SwiftFormat extension there.

The exact wording and location of that setting has shifted across macOS versions, so if you do not see it immediately, search System Settings for extensions and look specifically for the Xcode Source Editor category.

Without this step, the extension is installed but inert, so Xcode never lists it in the Editor menu. Turning it on is what makes it visible.

This is a one-time action per machine, though it can reset after some system changes. Because it resets occasionally, it is always worth rechecking here first whenever the extension disappears.

Restart Xcode

After enabling the extension, restart Xcode completely. Xcode discovers Source Editor extensions when it launches, so a running instance may not pick up a newly enabled extension.

Quit Xcode fully rather than just closing a window, then reopen it and check the Editor menu again. The SwiftFormat submenu should now be present.

Closing the project window is not the same as quitting the application; Xcode can keep running in the background, and only a full relaunch triggers fresh extension discovery.

If it appears after the restart, the enablement step was the missing piece. This launch-time discovery behavior is why toggling the extension often has no visible effect until you relaunch.

When in doubt, quit Xcode, confirm it is no longer running, and start it again from scratch. That clean relaunch removes any ambiguity about whether the newly enabled extension was picked up.

Check the Extension Configuration

If the menu item appears but formatting does nothing or behaves unexpectedly, look at the SwiftFormat for Xcode app's own settings. The app lets you configure how the extension formats, including which rules and options it applies.

Make sure the extension is pointed at the configuration you intend, ideally the same .swiftformat file your command-line runs use. Divergent settings between the CLI and the extension lead to confusing results where the two produce different formatting.

When the editor formats one way and your commit hook or CI formats another, developers end up fighting their own tools, so aligning both on a single source of configuration removes that whole category of confusion.

Aligning the extension with your project configuration keeps in-editor formatting consistent with what your hooks and CI enforce, so developers do not see one style in Xcode and another on commit.

If formatting still does nothing after that, confirm you are editing a saved Swift file, since some behaviours depend on the current document state.

Watch for System Permission Resets

A subtle problem is that extension enablement and permissions can reset after macOS updates or certain system changes. Something that worked last week may silently stop after an update.

If the extension suddenly disappears from the Editor menu, revisit the Extensions settings and confirm it is still enabled. Re-enabling and restarting Xcode typically restores it.

Major system updates are the usual trigger, so if the extension vanished around the same time you updated macOS or Xcode, that is almost certainly the cause rather than anything you changed.

This intermittent behavior is a known characteristic of Source Editor extensions in general, not a SwiftFormat-specific defect.

Knowing to check the system settings first saves a lot of guesswork when the extension vanishes unexpectedly. Making this your first check after any system update turns a mysterious disappearance into a quick, predictable fix that usually takes under a minute.

Fall Back to the CLI

If the extension continues to be troublesome, remember that the command-line tool is the more robust and widely used integration path. The CLI does not depend on macOS extension enablement and behaves consistently across environments.

Many teams rely primarily on the CLI through a build phase or commit hook and treat the Xcode extension as a convenience rather than the backbone of their workflow. That way, formatting is guaranteed even if a particular machine's extension is misconfigured.

That design is deliberate. When the enforcement mechanism is the CLI, a single misconfigured machine's extension cannot let unformatted code through, because the automated checks still run regardless.

Using the CLI as your source of truth also sidesteps the discovery and permission quirks entirely, which is why it is the recommended foundation for enforcing formatting on a team.

The extension is a nice ergonomic bonus, but it does not need to be the thing your consistency depends on.

When to Seek More Help

If you have installed the app, enabled the extension, restarted Xcode, and it still will not work, the project's official GitHub repository and its issues are the authoritative place to look for environment-specific reports and guidance.

Include details about your macOS and Xcode versions when searching or reporting, since extension behavior can depend on both. Others have often hit the same combination.

Searching existing issues before opening a new one usually pays off, because Source Editor extension quirks tend to be tied to specific OS and Xcode releases that many people encounter at once.

And keep the scope in mind throughout. The Xcode extension is only about formatting convenience inside the editor.

Whether it works or not has no bearing on building, signing, or submitting your app, which always depend on Xcode's build system and an Apple Developer Program membership. A broken extension is an inconvenience, not a blocker to shipping, especially when the CLI is available as a reliable alternative.

Frequently Asked Questions

Why doesn't SwiftFormat appear in Xcode's Editor menu?

The menu item comes from the SwiftFormat for Xcode app, not the command-line tool, and macOS requires you to enable the Source Editor extension in System Settings under Extensions. After enabling it, restart Xcode.

Does installing SwiftFormat with Homebrew add the Xcode extension?

No. The Homebrew install provides the command-line tool only. The Xcode extension comes from the separate SwiftFormat for Xcode application, which you install and run to register the extension.

The menu item appears but formatting does nothing. Why?

Check the SwiftFormat for Xcode app's settings and make sure the extension uses the configuration you expect, ideally the same .swiftformat file as your command-line runs, so behavior is consistent.

Why did the extension stop working after a macOS update?

Extension enablement and permissions can reset after system updates. Revisit the Extensions settings, confirm SwiftFormat is still enabled, and restart Xcode to restore it.

What if the Xcode extension keeps failing?

Fall back to the command-line tool via a build phase or commit hook. The CLI does not depend on macOS extension enablement and is the more robust, recommended way to enforce formatting on a team.