Unable to see source editor extension commands in Xcode 16

I am trying to create a source editor extension in Xcode 16, I just created a blank macOS project and added an extension target. I also changed "XcodeKit.framework" to Embed and sign, but when I run the extension on my Mac, I can't see the command under "Editor" menu.

I even tried to clone a sample extension from online and run it, even in this project I'm unable to see the commands under "Editor" menu.

Has anyone faced this issue?

Answered by DTS Engineer in 829040022

Geting Xcode to recognise your source editor extension can be tricky. There are two cases to consider:

  • Debugging

  • Production

I recommend you start with the debugging case. When you create a new source editor extension target, Xcode create a scheme for it. That scheme isn’t very useful out of the box. Do this:

  1. Use your primary copy of Xcode for this work. Ideally it’d be the one in the Applications folder.

  2. Select the extension scheme in Product > Scheme.

  3. Choose Product > Scheme > Edit Scheme.

  4. In the Run action, switch to the Info tab.

  5. On the Executable popup, choose Other and select your primary copy of Xcode.

  6. Make sure Debug Executable is not checked.

  7. Close the sheet and then choose Product > Run.

  8. Xcode should launch a second copy of itself. In the Dock, you’ll see the icon with an orangey tint. Bring that to the front.

  9. In this copy, open a test project and navigate to a source file. Your extension should be visible at the bottom of the Editor menu.

I just tried this today (Xcode 16.2 on macOS 15.3.1) and it worked a treat. I use the macOS > App template for the container app project and the macOS > Xcode Source Editor Extension template for my extension target. Oh, and as you noted, I had to change the XcodeKit setting to Embed & Sign.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Geting Xcode to recognise your source editor extension can be tricky. There are two cases to consider:

  • Debugging

  • Production

I recommend you start with the debugging case. When you create a new source editor extension target, Xcode create a scheme for it. That scheme isn’t very useful out of the box. Do this:

  1. Use your primary copy of Xcode for this work. Ideally it’d be the one in the Applications folder.

  2. Select the extension scheme in Product > Scheme.

  3. Choose Product > Scheme > Edit Scheme.

  4. In the Run action, switch to the Info tab.

  5. On the Executable popup, choose Other and select your primary copy of Xcode.

  6. Make sure Debug Executable is not checked.

  7. Close the sheet and then choose Product > Run.

  8. Xcode should launch a second copy of itself. In the Dock, you’ll see the icon with an orangey tint. Bring that to the front.

  9. In this copy, open a test project and navigate to a source file. Your extension should be visible at the bottom of the Editor menu.

I just tried this today (Xcode 16.2 on macOS 15.3.1) and it worked a treat. I use the macOS > App template for the container app project and the macOS > Xcode Source Editor Extension template for my extension target. Oh, and as you noted, I had to change the XcodeKit setting to Embed & Sign.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unfortunately this does not work. I still am not able to see the extension in the orange debuggable instance of xcode.

Xcode 16.0 macOS 15.3.2

Is there any update in this?

I was finally able to see the extension commands after setting up "Development Signing" instead of "Run Locally". It is documented absolutely nowhere just like how I had to change the XcodeKit.framework to Embed without signing.

Unable to see source editor extension commands in Xcode 16
 
 
Q