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.
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.
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:
Xcode Extension Target > General tab
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
.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With