Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 Extension Not Visible In Editor Menu

I have the Xcode 8 GM installed and am trying to mess around with the editor extensions. I've followed the tutorial on this site:

https://littlebitesofcocoa.com/239-creating-an-xcode-source-editor-extension

but for some reason when I run the extension to test it, it doesn't show up in the editor menu at all.

Is there something that the tutorial is missing or is there something else I need to do to get the extension to show up in the editor menu?

Thanks for the help.

like image 514
RPK Avatar asked Sep 12 '16 14:09

RPK


2 Answers

I figured it out.

By default, the project was not signed. Clicking on the project and going to the general settings and selecting Enable Development Signing on both the macOS app and the Extension target fixed the issue.

like image 168
RPK Avatar answered Nov 14 '22 22:11

RPK


If you attempt to follow Apple's Create Xcode Extension guide, and then attempt to test your extension, you'll notice that the menu option doesn't show up.

If you examine the log, you'll notice it says:

IDEExtensionManager: Xcode Extension does not incorporate XcodeKit

Elise van Looij's solution pointed me in the right direction.

What I had to do was:

  1. Xcode Extension Target > General tab

  2. Update XcodeKit.framework to Embed & Sign.

    By default Apple's template has it as Do Not Embed. Note: You should leave Cocoa.framework as Do Not Embed.

  3. Importantly, you should kill the test instance of Xcode (the one with a black background).

    If you don't kill the app, it'll continue to not show up.

  4. You can now run your extension and it'll show up as the last menu option in the Editor menu.

This was tested in Xcode 12.4.

like image 10
Senseful Avatar answered Nov 14 '22 20:11

Senseful